]> Chaos Git - misc/random-utils.git/commitdiff
3dsthem.es implemented anti-aak. This is an a3ak. So meta. How many antis will it...
authorchaoskagami <chaos.kagami@gmail.com>
Wed, 11 May 2016 18:13:24 +0000 (14:13 -0400)
committerchaoskagami <chaos.kagami@gmail.com>
Wed, 11 May 2016 18:13:24 +0000 (14:13 -0400)
That said, this works by taking over setinterval and rifling through the JS.

userscripts/3dsthemes_anti3ak.user.js [new file with mode: 0644]

diff --git a/userscripts/3dsthemes_anti3ak.user.js b/userscripts/3dsthemes_anti3ak.user.js
new file mode 100644 (file)
index 0000000..803821f
--- /dev/null
@@ -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;
+};