-
-
Save ErdbeerbaerLP/e76dbbf54d29fc7cad1be59506ff1104 to your computer and use it in GitHub Desktop.
// ==UserScript== | |
// | |
// Install with Tampermonkey or Greasemonkey | |
// | |
// @name Aternos Anti AdBlock Blocker | |
// @version 1.0.5 | |
// @description Blocks the anti ad block message and removes all red ad banners | |
// @author ErdbeerbaerLP | |
// @match https://aternos.org/* | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js | |
// @grant none | |
// @updateURL https://gist.github.com/ErdbeerbaerLP/e76dbbf54d29fc7cad1be59506ff1104/raw/Aternos%2520Anti%2520AdBlock%2520Blocker.user.js | |
// ==/UserScript== | |
(function() { | |
window.jQuery310 = $.noConflict(true); | |
function removeFilteredDivs(div){ | |
if(div.className !== "body" && !document.body.getElementsByClassName("body")[0].contains(div) && !document.body.getElementsByClassName("header")[0].contains(div) && !(div.classList == "" && div.id == "")){ | |
div.style = "display: none !important;" | |
} | |
} | |
function removeAllDivs(div){ | |
div.style = "display: none !important;" | |
} | |
function deStyle(elmt){ | |
if(elmt.classList.contains("ad") || elmt.classList == "" || elmt.id == "") return; | |
var styl = elmt.style; | |
if(styl.display === "none") styl.setProperty("display", "initial"); | |
console.log(styl.important); | |
styl.setProperty("important", "initial"); | |
elmt.style = styl; | |
} | |
function main(){ | |
document.body.getElementsByClassName("header")[0].style = ""; | |
Array.prototype.slice.call(document.body.getElementsByTagName("div")).forEach(removeFilteredDivs); | |
Array.prototype.slice.call(document.body.getElementsByClassName("ad")).forEach(removeAllDivs); | |
Array.prototype.slice.call(document.body.querySelectorAll('*')).forEach(deStyle); | |
} | |
function enableStart(){ | |
$('#start').each(function () { | |
this._ready = true; | |
}) | |
} | |
var interval = setInterval(main, 10); | |
function clearIv(){ | |
clearInterval(interval) | |
} | |
setTimeout(enableStart, 500); | |
setTimeout(clearIv,6000); //Stop processing that after 6 seconds | |
})(); |
Bug should be fixed
yes it was good but there is some update to the website
the anti adblock popup always annoy me
can you update the javascript?
I tried a while and could not yet find a way to fix that. (Mostly because of my currently pretty-much-not-working internet connection)
Try making a sort of auto-clicker that auto-clicks the "skip ads" button, and just hide the banner without destroying it.
@ErdbeerbaerLP Have you tried that?
it's work for me!
thanks!
just turn of the adblocker and it will done!
doesn't work
doesn't work
yeah, it's work for the first time but after that it's broken again...
do this in console and then enter
The developers track down these scripts and patch them, any public script is in danger of being patched.
I'd recommend building your own userscript using my guide here.
After much research without success of a working userscript, I decided to make my own anti anti-adblock. Give it a try!
To annoy Aternos devs it's obfuscated, also prevents easy patching. Sorry!
Really COOL! Works 100% fine! Thanks! But, this needs documentation: not everyone knows that this script has to be run with GreaseMonkey or Tampermonkey or similar...
Vote : 9/10
EDIT: No, not working: You can't start the server with it...