Last active
March 24, 2020 23:47
-
-
Save QuillzLouis/911e9fe033127c8d87ee to your computer and use it in GitHub Desktop.
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 BlockBlockAdBlock | |
// @namespace http://ipex.pw | |
// @version 0.1 | |
// @description Block the BlockAdBlock script | |
// @author Dylan Beswick | |
// @match *://*/* | |
// @grant none | |
// ==/UserScript== | |
/* jshint -W097 */ | |
//'use strict'; | |
var maxval = 100 | |
remove_script = function() { | |
console.log('[BlockBlockAdBlock] ready') | |
for (i = 0; i < 10000; i++) { | |
clearInterval(i); | |
clearTimeout(i); | |
} | |
console.log('[BlockBlockAdBlock] deleted intervals and timeouts.') | |
var p = document.body.innerHTML.split(/\n/g); | |
var lines = []; | |
var i; | |
for (i in p) { | |
try { | |
if (p[i].match(/((\|[\s\S])([A-Za-z1-10]*)\w+(\|[\s\S])([A-Za-z1-10]*)\w+)/g).length < maxval) { | |
lines.push(p[i])} | |
} | |
catch(e) { | |
lines.push(p[i]) | |
} | |
} | |
console.log('[BlockBlockAdBlock] found ' + (p.length - lines.length) + ' line(s) to delete') | |
document.body.innerHTML = lines.join('\n') | |
console.log('[BlockBlockAdBlock] ' + (p.length - lines.length) + ' line(s) removed') | |
} | |
remove_script() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment