From: chaoskagami Date: Wed, 11 May 2016 18:13:24 +0000 (-0400) Subject: 3dsthem.es implemented anti-aak. This is an a3ak. So meta. How many antis will it... X-Git-Url: https://chaos.moe/g/?a=commitdiff_plain;h=26c2a3525a1dc5150e6385f33efae9422355b468;p=misc%2Frandom-utils.git 3dsthem.es implemented anti-aak. This is an a3ak. So meta. How many antis will it go to? Who knows. That said, this works by taking over setinterval and rifling through the JS. --- diff --git a/userscripts/3dsthemes_anti3ak.user.js b/userscripts/3dsthemes_anti3ak.user.js new file mode 100644 index 0000000..803821f --- /dev/null +++ b/userscripts/3dsthemes_anti3ak.user.js @@ -0,0 +1,34 @@ +// ==UserScript== +// @name 3dsthemes_anti3ak +// @namespace chaoskagami +// @description God, that is one sick 15yr old +// @include https://3dsthem.es/* +// @version 1 +// @grant none +// @run-at document-start +// ==/UserScript== + +// Basically, what we do here is as follows: +// * Take over setinterval. +// * Make setinterval search through the function for an identifying characteristic. +// * Run the real setInterval if not found. + +// To 3dsthem.es - it is my choice as a user to use adblock. YOU HAVE NO RIGHT TO DICTATE THIS. +// Not to mention, you can't do this in the EU legally. + +window.oldInterval = window.setInterval; + +// See, we're a hack. We replace setinterval. +window.setInterval = function(fun, time) { + // This could have false positives, but w/e we'll fix it someday + var test = fun.toString().search("adblock"); + if (test > 0) { + console.log("Anti-AAK detected. Die in a fire."); + pageLoaded = true; + return 0; + } else { + console.log("Calling setInterval normally."); + return window.oldInterval(fun, time); + } + return 0; +};