您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
Hides ads from networks (not detectable as AdBlock).
// ==UserScript== // @name Removes ads from popular networks // @namespace https://tampermonkey.net/ // @version 1.5 // @description Hides ads from networks (not detectable as AdBlock). // @author Rubsytance // @license MIT // @match *://*/* // @exclude *://knolix.com/* // @exclude *://earnbitmoon.club/* // @grant none // @run-at document-end // ==/UserScript== (function () { 'use strict'; const adDomainKeywords = [ "a-ads.com", "bitmedia.io", "ads.knolix.com", "zerads.com", "hello.coinzilla.com", "coinzilla.com", "propellerads.com", "popads.net", "adsterra.com", "onclickads.net", "doubleclick.net", "googlesyndication.com", "googleads.g.doubleclick.net", "media.net", "outbrain.com", "taboola.com", "revcontent.com", "mgid.com", "adnxs.com", "zedo.com", "infolinks.com" ]; const adSelectors = [ '[id^="ad-"]', '[class^="ad-"]', '[id*="ads"]', '[class*="ads"]', '[id*="banner"]', '[class*="banner"]', '[id*="sponsor"]', '[class*="sponsor"]', '[class*="promoted"]', '[id*="popunder"]', '[class*="popunder"]', '[class*="overlay"]', '[id*="overlay"]', 'iframe', 'script[src]', 'ins.adsbygoogle', 'div[data-google-query-id]' ]; function hideMatchingElements() { const elements = document.querySelectorAll(adSelectors.join(',')); elements.forEach(el => { try { const src = el.src || el.getAttribute('src') || ''; const html = el.outerHTML || ''; const full = src + html; const matchesAd = adDomainKeywords.some(domain => full.includes(domain)); if (matchesAd || adSelectors.some(sel => el.matches(sel))) { el.style.display = 'none'; el.style.visibility = 'hidden'; el.style.opacity = '0'; el.style.pointerEvents = 'none'; el.removeAttribute('src'); } } catch (e) {} }); } hideMatchingElements(); setInterval(hideMatchingElements, 5000); const observer = new MutationObserver(hideMatchingElements); observer.observe(document.body, { childList: true, subtree: true }); })();