Remove Anti AdBlock Dialog - fapfapgames.com (Completo)

Remove o modal anti adblock em todo o site fapfapgames.com

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         Remove Anti AdBlock Dialog - fapfapgames.com (Completo)
// @namespace    http://tampermonkey.net/
// @version      1.2
// @description  Remove o modal anti adblock em todo o site fapfapgames.com
// @author       MaliciusPlayer
// @match        https://fapfapgames.com/*
// @grant        none
// @run-at       document-start
// @license MIT
// ==/UserScript==

(function () {
    'use strict';

    const blockSelectors = [
        '.dialog-root',
        '.dialog-overlay',
        '#myPluginScript-js'
    ];

    function hideAntiAdblock() {
        for (const selector of blockSelectors) {
            document.querySelectorAll(selector).forEach(el => {
                console.log(`[AntiAdBlock] Removido elemento: ${selector}`);
                el.remove();
            });
        }

        if (document.body) {
            document.body.style.overflow = 'auto';
        }
        if (document.documentElement) {
            document.documentElement.style.overflow = 'auto';
        }
    }

    // Observa toda a árvore DOM por alterações
    const observer = new MutationObserver(() => {
        hideAntiAdblock();
    });

    const startObserver = () => {
        observer.observe(document.documentElement || document.body, {
            childList: true,
            subtree: true
        });
    };

    // Executa imediatamente após a página carregar o DOM
    if (document.readyState === 'loading') {
        document.addEventListener('DOMContentLoaded', () => {
            hideAntiAdblock();
            startObserver();
        });
    } else {
        hideAntiAdblock();
        startObserver();
    }

    // Repetição extra por segurança durante 10 segundos
    let count = 0;
    const interval = setInterval(() => {
        hideAntiAdblock();
        count++;
        if (count > 10) {
            clearInterval(interval);
            observer.disconnect();
        }
    }, 1000);
})();