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.

  1. // ==UserScript==
  2. // @name Aternos Minecraft Server Hosting ADBLOCKER
  3. // @namespace https://aternos.org/*
  4. // @version 0.2
  5. // @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.
  6. // @author You
  7. // @include https://aternos.org/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. // Your code here...
  13. let tries = 50
  14.  
  15. setTimeout(doClear,20);
  16.  
  17.  
  18.  
  19. function doClear(){
  20.  
  21. document.querySelectorAll('[style="display: none;"]').forEach(e => {e.style.display = ""})
  22. document.querySelectorAll(".ad-replacement").forEach(e => {e.parentElement.style.display = "none"})
  23. document.querySelector('.fas.fa-ban').parentElement.parentElement.parentElement.parentElement.style.display ="none";
  24. if(tries-- > 0){
  25. setTimeout(doClear,10);
  26. }
  27. }
  28. document.querySelector(" div > div > div:nth-child(2) > div:nth-child(3) > div.btn.btn-white").click();
  29. })();