Remove Anti AdBlock Dialog - fapfapgames.com (Completo)

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

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

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