No commit message

This commit is contained in:
jspenguin2017 2017-05-26 22:01:52 -06:00
parent 1b58de3e5f
commit f1862bb7c4
4 changed files with 6156 additions and 6085 deletions

View File

@ -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)

View File

@ -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>
@ -91,7 +92,7 @@
<div class="content"> <div class="content">
<h3>Please head over to GitLab for install instructions</h3> <h3>Please head over to GitLab for install instructions</h3>
<p><a href="https://gitlab.com/xuhaiyang1234/AAK-Cont#installation-instruction" target="_blank">Click here!</a></p> <p><a href="https://gitlab.com/xuhaiyang1234/AAK-Cont#installation-instruction" target="_blank">Click here!</a></p>
<!-- <!--
<h3>Step 1</h3> <h3>Step 1</h3>
<div class="fieldset center"> <div class="fieldset center">
<h2>Browser (Script-Manager)</h2> <h2>Browser (Script-Manager)</h2>
@ -122,23 +123,23 @@
<section class="section animated bounceInRight"> <section class="section animated bounceInRight">
<div class="content"> <div class="content">
<h3>Step 1: Subscribe to Core filter</h3> <h3>Step 1: Subscribe to Core filter</h3>
<p><a href="abp:subscribe?location=https://gitlab.com/xuhaiyang1234/AAK-Cont/raw/master/source/aak-cont-filter-core.txt&title=AAK-Cont-Core-Filter">Click here</a></p> <p><a href="abp:subscribe?location=https://gitlab.com/xuhaiyang1234/AAK-Cont/raw/master/source/aak-cont-filter-core.txt&title=AAK-Cont-Core-Filter">Click here</a></p>
<h3>Step 2: Subscribe to the extension filter for your ad blocker</h3> <h3>Step 2: Subscribe to the extension filter for your ad blocker</h3>
<p><a href="abp:subscribe?location=https://gitlab.com/xuhaiyang1234/AAK-Cont/raw/master/source/aak-cont-filter-adblock-abp.txt&title=AAK-Cont-AdBlock-ABP-Extension-Filter">AdBlock or Adblock Plus Auto-disable (read notes below)</a></p> <p><a href="abp:subscribe?location=https://gitlab.com/xuhaiyang1234/AAK-Cont/raw/master/source/aak-cont-filter-adblock-abp.txt&title=AAK-Cont-AdBlock-ABP-Extension-Filter">AdBlock or Adblock Plus Auto-disable (read notes below)</a></p>
<p><a href="abp:subscribe?location=https://gitlab.com/xuhaiyang1234/AAK-Cont/raw/master/source/aak-cont-filter-ublock-origin.txt&title=AAK-Cont-uBlock-Origin-Extension-Filter">uBlock Origin</a></p> <p><a href="abp:subscribe?location=https://gitlab.com/xuhaiyang1234/AAK-Cont/raw/master/source/aak-cont-filter-ublock-origin.txt&title=AAK-Cont-uBlock-Origin-Extension-Filter">uBlock Origin</a></p>
<p><a href="abp:subscribe?location=https://gitlab.com/xuhaiyang1234/AAK-Cont/raw/master/source/aak-cont-filter-adguard.txt&title=AAK-Cont-Adguard-Extension-Filter">Adguard (not actively maintained)</a></p> <p><a href="abp:subscribe?location=https://gitlab.com/xuhaiyang1234/AAK-Cont/raw/master/source/aak-cont-filter-adguard.txt&title=AAK-Cont-Adguard-Extension-Filter">Adguard (not actively maintained)</a></p>
<p>If you are using Adguard, we highly recommend you to <i>NOT</i> use this project, and go to the Adguard forum for help. Your issue will be resolved much faster there.</p> <p>If you are using Adguard, we highly recommend you to <i>NOT</i> use this project, and go to the Adguard forum for help. Your issue will be resolved much faster there.</p>
<h3>Extra explanation about AdBlock / Adblock Plus extension filter</h3> <h3>Extra explanation about AdBlock / Adblock Plus extension filter</h3>
<div class="fieldset center"> <div class="fieldset center">
<p>For technical reasons, it is not always possible to block ads while breaking anti-adblock with only AdBlock / Adblock Plus. If you are using the Userscript (AAK-Cont Script), then <strong>do not</strong> subscribe to this filter.</p> <p>For technical reasons, it is not always possible to block ads while breaking anti-adblock with only AdBlock / Adblock Plus. If you are using the Userscript (AAK-Cont Script), then <strong>do not</strong> subscribe to this filter.</p>
<p>What this extension filter does is it turns AdBlock / Adblock Plus off for you when it is known that there is no other solution without the Userscript, if this is what you want, then subscribe to this extension filter.</p> <p>What this extension filter does is it turns AdBlock / Adblock Plus off for you when it is known that there is no other solution without the Userscript, if this is what you want, then subscribe to this extension filter.</p>
<p>This does not apply to uBlock Origin or Adguard, if you are using them, then subscribe to the extension filter.</p> <p>This does not apply to uBlock Origin or Adguard, if you are using them, then subscribe to the extension filter.</p>
</div> </div>
<!-- <!--
<h3>Step 2</h3> <h3>Step 2</h3>
<div class="fieldset center"> <div class="fieldset center">
<h2>Browser (Ad-Blocker)</h2> <h2>Browser (Ad-Blocker)</h2>
@ -155,7 +156,7 @@
</div> </div>
<p class="center"><a href="//github.com/reek/anti-adblock-killer/wiki/Add-or-update">How to add/update AakList ?</a></p> <p class="center"><a href="//github.com/reek/anti-adblock-killer/wiki/Add-or-update">How to add/update AakList ?</a></p>
--> -->
<h3>Compatible</h3> <h3>Compatible</h3>
<div class="fieldset center"> <div class="fieldset center">
<p>Adblock, Adblock Plus, uBlock Origin</p> <p>Adblock, Adblock Plus, uBlock Origin</p>
@ -287,7 +288,7 @@
</div> </div>
</section> </section>
<footer class="footer"> <footer class="footer">
<!-- <!--

File diff suppressed because it is too large Load Diff

View File

@ -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,35 +35,166 @@
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}}',
delay = parseInt('{{2}}', 10); delay = parseInt('{{2}}', 10);
if ( needle === ''){ // || needle === '{{1}}' ) { if (needle === '') { // || needle === '{{1}}' ) {
needle = '.?'; needle = '.?';
} else if ( needle.slice(0,1) === '/' && needle.slice(-1) === '/' ) { } else if (needle.slice(0, 1) === '/' && needle.slice(-1) === '/') {
needle = needle.slice(1,-1); needle = needle.slice(1, -1);
} else { } else {
needle = needle.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); needle = needle.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
} }
needle = new RegExp(needle); needle = new RegExp(needle);
window.setTimeout = function(a, b) { window.setTimeout = function (a, b) {
if ( (isNaN(delay) || b == delay) && needle.test(a.toString()) ) { if ((isNaN(delay) || b == delay) && needle.test(a.toString())) {
return 0; return 0;
} }
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");
} }
};
})(); })();