Anti-Adblock Killer (Safe + Exceptions)

Neutralizes adblock detection scripts without breaking major websites (Google, YouTube, Reddit, X, etc). Includes an easy-to-edit exception list.

当前为 2025-11-19 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Anti-Adblock Killer (Safe + Exceptions)
// @namespace    https://tampermonkey.net/
// @version      2.2
// @description  Neutralizes adblock detection scripts without breaking major websites (Google, YouTube, Reddit, X, etc). Includes an easy-to-edit exception list.
// @author       TAUÃ B. KLOCH LEITE
// @match        *://*/*
// @license      GPL-3.0
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // 1️⃣ - Sites where this script SHOULD NOT run (prevents layout issues)
    const exceptions = [
        'google',
        'youtube',
        'facebook',
        'instagram',
        'whatsapp',
        'reddit',
        'github',
        'x.com',
        'twitter',
        'tiktok',
        'wikipedia',
        'linkedin',
        'amazon',
        'netflix',
        'hbo',
        'disney',
        'spotify',
        'paypal',
        'microsoft',
        'office',
        'live',
        'outlook',
        'steam',
        'epicgames',
        'roblox',
        'discord',
        'twitch',
        'globo',
        'g1',
        'uol',
        'terra'
    ];

    const domain = window.location.hostname;

    // If current domain matches any exception string, do NOT run script
    if (exceptions.some(d => domain.includes(d))) {
        console.log(`[Anti-Adblock Killer] Exception applied on: ${domain}`);
        return;
    }

    // 2️⃣ - Neutralize FuckAdBlock and BlockAdBlock functions
    Object.defineProperty(window, 'FuckAdBlock', { value: function(){}, writable: false });
    Object.defineProperty(window, 'BlockAdBlock', { value: function(){}, writable: false });

    // 3️⃣ - Block dynamically loaded anti-adblock scripts
    const blockedScripts = ["fuckadblock", "blockadblock", "adblock-detector"];

    new MutationObserver((mutations) => {
        for (const mut of mutations) {
            mut.addedNodes.forEach(node => {
                if (node.tagName === 'SCRIPT') {
                    const src = node.src?.toLowerCase() || '';
                    if (blockedScripts.some(s => src.includes(s))) {
                        node.type = 'javascript/blocked';
                        node.remove();
                        console.log('[Anti-Adblock Killer] Blocked anti-adblock script:', src);
                    }
                }
            });
        }
    }).observe(document.documentElement, { childList: true, subtree: true });

    console.log('[Anti-Adblock Killer] Running safely');
})();