No commit message
This commit is contained in:
parent
1b58de3e5f
commit
f1862bb7c4
@ -28,6 +28,8 @@ The performance difference might be noticable on some really old devices, as tec
|
|||||||
|
|
||||||
#### Step 2: Install Userscript
|
#### Step 2: Install Userscript
|
||||||
* [Click here to install](https://gitlab.com/xuhaiyang1234/AAK-Cont/raw/master/source/aak-cont-script.user.js)
|
* [Click here to install](https://gitlab.com/xuhaiyang1234/AAK-Cont/raw/master/source/aak-cont-script.user.js)
|
||||||
|
* If you are *NOT* using uBlock Origin, [click here](https://gitlab.com/xuhaiyang1234/AAK-Cont/raw/master/source/aak-cont-ubo-runtime.user.js)
|
||||||
|
to install uBlock Origin Runtime for AdBlock / Adblock Plus
|
||||||
|
|
||||||
> ##### Note: [Test: BlockAdBlock](https://blockadblock.com/) [Test: Antiblock](http://antiblock.org/?p=v3&demo)
|
> ##### Note: [Test: BlockAdBlock](https://blockadblock.com/) [Test: Antiblock](http://antiblock.org/?p=v3&demo)
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
@ -44,7 +44,8 @@
|
|||||||
|
|
||||||
<header class="header">
|
<header class="header">
|
||||||
<a name="top"></a>
|
<a name="top"></a>
|
||||||
<div class="logo animated bounceInDown"><img src="images/icon.png" />
|
<div class="logo animated bounceInDown">
|
||||||
|
<img src="images/icon.png" />
|
||||||
</div>
|
</div>
|
||||||
<div class="brand animated flipInY">Anti-Adblock Killer Continued</div>
|
<div class="brand animated flipInY">Anti-Adblock Killer Continued</div>
|
||||||
<div class="slogan animated flipInX">Let's revive our beloved Anti-Adblock Killer!</div>
|
<div class="slogan animated flipInX">Let's revive our beloved Anti-Adblock Killer!</div>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// @namespace https://userscripts.org/scripts/show/155840
|
// @namespace https://userscripts.org/scripts/show/155840
|
||||||
// @description Helps you keep your Ad-Blocker active, when you visit a website and it asks you to disable.
|
// @description Helps you keep your Ad-Blocker active, when you visit a website and it asks you to disable.
|
||||||
// @author Originally by Reek, revived by jspenguin2017
|
// @author Originally by Reek, revived by jspenguin2017
|
||||||
// @version 1.004
|
// @version 1.005
|
||||||
// @encoding utf-8
|
// @encoding utf-8
|
||||||
// @license https://creativecommons.org/licenses/by-sa/4.0/
|
// @license https://creativecommons.org/licenses/by-sa/4.0/
|
||||||
// @icon https://gitlab.com/xuhaiyang1234/AAK-Cont/raw/master/images/icon.png
|
// @icon https://gitlab.com/xuhaiyang1234/AAK-Cont/raw/master/images/icon.png
|
||||||
@ -72,7 +72,7 @@
|
|||||||
|
|
||||||
var Aak = {
|
var Aak = {
|
||||||
name: 'Anti-Adblock Killer Continued',
|
name: 'Anti-Adblock Killer Continued',
|
||||||
version : '1.004',
|
version: '1.005',
|
||||||
scriptid: 'gJWEp0vB',
|
scriptid: 'gJWEp0vB',
|
||||||
homeURL: 'https://xuhaiyang1234.gitlab.io/AAK-Cont/',
|
homeURL: 'https://xuhaiyang1234.gitlab.io/AAK-Cont/',
|
||||||
changelogURL: 'https://xuhaiyang1234.gitlab.io/AAK-Cont/',
|
changelogURL: 'https://xuhaiyang1234.gitlab.io/AAK-Cont/',
|
||||||
@ -229,33 +229,6 @@
|
|||||||
Aak.addCommands(cmd);
|
Aak.addCommands(cmd);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
|
||||||
TM_setTimeout_defuser : function(niddle, delay) {
|
|
||||||
//https://github.com/uBlockOrigin/uAssets/blob/master/filters/resources.txt
|
|
||||||
var uBO_Solution = function(){
|
|
||||||
var z = window.setTimeout,
|
|
||||||
needle = '{{1}}',
|
|
||||||
delay = parseInt('{{2}}', 10);
|
|
||||||
if ( needle === ''){ // || needle === '{{1}}' ) {
|
|
||||||
needle = '.?';
|
|
||||||
} else if ( needle.slice(0,1) === '/' && needle.slice(-1) === '/' ) {
|
|
||||||
needle = needle.slice(1,-1);
|
|
||||||
} else {
|
|
||||||
needle = needle.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
||||||
}
|
|
||||||
needle = new RegExp(needle);
|
|
||||||
window.setTimeout = function(a, b) {
|
|
||||||
if ( (isNaN(delay) || b == delay) && needle.test(a.toString()) ) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return z(a, b);
|
|
||||||
}.bind(window);
|
|
||||||
};
|
|
||||||
|
|
||||||
var str = "(" + uBO_Solution.toString().replace(/\{\{1\}\}/, String(niddle)).replace(/\{\{2\}\}/, String(delay)) + ")();";
|
|
||||||
//console.log(str);
|
|
||||||
Aak.addScript(str);
|
|
||||||
|
|
||||||
},
|
},
|
||||||
registerConsole: function () {
|
registerConsole: function () {
|
||||||
this.log = Aak.opts.debug ? console.log.bind(console) : function () { };
|
this.log = Aak.opts.debug ? console.log.bind(console) : function () { };
|
||||||
@ -398,7 +371,8 @@ Aak.addScript(str);
|
|||||||
},
|
},
|
||||||
notification: function (message, delay) {
|
notification: function (message, delay) {
|
||||||
|
|
||||||
return; /*
|
return;
|
||||||
|
/*
|
||||||
|
|
||||||
if (Aak.isTopframe) {
|
if (Aak.isTopframe) {
|
||||||
|
|
||||||
@ -540,6 +514,7 @@ Aak.addScript(str);
|
|||||||
// Using remote server to allow cross-origin requests.
|
// Using remote server to allow cross-origin requests.
|
||||||
// doc: http://tinyurl.com/odz664a
|
// doc: http://tinyurl.com/odz664a
|
||||||
// doc: http://tinyurl.com/p9zruzn
|
// doc: http://tinyurl.com/p9zruzn
|
||||||
|
/*
|
||||||
var xhr = new window.XMLHttpRequest();
|
var xhr = new window.XMLHttpRequest();
|
||||||
xhr.open('POST', 'http://example.com/public/xhr.php', true);
|
xhr.open('POST', 'http://example.com/public/xhr.php', true);
|
||||||
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
|
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
|
||||||
@ -554,7 +529,7 @@ Aak.addScript(str);
|
|||||||
});
|
});
|
||||||
settings.onload(xhr);
|
settings.onload(xhr);
|
||||||
};
|
};
|
||||||
xhr.send(Aak.serialize(settings));
|
xhr.send(Aak.serialize(settings));*/
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deleteValue: function (name) {
|
deleteValue: function (name) {
|
||||||
@ -676,42 +651,6 @@ Aak.addScript(str);
|
|||||||
Aak.go(elem.href);
|
Aak.go(elem.href);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
|
||||||
abort_on_property_write: function(name){
|
|
||||||
var uboSol = function() {
|
|
||||||
var magic = String.fromCharCode(Date.now() % 26 + 97) +
|
|
||||||
Math.floor(Math.random() * 982451653 + 982451653).toString(36);
|
|
||||||
var prop = '{{1}}',
|
|
||||||
owner = window,
|
|
||||||
pos;
|
|
||||||
for (;;) {
|
|
||||||
pos = prop.indexOf('.');
|
|
||||||
if ( pos === -1 ) { break; }
|
|
||||||
owner = owner[prop.slice(0, pos)];
|
|
||||||
if ( owner instanceof Object === false ) { return; }
|
|
||||||
prop = prop.slice(pos + 1);
|
|
||||||
}
|
|
||||||
delete owner[prop];
|
|
||||||
Object.defineProperty(owner, prop, {
|
|
||||||
set: function() {
|
|
||||||
throw new ReferenceError(magic);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
var oe = window.onerror;
|
|
||||||
window.onerror = function(msg, src, line, col, error) {
|
|
||||||
if ( typeof msg === 'string' && msg.indexOf(magic) !== -1 ) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if ( oe instanceof Function ) {
|
|
||||||
return oe(msg, src, line, col, error);
|
|
||||||
}
|
|
||||||
}.bind();
|
|
||||||
}
|
|
||||||
|
|
||||||
var text = "(" + uboSol.toString().replace("{{1}}", String(name)) + ")()";
|
|
||||||
|
|
||||||
Aak.addScript(text);
|
|
||||||
|
|
||||||
},
|
},
|
||||||
unpackScript: function (source) {
|
unpackScript: function (source) {
|
||||||
// deobfuscate: pac+ked, pac+ker, mun+ged, wi+se
|
// deobfuscate: pac+ked, pac+ker, mun+ged, wi+se
|
||||||
@ -1004,6 +943,9 @@ Aak.addScript(str);
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
fakeFuckAdBlock: function (instanceName, className) {
|
fakeFuckAdBlock: function (instanceName, className) {
|
||||||
|
//This implementation has 2 flaws:
|
||||||
|
//1. The property can be redefined (no configurable: false)
|
||||||
|
//2. This can crash some scripts making the whole page break
|
||||||
|
|
||||||
// inject fake fuckadbluck
|
// inject fake fuckadbluck
|
||||||
Aak.addScript(Aak.intoString(function () {
|
Aak.addScript(Aak.intoString(function () {
|
||||||
@ -1070,8 +1012,7 @@ Aak.addScript(str);
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}).replace(/INSTANCENAME/g, instanceName || 'fuckAdBlock')
|
}).replace(/INSTANCENAME/g, instanceName || 'fuckAdBlock').replace(/CLASSNAME/g, className || 'FuckAdBlock'));
|
||||||
.replace(/CLASSNAME/g, className || 'FuckAdBlock'));
|
|
||||||
|
|
||||||
}, // Events
|
}, // Events
|
||||||
onEvent: function (element, type, listener, bubbles) {
|
onEvent: function (element, type, listener, bubbles) {
|
||||||
@ -1469,7 +1410,7 @@ Aak.addScript(str);
|
|||||||
// GrindPlayer 1 (flash)
|
// GrindPlayer 1 (flash)
|
||||||
// setup: http://osmfhls.kutu.ru/docs/grind/
|
// setup: http://osmfhls.kutu.ru/docs/grind/
|
||||||
// support: hls, rtmp
|
// support: hls, rtmp
|
||||||
|
/*
|
||||||
this.getTargetNode(id);
|
this.getTargetNode(id);
|
||||||
this.args = arguments;
|
this.args = arguments;
|
||||||
this.attributes = Aak.setProperties(this.attributes, attributes || {});
|
this.attributes = Aak.setProperties(this.attributes, attributes || {});
|
||||||
@ -1497,6 +1438,7 @@ Aak.addScript(str);
|
|||||||
this.attributes.flashvars = Aak.serialize(this.setup);
|
this.attributes.flashvars = Aak.serialize(this.setup);
|
||||||
|
|
||||||
this.building('embed');
|
this.building('embed');
|
||||||
|
*/
|
||||||
},
|
},
|
||||||
vlc: function (id, setup, attributes, options) {
|
vlc: function (id, setup, attributes, options) {
|
||||||
// VLC Web Plugin (plugin)
|
// VLC Web Plugin (plugin)
|
||||||
@ -2115,13 +2057,6 @@ Aak.addScript(str);
|
|||||||
append: document.documentElement
|
append: document.documentElement
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
|
||||||
thewindowsclub_com:{
|
|
||||||
host: ['thewindowsclub.com'],
|
|
||||||
onStart: function(){
|
|
||||||
Aak.TM_setTimeout_defuser("[native code]");
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
},
|
||||||
stream4free_eu: {
|
stream4free_eu: {
|
||||||
host: ['stream4free.eu'],
|
host: ['stream4free.eu'],
|
||||||
@ -4168,9 +4103,6 @@ Aak.addScript(str);
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
kbb_com:{
|
|
||||||
host:["kbb.com"],onStart: function(){Aak.abort_on_property_write("KBB.DetectBlockerExtensions");}
|
|
||||||
},
|
|
||||||
ipla_tv: {
|
ipla_tv: {
|
||||||
// by: Marek
|
// by: Marek
|
||||||
// solution: http://tinyurl.com/ptb4ybg
|
// solution: http://tinyurl.com/ptb4ybg
|
||||||
|
@ -20,7 +20,12 @@
|
|||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
var util = {
|
var util = {
|
||||||
dropScript: function(txt){
|
dropScript: function (txt, scriptDropMode) {
|
||||||
|
//scriptDropMode: undefined = autodetect, 1 for force eval, 2 for force drop element
|
||||||
|
var forceEval = function (txt) {
|
||||||
|
unsafeWindow.eval(txt);
|
||||||
|
};
|
||||||
|
var forceDrop = function (txt) {
|
||||||
var script = document.createElement('script');
|
var script = document.createElement('script');
|
||||||
script.type = "text/javascript";
|
script.type = "text/javascript";
|
||||||
script.innerHTML = "(" + String(txt) + ")();";
|
script.innerHTML = "(" + String(txt) + ")();";
|
||||||
@ -30,10 +35,50 @@
|
|||||||
document.head.appendChild(script);
|
document.head.appendChild(script);
|
||||||
}
|
}
|
||||||
script.remove();
|
script.remove();
|
||||||
|
};
|
||||||
|
if (!scriptDropMode) {
|
||||||
|
if (unsafeWindow && util.getScriptManager() === "Tampermonkey") {
|
||||||
|
forceEval(txt);
|
||||||
|
} else {
|
||||||
|
forceDrop(txt);
|
||||||
|
}
|
||||||
|
} else if (scriptDropMode === 1) {
|
||||||
|
forceEval(txt);
|
||||||
|
} else {
|
||||||
|
forceDrop(txt);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getScriptManager: function () {
|
||||||
|
if (typeof GM_info == 'object') {
|
||||||
|
// Greasemonkey (Firefox)
|
||||||
|
if (typeof GM_info.uuid != 'undefined') {
|
||||||
|
return 'Greasemonkey';
|
||||||
|
} // Tampermonkey (Chrome/Opera)
|
||||||
|
else if (typeof GM_info.scriptHandler != 'undefined') {
|
||||||
|
return 'Tampermonkey';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Scriptish (Firefox)
|
||||||
|
if (typeof GM_getMetadata == 'function') {
|
||||||
|
return 'Scriptish';
|
||||||
|
} // NinjaKit (Safari/Chrome)
|
||||||
|
else if (typeof GM_setValue != 'undefined' &&
|
||||||
|
typeof GM_getResourceText == 'undefined' &&
|
||||||
|
typeof GM_getResourceURL == 'undefined' &&
|
||||||
|
typeof GM_openInTab == 'undefined' &&
|
||||||
|
typeof GM_setClipboard == 'undefined') {
|
||||||
|
return 'NinjaKit';
|
||||||
|
} else { // Native
|
||||||
|
return 'Native';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
domCmp: function (domain) {
|
||||||
|
return domain === location.hostname || location.hostname.endsWith("." + domain);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var ubo = {
|
var ubo = {
|
||||||
setTimeout_defuser: function(niddle, delay){
|
setTimeout_defuser: function (niddle, delay, scriptDropMode) {
|
||||||
var uSol = function () {
|
var uSol = function () {
|
||||||
var z = window.setTimeout,
|
var z = window.setTimeout,
|
||||||
needle = '{{1}}',
|
needle = '{{1}}',
|
||||||
@ -53,12 +98,103 @@
|
|||||||
return z(a, b);
|
return z(a, b);
|
||||||
}.bind(window);
|
}.bind(window);
|
||||||
};
|
};
|
||||||
var str = String(uSol).replace("{{1}}", String(niddle)).replace("{{2}}", String(delay));
|
var str = String(uSol).replace("{{1}}", String(niddle || "")).replace("{{2}}", String(delay));
|
||||||
util.dropScript(str);
|
util.dropScript(str, scriotDropMode);
|
||||||
|
},
|
||||||
|
abort_on_property_read: function (niddle, scriptDropMode) {
|
||||||
|
var uSol = function () {
|
||||||
|
var magic = String.fromCharCode(Date.now() % 26 + 97) +
|
||||||
|
Math.floor(Math.random() * 982451653 + 982451653).toString(36);
|
||||||
|
var abort = function () {
|
||||||
|
throw new ReferenceError(magic);
|
||||||
|
};
|
||||||
|
var chain = '{{1}}', owner = window, pos, desc;
|
||||||
|
var makeProxy = function (owner, chain) {
|
||||||
|
pos = chain.indexOf('.');
|
||||||
|
if (pos === -1) {
|
||||||
|
desc = Object.getOwnPropertyDescriptor(owner, chain);
|
||||||
|
if (!desc || desc.get !== abort) {
|
||||||
|
Object.defineProperty(owner, chain, { get: abort, set: function () { } });
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var prop = chain.slice(0, pos),
|
||||||
|
v = owner[prop];
|
||||||
|
chain = chain.slice(pos + 1);
|
||||||
|
if (v !== undefined) {
|
||||||
|
makeProxy(v, chain);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
desc = Object.getOwnPropertyDescriptor(owner, prop);
|
||||||
|
if (desc && desc.set && desc.set.hasOwnProperty(magic)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var setter = function (a) {
|
||||||
|
v = a;
|
||||||
|
if (a instanceof Object) {
|
||||||
|
makeProxy(a, chain);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
setter[magic] = undefined;
|
||||||
|
Object.defineProperty(owner, prop, {
|
||||||
|
get: function () { return v; },
|
||||||
|
set: setter
|
||||||
|
});
|
||||||
|
};
|
||||||
|
makeProxy(owner, chain);
|
||||||
|
var oe = window.onerror;
|
||||||
|
window.onerror = function (msg, src, line, col, error) {
|
||||||
|
if (typeof msg === 'string' && msg.indexOf(magic) !== -1) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (oe instanceof Function) {
|
||||||
|
return oe(msg, src, line, col, error);
|
||||||
|
}
|
||||||
|
}.bind();
|
||||||
|
};
|
||||||
|
var str = String(uSol).replace("{{1}}", String(niddle));
|
||||||
|
util.dropScript(str, scriotDropMode);
|
||||||
|
},
|
||||||
|
abort_on_property_write: function (niddle, scriptDropMode) {
|
||||||
|
var uSol = function () {
|
||||||
|
var magic = String.fromCharCode(Date.now() % 26 + 97) +
|
||||||
|
Math.floor(Math.random() * 982451653 + 982451653).toString(36);
|
||||||
|
var prop = '{{1}}',
|
||||||
|
owner = window,
|
||||||
|
pos;
|
||||||
|
for (; ;) {
|
||||||
|
pos = prop.indexOf('.');
|
||||||
|
if (pos === -1) { break; }
|
||||||
|
owner = owner[prop.slice(0, pos)];
|
||||||
|
if (owner instanceof Object === false) { return; }
|
||||||
|
prop = prop.slice(pos + 1);
|
||||||
|
}
|
||||||
|
delete owner[prop];
|
||||||
|
Object.defineProperty(owner, prop, {
|
||||||
|
set: function () {
|
||||||
|
throw new ReferenceError(magic);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
var oe = window.onerror;
|
||||||
|
window.onerror = function (msg, src, line, col, error) {
|
||||||
|
if (typeof msg === 'string' && msg.indexOf(magic) !== -1) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (oe instanceof Function) {
|
||||||
|
return oe(msg, src, line, col, error);
|
||||||
|
}
|
||||||
|
}.bind();
|
||||||
|
};
|
||||||
|
var str = String(uSol).replace("{{1}}", String(niddle));
|
||||||
|
util.dropScript(str, scriotDropMode);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
//Rules
|
||||||
|
if (util.domCmp("thewindowsclub.com")) {
|
||||||
|
ubo.setTimeout_defuser("[native code]");
|
||||||
|
}
|
||||||
|
if (util.domCmp("kbb.com")) {
|
||||||
|
ubo.abort_on_property_write("KBB.DetectBlockerExtensions");
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
Reference in New Issue
Block a user