Last active
April 8, 2024 18:56
-
-
Save ErdbeerbaerLP/e76dbbf54d29fc7cad1be59506ff1104 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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 | |
})(); |
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!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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)