SimplicityBlock

The lightest, most unobtrusive and safest ad blocker that blocks almost all ads.

  1. // ==UserScript==
  2. // @name SimplicityBlock
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0
  5. // @description The lightest, most unobtrusive and safest ad blocker that blocks almost all ads.
  6. // @description:hi सबसे हल्का, गैर-दखल देने वाला और सुरक्षित विज्ञापन अवरोधक जो लगभग सभी विज्ञापनों को रोकता है।
  7. // @description:es El bloqueador de anuncios más ligero, no intrusivo y seguro que bloquea casi todos los anuncios.
  8. // @description:de Der leichteste, unaufdringlichste und sicherste Werbeblocker, der fast alle Anzeigen blockiert.
  9. // @description:ja ほぼすべての広告をブロックする、最も軽く、最も目立たず、最も安全な広告ブロッカー。
  10. // @description:ru Самый легкий, ненавязчивый и безопасный блокировщик рекламы, блокирующий практически всю рекламу.
  11. // @description:pl Najlżejszy, najbardziej dyskretny i najbezpieczniejszy bloker reklam, który blokuje niemal wszystkie reklamy.
  12. // @author Winverse
  13. // @icon https://i.ibb.co/r1ZSFgR/Projekt-bez-nazwy.png
  14. // @match *://*/*
  15. // @grant none
  16. // @license ARR
  17. // ==/UserScript==
  18.  
  19. (function() {
  20. 'use strict';
  21.  
  22. // List of ad provider keywords (all lowercase for consistency)
  23. const adKeywords = [
  24. "adsense", "googleads", "youtubeads", "doubleclick", "gstatic", "adcash",
  25. "ad-maven", "ezoic", "admob", "inmobi", "taboola", "luna", "adsterra",
  26. "media.net", "publist", "amazonpublisher", "amazon ads", "facebookads", "pubmatic",
  27. "popads", "propellerads", "bidvertiser", "smartyads", "evadav", "eporn", "rollerads",
  28. "mgid", "mobileads", "adform", "adspeed", "zedo", "advendio", "mediasmart", "passendo",
  29. "revive", "sizmek", "uprival", "openx", "lotame", "dataxu", "sovrn", "unityads"
  30. ];
  31.  
  32. // Create a regex pattern from keywords
  33. const pattern = new RegExp(adKeywords.join("|"), "i");
  34.  
  35. function removeAds() {
  36. const iframes = document.querySelectorAll("iframe");
  37.  
  38. iframes.forEach(iframe => {
  39. if (pattern.test(iframe.src)) {
  40. console.log(`[SimplicityBlock] Removed ad iframe: ${iframe.src}`);
  41. iframe.remove();
  42. }
  43. });
  44. }
  45.  
  46. // Run on page load and observe DOM changes
  47. removeAds();
  48. new MutationObserver(removeAds).observe(document.body, { childList: true, subtree: true });
  49.  
  50. })();