Google Search Sponsored Products - Bypass Google Ad Services

Bypass Google Sponsored Products' tracking links, by removing the links that contain "aclk?" in the URL. This is in no way optimized for performance, contact me if you have any suggestions. This script is licensed under the MIT License.

ติดตั้งสคริปต์นี้?
สคริปต์ที่แนะนำของผู้เขียน

คุณอาจชื่นชอบ E-Z Auto Expand

ติดตั้งสคริปต์นี้
  1. // ==UserScript==
  2. // @name Google Search Sponsored Products - Bypass Google Ad Services
  3. // @namespace https://e-z.bio/pnda
  4. // @version 1.0.0
  5. // @description Bypass Google Sponsored Products' tracking links, by removing the links that contain "aclk?" in the URL. This is in no way optimized for performance, contact me if you have any suggestions. This script is licensed under the MIT License.
  6. // @author Pnda (https://e-z.bio/pnda, https://greasyfork.org/en/users/1362722-pnda)
  7. // @match *://www.google.com/search?*
  8. // @match *://www.google.co.uk/search?*
  9. // @match *://www.google.de/search?*
  10. // @match *://www.google.nl/search?*
  11. // @match *://www.google.fr/search?*
  12. // @match *://www.google.dk/search?*
  13. // @match *://www.google.co.jp/search?*
  14. // @match *://www.google.es/search?*
  15. // @match *://www.google.ca/search?*
  16. // @match *://www.google.it/search?*
  17. // @match *://www.google.com.au/search?*
  18. // @match *://www.google.com.tw/search?*
  19. // @match *://www.google.com.br/search?*
  20. // @match *://www.google.com.tr/search?*
  21. // @match *://www.google.be/search?*
  22. // @match *://www.google.com.gr/search?*
  23. // @match *://www.google.co.in/search?*
  24. // @match *://www.google.com.mx/search?*
  25. // @match *://www.google.com.ar/search?*
  26. // @match *://www.google.ch/search?*
  27. // @match *://www.google.cl/search?*
  28. // @match *://www.google.at/search?*
  29. // @match *://www.google.ie/search?*
  30. // @match *://www.google.com.co/search?*
  31. // @match *://www.google.pl/search?*
  32. // @match *://www.google.pt/search?*
  33. // @match *://www.google.com.pk/search?*
  34. // @match *://www.google.co.kr/search?*
  35. // @icon https://www.google.com/s2/favicons?sz=64&domain=www.google.com
  36. // @license MIT
  37. // @charset UTF-8
  38. // @grant none
  39. // ==/UserScript==
  40.  
  41. (function () {
  42. 'use strict';
  43.  
  44. /**
  45. * MIT License
  46. *
  47. * Copyright (c) 2024 Panda (https://e-z.bio/pnda). All rights reserved.
  48. *
  49. * Permission is hereby granted, free of charge, to any person obtaining a copy
  50. * of this software and associated documentation files (the "Software"), to deal
  51. * in the Software without restriction, including without limitation the rights
  52. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  53. * copies of the Software, and to permit persons to whom the Software is
  54. * furnished to do so, subject to the following conditions:
  55. *
  56. * The above copyright notice and this permission notice shall be included in all
  57. * copies or substantial portions of the Software.
  58. *
  59. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  60. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  61. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  62. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  63. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  64. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  65. * SOFTWARE.
  66. */
  67.  
  68. window.addEventListener('load', (event) => {
  69. for (const item of document.querySelectorAll('.pla-unit')) {
  70. const removeTrackedLinks = (element) => {
  71. if (element.href && element.href.includes('aclk?')) {
  72. element.remove();
  73. console.log('removed');
  74. return;
  75. }
  76. for (const child of element.children) {
  77. removeTrackedLinks(child);
  78. }
  79. };
  80.  
  81. removeTrackedLinks(item);
  82. }
  83. });
  84. })();