Aternos Minecraft Server Hosting ADBLOCKER

Great minecraft hosting, but it has adblocker detection, this script automatically destroy antiadblock windows. I would prefer to show a donate button instead of forcing Ads. Script tested with Tapermonkey, Chrome 76.

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         Aternos Minecraft Server Hosting ADBLOCKER
// @namespace    https://aternos.org/*
// @version      0.2
// @description  Great minecraft hosting, but it has adblocker detection, this script automatically destroy antiadblock windows. I would prefer to show a donate button instead of forcing Ads. Script tested with Tapermonkey, Chrome 76.
// @author       You
// @include      https://aternos.org/*
// @grant        none
// ==/UserScript==

(function() {
    // Your code here...
    let tries = 50

setTimeout(doClear,20);



    function doClear(){

            document.querySelectorAll('[style="display: none;"]').forEach(e => {e.style.display = ""})
            document.querySelectorAll(".ad-replacement").forEach(e => {e.parentElement.style.display = "none"})
            document.querySelector('.fas.fa-ban').parentElement.parentElement.parentElement.parentElement.style.display ="none";
          if(tries-- > 0){
            setTimeout(doClear,10);
     }
 }
    document.querySelector(" div > div > div:nth-child(2) > div:nth-child(3) > div.btn.btn-white").click();
})();