Forked from Zekfad/Admiral-AntiAdblock-Killer.user.js
Created
February 12, 2026 16:00
-
-
Save curiousstranger/23db3f6315f0ff4146f622518608f12c to your computer and use it in GitHub Desktop.
Kills the Admiral anti adblock nonsense. Just click on the *Raw* button to install the script into Tampermonkey.
This file contains hidden or 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== | |
| // @name Remove Admiral Anti-AdBlock | |
| // @version 0.1 | |
| // @description | |
| // @author JeremyLee | |
| // @match https://*/* | |
| // @match http://*/* | |
| // @grant none | |
| // ==/UserScript== | |
| (function() { | |
| window.setInterval(function(){ | |
| if(document.getRootNode().children[0].style.overflow === "hidden" && document.getElementsByTagName("body")[0].style.overflow === "hidden") { | |
| // Admiral Anti Adblock sets these properties when it activates. | |
| // Search for the keyword to make sure it's actually the admiral anti-adblock. We don't want to clear the above properties if it's part of the page design. | |
| var aTags = document.getElementsByTagName("H3"); | |
| var searchText = "Uh Oh...Adblocker detected!"; | |
| var found; | |
| for (var i = 0; i < aTags.length; i++) { | |
| if (aTags[i].textContent == searchText) { | |
| found = aTags[i]; | |
| break; | |
| } | |
| } | |
| if(found){ | |
| // Loop until we've found the topmost element that's part of admiral. | |
| while(found.parentElement.nodeName !== "BODY") { | |
| found = found.parentElement; | |
| } | |
| // Remove that stupid element | |
| found.remove() | |
| // Enable the scrollbars again. | |
| document.getRootNode().children[0].style.overflow = null | |
| document.getElementsByTagName("body")[0].style.overflow = null | |
| } | |
| } | |
| }, 100); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment