Remove Anti AdBlock Dialog - fapfapgames.com (Completo)

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

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==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);
})();