Forked from peruihkxt/Admiral-AntiAdblock-Killer.user.js
Last active
March 2, 2025 20:17
Revisions
-
Zekfad revised this gist
Jun 12, 2021 . 1 changed file with 32 additions and 32 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,45 +1,45 @@ // ==UserScript== // @name Admiral AntiAdblock Killer // @version 0.3 // @description Admiral AntiAdblock Killer // @author Zekfad // @match https://*/* // @match http://*/* // @grant none // @updateURL https://gist.github.com/Zekfad/ed4f846bd51c8aff41f2cdaad24b21dd/raw/Admiral-AntiAdblock-Killer.user.js // ==/UserScript== (function() { window.setInterval(() => { 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. const aTags = document.getElementsByTagName("H3"); const searchText = "It looks like you're using an adblocker"; let found; for (let 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.toLowerCase() !== "body") { found = found.parentElement; } // Remove that stupid element found.remove(); console.info('Admiral AntiAdblock killed.'); // Enable the scrollbars again. document.getRootNode().children[0].style.overflow = null; document.getElementsByTagName("body")[0].style.overflow = null; } } }, 100); })(); -
peruihkxt renamed this gist
May 23, 2019 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,12 @@ // ==UserScript== // @name Admiral AntiAdblock Killer // @version 0.2 // @description // @author JeremyLee // @match https://*/* // @match http://*/* // @grant none // @updateURL https://gist.github.com/JeremyLee/2f7ffe2c7ef6576de36795dadaa2a535/raw/Admiral-AntiAdblock-Killer.user.js // ==/UserScript== (function() { -
peruihkxt revised this gist
May 23, 2019 . No changes.There are no files selected for viewing
-
peruihkxt revised this gist
May 23, 2019 . No changes.There are no files selected for viewing
-
peruihkxt revised this gist
May 23, 2019 . No changes.There are no files selected for viewing
-
peruihkxt revised this gist
May 23, 2019 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,12 @@ // ==UserScript== // @name Remove Admiral Anti-AdBlock // @version 0.2 // @description // @author JeremyLee // @match https://*/* // @match http://*/* // @grant none // @updateURL https://gist.github.com/JeremyLee/2f7ffe2c7ef6576de36795dadaa2a535/raw/Anti-AdmiralAAB.user.js // ==/UserScript== (function() { @@ -41,4 +42,4 @@ } } }, 100); })(); -
peruihkxt created this gist
May 23, 2019 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,44 @@ // ==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); })();