Automatic Button Click

Closes the "Adblocker Enabled" notification for you.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         Automatic Button Click
// @author       Rahatul Ghazi | ChatGPT
// @description  Closes the "Adblocker Enabled" notification for you.
// @version 1.0
// @license MIT
// @match        https://intro-hd.net/*
// @grant        none
// @namespace https://greasyfork.org/users/1226730
// ==/UserScript==

(function() {
    'use strict';

    let buttonClicked = false;

    function clickButton() {
        if (buttonClicked) {
            return; // Stop checking if the button has been clicked
        }

        let button = document.querySelector('.mdpDeblocker-close');
        if (button) {
            button.click();
            buttonClicked = true; // Set the flag to true after clicking
        } else {
            setTimeout(clickButton, 1000); // Check again in 1 second
        }
    }

    // Wait for the page to load fully
    window.addEventListener('load', function() {
        clickButton(); // Start checking for the button
    });
})();