Remove Adblock Detection Layer

Removes adblock detection popups and overlay layers

// ==UserScript==
// @name         Remove Adblock Detection Layer
// @namespace    elite.adblock.remove
// @version      1.2
// @description  Removes adblock detection popups and overlay layers
// @author       Abdelali
// @match        *://*/*
// @run-at       document-end
// @grant        none
// ==/UserScript==

(function () {
    'use strict';

    const keywords = [
        'adblock', 'disable adblocker', 'bypass extension', 'disable your adblocker',
        'please disable', 'turn off adblock'
    ];

    const hideOverlay = () => {
        const allElements = document.querySelectorAll('div, section, article');
        allElements.forEach(el => {
            const txt = el.innerText?.toLowerCase();
            const styles = window.getComputedStyle(el);
            if (!txt) return;

            const matchesText = keywords.some(k => txt.includes(k));
            const isModal = styles.position === 'fixed' || styles.position === 'absolute';

            if (matchesText && isModal) {
                el.remove();
                console.warn("✅ Adblock layer removed:", el);
            }
        });

        // Also unblur / unlock page
        document.body.style.overflow = 'auto';
        document.body.style.filter = 'none';
    };

    const observer = new MutationObserver(() => {
        hideOverlay();
    });

    observer.observe(document.body, { childList: true, subtree: true });

    // Trigger once manually after load
    window.addEventListener('load', hideOverlay);
})();