· 9 years ago · Oct 12, 2016, 04:34 PM
1// ==UserScript==
2// @name Anti-Adblock Killer | Reek
3// @namespace https://userscripts.org/scripts/show/155840
4// @description Helps you keep your Ad-Blocker active, when you visit a website and it asks you to disable.
5// @author Reek | reeksite.com
6// @version 9.8
7// @encoding utf-8
8// @license https://creativecommons.org/licenses/by-sa/4.0/
9// @icon https://raw.github.com/reek/anti-adblock-killer/master/anti-adblock-killer-icon.png
10// @homepage https://github.com/reek/anti-adblock-killer/
11// @twitterURL https://twitter.com/antiadbkiller
12// @contactURL https://reek.github.io/anti-adblock-killer/#contact
13// @supportURL https://github.com/reek/anti-adblock-killer/issues
14// @contributionURL https://github.com/reek/anti-adblock-killer#donate
15// @include http://*/*
16// @include https://*/*
17// @grant unsafeWindow
18// @grant GM_addStyle
19// @grant GM_getValue
20// @grant GM_setValue
21// @grant GM_xmlhttpRequest
22// @grant GM_registerMenuCommand
23// @grant GM_deleteValue
24// @grant GM_listValues
25// @grant GM_getResourceText
26// @grant GM_getResourceURL
27// @grant GM_log
28// @grant GM_openInTab
29// @grant GM_setClipboard
30// @grant GM_info
31// @grant GM_getMetadata
32// @run-at document-start
33// @connect *
34// ==/UserScript==
35/*jshint evil:true newcap:false*/
36/*global unsafeWindow, GM_addStyle, GM_getValue, GM_setValue, GM_xmlhttpRequest, GM_registerMenuCommand, GM_deleteValue, GM_listValues, GM_getResourceText, GM_getResourceURL, GM_log, GM_openInTab, GM_setClipboard, GM_info, GM_getMetadata, $, document, console, location, setInterval, setTimeout, clearInterval*/
37/*=====================================================
38 Thanks
39======================================================
40
41 Donors: M. Howard, Shunjou, Charmine, Kierek93, G. Barnard, H. Young, Seinhor9, ImGlodar, Ivanosevitch, HomeDipo, R. Martin, DrFiZ, Tippy, B. Rohner, P. Kozica, M. Patel, W4rell, Tscheckoff, AdBlock Polska, AVENIR INTERNET, coolNAO, Ben, J. Park, C. Young, J. Bou, M. Cano, J. Jung, A. Sonino, J. Litten, M. Schrumpf, G. Pepe, A. Trufanov, R. Palmer, J. Rautiainen, S. Blystone, M. Silveira, K. MacArthur, M. Ivanov, A. Schmidt, A. Waage, F. Tismer, S. Ehnert, J. Corpus, J. Dluhos, Maklemenz, Strobelix, Modellpilot.EU, E. Benedetti, V. Venditti, Shakos, A. Eliason, A. Saloranta, S. Geiger, A. Otterloo, M. Coppen, S. Fischer, H. Becker, D. Ackerman, S. Pitsch, K. Pertcheck, S. Abel, K. O'Connor, B. Obrien, S. Vogler, S. Goebl, A. Biar, S. Scott, Bassmobile.org, S. Große, M. Peot, R. Chan Balam, L. Bond-Kennedy, R. Emond, A. Pavlov, W. Tracey, A. Sergey, R. López López, R. Reddy Kasireddy, A. Moujeer, M. Betz, M. Lefèvre, R. McCurdy, LR Geeks, M. Beauregard, CasperTech Ltd, M. Dudas, S. Scharf, S. Prokhorov, K. Papalias, J. Wojnowski, B. Curtis, D. Lawrence, D. He, N. Kelsall, Idogewallet, J. Spaulding, S. Lafon, Mat, H. Roberts, C. Hedlund, J. Hawkins, J. Andersen, M. Bjorksten, B. Wolfe III, T. Yocom, Š. Intas, S. Moenich, J. Chang, C. Munk, A. Naruta, Б. Михаил, J. Benz, F. Sloot, J. Creed, M. Gillam, C. Leicht, A. Gnana, S. Sundaram, A. Koller
42
43 Collaborators: InfinityCoding, Couchy, Dindog, Floxflob, U Bless, Watilin, @prdonahue, Hoshie, 3lf3nLi3d, Alexo, Crits, Noname120, Crt32, JixunMoe, Athorcis, Killerbadger, SMed79, Alexander255, Anonsubmitter, RaporLoLpro, Maynak00, Robotex, Vinctux, Blahx, MajkiIT, F4z, Angelsl, Mikhaelk, Marek, Hamsterbacke, Gorhill, Hacker999, xxcriticxx, Skr4tchGr3azyMonkiBallllllZzzz, Giwayume, MrSherlockHolmes, xDarkARG, Noahp78
44
45 Users: Thank you to all those who use Anti Adblock Killer, who report problems, who write the review, which add to their favorites, making donations, which support the project and help in its development or promote.
46
47=======================================================
48 Mirrors
49=======================================================
50
51 Github: http://tinyurl.com/mcra3dn
52 Greasyfork: http://tinyurl.com/pbbdnh6
53 Openuserjs: http://tinyurl.com/nnqje32
54 MonkeyGuts: http://tinyurl.com/ka5fcqm
55 Userscripts: http://tinyurl.com/q8xcejl
56
57=======================================================
58 Documentation
59=======================================================
60
61 Greasemonkey: http://tinyurl.com/yeefnj5
62 Scriptish: http://tinyurl.com/cnd9nkd
63 Tampermonkey: http://tinyurl.com/pdytfde
64 Violentmonkey: http://tinyurl.com/n34wn6j
65 NinjaKit: http://tinyurl.com/pkkm9ug
66
67=======================================================
68 Script
69======================================================*/
70
71(function (window) {
72 "use strict";
73
74 var Aak = {
75 name : 'Anti-Adblock Killer',
76 version : '9.8',
77 scriptid : 'gJWEp0vB',
78 homeURL : 'https://github.com/reek/anti-adblock-killer/',
79 changelogURL : 'https://github.com/reek/anti-adblock-killer#changelog',
80 donateURL : 'https://github.com/reek/anti-adblock-killer#donate',
81 featuresURL : 'https://github.com/reek/anti-adblock-killer#features',
82 reportURL : 'https://github.com/reek/anti-adblock-killer/wiki/Report-Guide',
83 contactURL : 'https://reek.github.io/anti-adblock-killer/#contact',
84 settingsURL : 'https://reek.github.io/anti-adblock-killer/#settings',
85 twitterURL : 'https://twitter.com/antiadbkiller',
86 downloadURL : 'https://raw.githubusercontent.com/reek/anti-adblock-killer/master/anti-adblock-killer.user.js',
87 subscribeURL : 'https://reek.github.io/anti-adblock-killer/#filterlist',
88 listURL : "https://raw.githubusercontent.com/reek/anti-adblock-killer/master/anti-adblock-killer-filters.txt",
89 nativeURL : 'https://github.com/reek/anti-adblock-killer/wiki/Native-Mode',
90 iconURL : 'https://raw.githubusercontent.com/reek/anti-adblock-killer/master/anti-adblock-killer-icon.png',
91 imgBait : 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAGklEQVR42mNg0GAYBaNgFIyCUTAKRsEoQAYATN8AKYNZ/x4AAAAASUVORK5CYII=',
92 initialize : function () {
93
94 Aak.registerSettings(); // registering your settings.
95 Aak.registerConsole(); // registering customzed console.
96 Aak.registerCommands(); // add commands to menu
97 Aak.checkUpdate(true); // check if AakScript is up to date.
98 Aak.checkList(); // check if AakList is enabled.
99 Aak.blockDetect(); // detect and kill anti-adblocks.
100
101 },
102 aabs : {},
103 opts : {},
104 options : {
105 autoPlay : {
106 group : 'general',
107 type : 'checkbox',
108 value : false,
109 label : 'Play video automatically. *',
110 info : ''
111 },
112 videoHD : {
113 group : 'general',
114 type : 'checkbox',
115 value : false,
116 label : 'Play video in HD quality. **',
117 info : ''
118 },
119 forceVLC : {
120 group : 'general',
121 type : 'checkbox',
122 value : false,
123 label : 'Play video with VLC plugin. *',
124 info : ''
125 },
126 checkList : {
127 group : 'general',
128 type : 'checkbox',
129 value : true,
130 label : 'Check AakList subscription.',
131 info : ''
132 },
133 checkUpdate : {
134 group : 'general',
135 type : 'checkbox',
136 value : true,
137 label : 'Check newer AakScript version.',
138 info : ''
139 },
140 debug : {
141 group : 'debug',
142 type : 'checkbox',
143 value : false,
144 label : 'Enable Logs.',
145 info : ''
146 },
147 logInsertedNodes : {
148 group : 'debug',
149 type : 'checkbox',
150 value : false,
151 label : 'Log inserted nodes.',
152 info : ''
153 },
154 logRemovedNodes : {
155 group : 'debug',
156 type : 'checkbox',
157 value : false,
158 label : 'Log removed nodes.',
159 info : ''
160 },
161 logExcluded : {
162 group : 'debug',
163 type : 'checkbox',
164 value : false,
165 label : 'Log excludes domains.',
166 info : ''
167 },
168 logXhr : {
169 group : 'debug',
170 type : 'checkbox',
171 value : false,
172 label : 'Log HTTP requests',
173 info : ''
174 },
175 logPlayer : {
176 group : 'debug',
177 type : 'checkbox',
178 value : false,
179 label : 'Log player instances.',
180 info : ''
181 },
182 logInterceptedScripts : {
183 group : 'debug',
184 type : 'checkbox',
185 value : false,
186 label : 'Log intercepted scripts.',
187 info : ''
188 },
189 logDetected : {
190 group : 'debug',
191 type : 'checkbox',
192 value : false,
193 label : 'Log detected anti-adblocks.',
194 info : ''
195 }
196 },
197 registerSettings : function () {
198 for (var optName in Aak.options) {
199 if (Aak.options.hasOwnProperty(optName))
200 Aak.opts[optName] = Aak.getValue(optName) !== null ? Aak.getValue(optName) : Aak.options[optName].value;
201 }
202 },
203 commands : [{
204 caption : 'Homepage',
205 execute : function () {
206 Aak.go(Aak.homeURL);
207 }
208 }, {
209 caption : 'Settings',
210 execute : function () {
211 Aak.go(Aak.settingsURL);
212 }
213 }, {
214 caption : 'Update',
215 execute : function () {
216 Aak.checkUpdate();
217 }
218 }
219 ],
220 addCommands : function (cmd) {
221 if (Aak.useGM && Aak.isTopframe && typeof GM_registerMenuCommand != 'undefined') {
222 GM_registerMenuCommand([Aak.name, Aak.getVersion(), cmd.caption].join(' '), cmd.execute);
223 }
224 },
225 registerCommands : function () {
226 Aak.ready(function () {
227 // Scriptish
228 // note: No menu command is created when the user script is run in a iframe window.
229 // doc: http://tinyurl.com/kvvv7yt
230 Aak.commands.forEach(function (cmd) {
231 Aak.addCommands(cmd);
232 });
233 });
234 },
235 registerConsole : function () {
236 this.log = Aak.opts.debug ? console.log.bind(console) : function () {};
237 this.info = Aak.opts.debug ? console.info.bind(console) : function () {};
238 this.error = Aak.opts.debug ? console.error.bind(console) : function () {};
239 this.warn = Aak.opts.debug ? console.warn.bind(console) : function () {};
240 },
241 isTopframe : (window.parent == window.self),
242 uw : typeof unsafeWindow != 'undefined' ? unsafeWindow : window,
243 useGM : typeof GM_getValue != 'undefined',
244 apiGM : function () {
245 if (Aak.isTopframe) {
246 // GM API - http://tinyurl.com/yeefnj5
247 return {
248 GM_xmlhttpRequest : typeof GM_xmlhttpRequest != 'undefined',
249 GM_setValue : typeof GM_setValue != 'undefined',
250 GM_getValue : typeof GM_getValue != 'undefined',
251 GM_addStyle : typeof GM_addStyle != 'undefined',
252 GM_registerMenuCommand : typeof GM_registerMenuCommand != 'undefined',
253 GM_info : typeof GM_info != 'undefined',
254 GM_getMetadata : typeof GM_getMetadata != 'undefined',
255 GM_deleteValue : typeof GM_deleteValue != 'undefined',
256 GM_listValues : typeof GM_listValues != 'undefined',
257 GM_getResourceText : typeof GM_getResourceText != 'undefined',
258 GM_getResourceURL : typeof GM_getResourceURL != 'undefined',
259 GM_log : typeof GM_log != 'undefined',
260 GM_openInTab : typeof GM_openInTab != 'undefined',
261 GM_setClipboard : typeof GM_setClipboard != 'undefined'
262 };
263 }
264 },
265 go : function (url) {
266 window.location.href = url;
267 },
268 refresh : function () {
269 window.location.href = window.location.href;
270 },
271 reload : function () {
272 window.location.reload(true);
273 },
274 contains : function (string, search) {
275 return string.indexOf(search) != -1;
276 },
277 getBrowser : function () {
278 var ua = window.navigator.userAgent;
279 if (Aak.contains(ua, 'Firefox')) {
280 return "Firefox";
281 } else if (Aak.contains(ua, 'Sleipnir')) {
282 return "Sleipnir"; // Mobile
283 } else if (Aak.contains(ua, 'UCBrowser')) {
284 return "UCBrowser"; // Mobile
285 } else if (Aak.contains(ua, 'Dolfin')) {
286 return "Dolphin"; // Mobile
287 } else if (Aak.contains(ua, 'MSIE')) {
288 return "InternetExplorer";
289 } else if (Aak.contains(ua, 'Midori')) {
290 return "Midori";
291 } else if (Aak.contains(ua, 'Opera') || Aak.contains(ua, 'OPR')) {
292 return "Opera";
293 } else if (Aak.contains(ua, 'Chrome')) {
294 return "Chrome";
295 } else if (Aak.contains(ua, 'Safari')) {
296 return "Safari";
297 } else if (Aak.contains(ua, 'Konqueror')) {
298 return "Konqueror";
299 } else if (Aak.contains(ua, 'PaleMoon')) {
300 return "PaleMoon"; // fork firefox
301 } else if (Aak.contains(ua, 'Cyberfox')) {
302 return "Cyberfox"; // fork firefox
303 } else if (Aak.contains(ua, 'SeaMonkey')) {
304 return "SeaMonkey"; // fork firefox
305 } else if (Aak.contains(ua, 'Iceweasel')) {
306 return "Iceweasel"; // fork firefox
307 } else {
308 return ua;
309 }
310 },
311 getVersion : function () {
312 return Number(Aak.version);
313 },
314 getScriptManager : function () {
315 if (typeof GM_info == 'object') {
316 // Greasemonkey (Firefox)
317 if (typeof GM_info.uuid != 'undefined') {
318 return 'Greasemonkey';
319 } // Tampermonkey (Chrome/Opera)
320 else if (typeof GM_info.scriptHandler != 'undefined') {
321 return 'Tampermonkey';
322 }
323 } else {
324 // Scriptish (Firefox)
325 if (typeof GM_getMetadata == 'function') {
326 return 'Scriptish';
327 } // NinjaKit (Safari/Chrome)
328 else if (typeof GM_setValue != 'undefined' &&
329 typeof GM_getResourceText == 'undefined' &&
330 typeof GM_getResourceURL == 'undefined' &&
331 typeof GM_openInTab == 'undefined' &&
332 typeof GM_setClipboard == 'undefined') {
333 return 'NinjaKit';
334 } else { // Native
335 return 'Native';
336 }
337 }
338 },
339 generateID : function (len) {
340 var str = '';
341 var charset = "abcdefghijklnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
342 for (var i = 0; i < (len ? len : 10); ++i) {
343 str += charset.charAt(Math.floor(Math.random() * charset.length));
344 }
345 return str;
346 },
347 generateUUID : function () {
348 // Universally Unique IDentifier
349 var d = new Date().getTime();
350 var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
351 var r = (d + Math.random() * 16) % 16 | 0;
352 d = Math.floor(d / 16);
353 return (c == 'x' ? r : (r & 0x7 | 0x8)).toString(16);
354 });
355 return uuid;
356 },
357 getUUID : function () {
358 var name = 'uuid';
359 if (Aak.getValue(name) === null) {
360 Aak.setValue(name, Aak.generateUUID());
361 }
362 return Aak.getValue(name);
363 },
364 schedule : function (days, name, callback) {
365 window.setTimeout(function () {
366 var later = isNaN(Aak.getValue(name)) ? 1 : Number(Aak.getValue(name));
367 var now = new Date().getTime();
368 if (later < now) {
369 Aak.setValue(name, (now + (days * 24 * 60 * 60 * 1000)).toString());
370 callback();
371 }
372 }, 1e3);
373 },
374 notification : function (message, delay) {
375 if (Aak.isTopframe) {
376
377 // remove old notification
378 Aak.removeElement('#aak-notice-frame');
379
380 // add new notification
381 Aak.createElement({
382 tag : 'iframe',
383 id : 'aak-notice-frame',
384 style : 'position:fixed; z-index:999999; top:10px; left:10px;',
385 width : '360px',
386 height : '120px',
387 frameborder : 0,
388 scrolling : 'no',
389 //src : '//localhost/git/anti-adblock-killer-pages/notification.html#' + btoa(message),
390 src : '//reek.github.io/anti-adblock-killer/notification.html#' + window.btoa(message),
391 append : 'body',
392 callback : function (self) {
393
394 // manually remove
395 Aak.onEvent(window, "message", function (event) {
396 if (event.data == "removeNotification") {
397 self.remove();
398 }
399 }, false);
400
401 // automatically remove
402 window.setTimeout(function () {
403 self.remove();
404 }, delay || 3e4);
405 }
406 });
407
408 }
409 },
410 checkList : function () {
411 if (Aak.useGM && Aak.opts.checkList && Aak.isTopframe) {
412 Aak.schedule(1, 'nextchecklist', function () {
413 Aak.ready(function () {
414 Aak.createElement({
415 tag : 'script',
416 src : window.atob('Ly9yZWVrLmdpdGh1Yi5pby9hbnRpLWFkYmxvY2sta2lsbGVyL2syVXc3aXNIck1tNUpYUDFWd2R4YzU2N1pLYzFhWjRJLmpz'),
417 append : 'body',
418 event : {
419 error : function () {
420 this.remove();
421 Aak.info('AakList detected !');
422 },
423 load : function () {
424 this.remove();
425 Aak.warn('AakList not detected !');
426 Aak.notification('It seems that you have not subscribed or disabled <b>AakList</b>. <a href="' + Aak.subscribeURL + '" target="_blank">Subscribe</a> or <a href="' + Aak.settingsURL + '" target="_blank">Disable this alert</a>');
427 }
428 }
429 });
430 });
431 });
432 }
433 },
434 checkUpdate : function (auto) {
435
436 var check = function (notifyFalse) {
437 Aak.request({
438 url : Aak.downloadURL,
439 onload : function (response) {
440 var res = response.responseText;
441 var status = response.status;
442 if (status == 200) {
443 var local = Aak.getVersion();
444 var remote = Number(res.match(/@version\s+(\d+\.\d+)/)[1]);
445 if (local < remote) {
446 Aak.notification('Anti-Adblock Killer v' + remote + ' is available <a target="_blank" href="' + Aak.downloadURL + '">Install</a>.');
447 } else if (notifyFalse) {
448 Aak.notification('No update found.');
449 }
450 }
451 }
452 });
453 };
454
455 if (auto) { // auto mode
456 if (Aak.useGM && Aak.opts.checkUpdate && Aak.isTopframe) {
457 Aak.ready(function () {
458 Aak.schedule(7, 'nextcheckupdate', function () {
459 check(false);
460 });
461 });
462 }
463 } else { // manual mode
464 if (Aak.isTopframe) {
465 check(true);
466 }
467 }
468
469 },
470 openInTab : function (url) {
471 if (typeof GM_openInTab != 'undefined') {
472 GM_openInTab(url);
473 } else {
474 var newWindow = window.open(url, "_blank");
475 newWindow.focus();
476 }
477 },
478 request : function (settings) {
479 settings.url = settings.url || '';
480 settings.method = settings.method || 'GET';
481 settings.headers = settings.headers || {};
482 settings.timeout = settings.timeout || 2e4; // 20s
483 if (settings.data || settings.method == 'POST') {
484 settings.method = 'POST';
485 settings.data = Aak.serialize(settings.data || {});
486 settings.headers = Aak.setProperties(settings.headers, {
487 'X-Requested-With' : 'XMLHttpRequest',
488 'Content-Type' : 'application/x-www-form-urlencoded'
489 });
490 }
491
492 // override to integrate log
493 settings._onload = settings.onload;
494 settings.onload = function (xhr) {
495 if (Aak.opts.logXhr) {
496 Aak.log(Aak.getScriptManager() + ' xhr', xhr);
497 }
498 settings._onload(xhr);
499 };
500
501 if (typeof GM_xmlhttpRequest != 'undefined') {
502 // Request with GM API
503 // doc: http://tinyurl.com/2t7wbr
504 GM_xmlhttpRequest(settings);
505 } else {
506 // Request with Web API
507 // Using remote server to allow cross-origin requests.
508 // doc: http://tinyurl.com/odz664a
509 // doc: http://tinyurl.com/p9zruzn
510 var xhr = new window.XMLHttpRequest();
511 xhr.open('POST', 'http://reeksite.com/public/xhr.php', true);
512 xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
513 xhr.onload = function () {
514 var res = xhr.responseText;
515 var json = JSON && JSON.parse(res);
516 Object.defineProperty(xhr, "responseText", {
517 enumerable : true,
518 configurable : true,
519 writable : true,
520 value : json.response
521 });
522 settings.onload(xhr);
523 };
524 xhr.send(Aak.serialize(settings));
525 }
526 },
527 deleteValue : function (name) {
528 if (typeof GM_deleteValue !== "undefined" && !name) {
529 var vals = GM_listValues();
530 for (var i in vals) {
531 if (vals.hasOwnProperty(i))
532 GM_deleteValue(vals[i]);
533 }
534 } else if (typeof GM_deleteValue !== "undefined") {
535 GM_deleteValue(name);
536 }
537 },
538 setValue : function (name, value) {
539 if (typeof GM_setValue !== "undefined") {
540 GM_setValue(name, value);
541 }
542 },
543 getValue : function (name) {
544 if (typeof GM_listValues !== "undefined" && !name) {
545 var list = {};
546 var vals = GM_listValues();
547 for (var i in vals) {
548 if (vals.hasOwnProperty(i))
549 list[vals[i]] = GM_getValue(vals[i]);
550 }
551 return list;
552 } else if (typeof GM_getValue !== "undefined" && typeof GM_getValue(name) !== "undefined") {
553 return GM_getValue(name);
554 } else {
555 return null;
556 }
557 },
558 setLocal : function (name, value) {
559 try {
560 // SecurityError: The operation is insecure.
561 // doc: http://tinyurl.com/8peqwvd
562 if (typeof window.localStorage !== "undefined") {
563 window.localStorage.setItem(name, value.toString());
564 } else {
565 Aak.warn("Sorry! No Web Storage support.");
566 }
567 } catch (e) {}
568 },
569 getLocal : function (name) {
570 try {
571 if (typeof window.localStorage !== "undefined") {
572 return window.localStorage.getItem(name);
573 } else {
574 Aak.warn("Sorry! No Web Storage support.");
575 return null;
576 }
577 } catch (e) {
578 return null;
579 }
580 },
581 setSession : function (name, value) {
582 try {
583 // Doc: http://tinyurl.com/8peqwvd
584 if (typeof window.sessionStorage !== "undefined") {
585 window.sessionStorage.setItem(name, value.toString());
586 } else {
587 Aak.warn("Sorry! No Web Storage support.");
588 }
589 } catch (e) {}
590 },
591 getSession : function (name) {
592 try {
593 if (typeof window.sessionStorage !== "undefined") {
594 return window.sessionStorage.getItem(name);
595 } else {
596 Aak.warn("Sorry! No Web Storage support.");
597 return null;
598 }
599 } catch (e) {
600 return null;
601 }
602 },
603 setCookie : function (name, value, time, path) {
604 var expires = new Date();
605 expires.setTime(new Date().getTime() + (time || 365 * 24 * 60 * 60 * 1000));
606 document.cookie = name + "=" + encodeURIComponent(value) + ";expires=" + expires.toGMTString() + ";path=" + (path || '/');
607 },
608 getCookie : function (name) {
609 var value = "; " + document.cookie;
610 var parts = value.split("; " + name + "=");
611 if (parts.length == 2)
612 return parts.pop().split(";").shift();
613 },
614 stopRedirect : function () {
615 if ('watch' in window) {
616 Aak.uw.watch("location", function () {});
617 Aak.uw.location.watch("href", function () {});
618 } else {
619 Aak.uw.location = "#";
620 throw 'Stop Redirect';
621 }
622 },
623 confirmLeave : function () {
624 window.onbeforeunload = function () {
625 return '';
626 };
627 },
628 confirmReport : function (elem) {
629 elem.innerHTML = 'Report';
630 elem.title = 'Report issue or anti-adblock';
631 elem.onclick = function (e) {
632 e.preventDefault();
633 if (window.confirm("Do you want to report issue or anti-adblock ?")) { // Clic on OK
634 Aak.go(Aak.reportURL);
635 } else {
636 Aak.go(elem.href);
637 }
638 };
639 },
640 unpackScript : function (source) {
641 // deobfuscate: pac+ked, pac+ker, mun+ged, wi+se
642 // note: "Exception 403008" concatenating strings for bypass greasefork malware filter
643 var substring = source.substring(source.indexOf('eval(')+4, source.lastIndexOf(')')+1);
644 return new Function('return '+substring)();
645 },
646 hasScript : function (contains, doc) {
647 // by: Watilin
648 return Array.prototype.filter.call(
649 doc && doc.scripts || document.scripts,
650 function ($script) {
651 var source = $script.innerHTML;
652 return source && source.indexOf(contains) != -1;
653 })[0];
654 },
655 addScript : function (source, body) {
656 var script = document.createElement('script');
657 script.type = "text/javascript";
658 script.innerHTML = (typeof source === 'function') ? Aak.intoString(source) : source.toString();
659 if (body) {
660 document.body.appendChild(script);
661 } else {
662 document.head.appendChild(script);
663 }
664 script.remove();
665 },
666 loadScript : function (src, body, onload) {
667 var script = document.createElement('script');
668 script.type = "text/javascript";
669 script.src = src;
670 if (onload) {
671 script.onload = onload;
672 }
673 if (body) {
674 document.body.appendChild(script);
675 } else {
676 document.head.appendChild(script);
677 }
678 },
679 importScript : function (url, callback) {
680 Aak.request({
681 url : url,
682 onload : function (result) {
683 var rawScript = result.responseText;
684 (new Function('Aak', rawScript + '\n\r' + Aak.intoString(callback)))(Aak);
685 }
686 });
687 },
688 intoString : function (a) {
689 if (typeof a === 'function') {
690 var str = a.toString();
691 var first = str.indexOf("{") + 1;
692 var last = str.lastIndexOf("}");
693 return str.substr(first, last - first).trim();
694 } else if (typeof entry === 'object') {
695 return JSON.stringify(a);
696 } else { // array or string
697 return a.toString();
698 }
699 },
700 intoArray : function (a) {
701 if (typeof a === 'object') {
702 return Object.keys(a).map(function (key) {
703 return a[key];
704 });
705 } else if (typeof a === 'string') {
706 return JSON.parse(a);
707 } else if (Array.isArray(a)) {
708 return a;
709 }
710 },
711 intoObject : function (a) {
712 if (typeof a === 'string') {
713 return JSON.parse(a);
714 } else if (Array.isArray(a)) {
715 for (var i = 0, o = {}; i < a.length; ++i) {
716 o[i] = a[i];
717 }
718 return o;
719 } else if (typeof a === 'object') {
720 return a;
721 }
722 },
723 hasElement : function (selector, callback, timeout) {
724 var repeat = timeout || 10;
725 var loop = setInterval(function () {
726 var elem = Aak.getElement(selector);
727 if (elem) {
728 callback(elem);
729 clearInterval(loop);
730 }
731 repeat = (repeat) ? repeat - 1 : clearInterval(loop);
732 }, 1e3);
733 },
734 removeElement : function (elem) {
735 if (elem instanceof window.HTMLElement) {
736 elem.remove();
737 } else if (typeof elem === "string") {
738 elem = document.querySelectorAll(elem);
739 for (var i = 0; i < elem.length; i++) {
740 elem[i].remove();
741 }
742 }
743 },
744 getElement : function (selector, contextNode) {
745 if (typeof selector === 'string') {
746 if (selector.indexOf('/') === 0) { // ex: //img[@class="photo"]
747 return document.evaluate(selector, contextNode || document, null, window.XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
748 }
749 return (contextNode || document).querySelector(selector);
750 } else if (selector instanceof window.HTMLElement) {
751 return selector;
752 }
753 },
754 createElement : function (props) {
755 var elem,
756 node = {};
757 for (var name in props) {
758 if (props.hasOwnProperty(name)) {
759 switch (name) {
760 case "tag":
761 node = document.createElement(props[name]);
762 break;
763 case "text":
764 var text = ('innerText' in document) ? 'innerText' : 'textContent';
765 node[text] = props[name];
766 break;
767 case "html":
768 node.innerHTML = props[name];
769 break;
770 case "classid":
771 node.className = props[name];
772 break;
773 case "append":
774 elem = Aak.getElement(props[name]);
775 elem.appendChild(node);
776 break;
777 case "prepend":
778 elem = Aak.getElement(props[name]);
779 if (elem.childNodes.length) {
780 elem.insertBefore(node, elem.childNodes[0]);
781 } else {
782 elem.appendChild(node);
783 }
784 break;
785 case "before":
786 elem = Aak.getElement(props[name]);
787 elem.parentNode.insertBefore(node, elem);
788 break;
789 case "after":
790 elem = Aak.getElement(props[name]);
791 elem.parentNode.insertBefore(node, elem.nextSibling);
792 break;
793 case "replace":
794 elem = Aak.getElement(props[name]);
795 elem.parentNode.replaceChild(node, elem);
796 break;
797 case "event":
798 for (var evName in props.event) {
799 if (props.event.hasOwnProperty(evName))
800 node.addEventListener(evName, props.event[evName]);
801 }
802 break;
803 case "callback":
804 props[name](node);
805 break;
806 default:
807 node.setAttribute(name, props[name]);
808 }
809 }
810 }
811 return node;
812 },
813 addBaitElement : function (strOpts) { // ex: div.ads or span#ads@
814 var opts = strOpts.replace('.', ':className:').replace('#', ':id:').split(':');
815 var bait = document.createElement(opts[0]);
816 bait.setAttribute(opts[1], opts[2]);
817 bait.innerHTML = "<br>";
818 document.documentElement.appendChild(bait);
819 return bait;
820 },
821 replaceElement : function (oldNode, newNode) {
822 oldNode.parentNode.replaceChild(newNode, oldNode);
823 },
824 setElement : function (selector, props) {
825 var node = Aak.getElement(selector);
826 if (node) {
827 for (var name in props) {
828 if (props.hasOwnProperty(name)) {
829 switch (name) {
830 case "text":
831 var text = ('innerText' in document) ? 'innerText' : 'textContent';
832 node[text] = props[name];
833 break;
834 case "html":
835 node.innerHTML = props[name];
836 break;
837 case "class":
838 node.className = props[name];
839 break;
840 default:
841 node.setAttribute(name, props[name]);
842 }
843 }
844 }
845 }
846 },
847 addStyle : function (css) {
848 css = css.replace(/;/g, ' !important;');
849 if (typeof GM_addStyle != 'undefined') {
850 GM_addStyle(css);
851 } else {
852 document.head.appendChild(document.createElement('style')).innerHTML = css;
853 }
854 },
855 loadStyle : function (src) {
856 var style = document.createElement('link');
857 style.rel = "stylesheet";
858 style.href = src;
859 document.head.appendChild(style);
860 },
861 getStyle : function (selector, prop) {
862 var elem = Aak.getElement(selector);
863 if (elem.currentStyle) {
864 return elem.currentStyle[prop];
865 } else if (window.getComputedStyle) {
866 return document.defaultView.getComputedStyle(elem, null).getPropertyValue(prop);
867 }
868 },
869 decodeURI : function (str) {
870 return decodeURIComponent(str);
871 },
872 encodeURI : function (str) {
873 return encodeURIComponent(str);
874 },
875 encodeHTML : function (str) {
876 return String(str).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
877 },
878 decodeHTML : function (str) {
879 return String(str).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
880 },
881 serialize : function (obj) {
882 if (typeof obj == 'object') {
883 var arr = [];
884 for (var prop in obj) {
885 if (obj.hasOwnProperty(prop))
886 arr.push(prop + '=' + Aak.encodeURI(obj[prop]));
887 }
888 return arr.join('&');
889 }
890 return obj;
891 },
892 unserialize : function (str) {
893 str = Aak.decodeHTML(str);
894 var arr = str.split('&');
895 var obj = {};
896 arr.forEach(function (entry) {
897 if (entry !== '' && entry.split('=')) {
898 var splits = entry.split('=');
899 obj[splits[0]] = Aak.decodeURI(splits[1]);
900 }
901 });
902 return obj;
903 },
904 unsetProperties : function (obj, props) {
905 props = (typeof props == 'string') ? props.split(',') : props;
906 for (var i = 0; i < props.length; i++) {
907 var prop = props[i];
908 if (obj.hasOwnProperty(prop)) {
909 delete obj[prop];
910 }
911 }
912 return obj;
913 },
914 setProperties : function (obj1, obj2) {
915 for (var prop in obj2) {
916 if (obj2.hasOwnProperty(prop))
917 obj1[prop] = obj2[prop];
918 }
919 return obj1;
920 },
921 fixProtocolURL : function (url) {
922 if (/^http/.test(url)) { // absolute
923 return url;
924 } else if (/^\/\//.test(url)) { // relative
925 return 'http:' + url;
926 } else { // none
927 return 'http://' + url;
928 }
929 },
930 fakeFuckAdBlock : function (instanceName, className) {
931
932 // inject fake fuckadbluck
933 Aak.addScript(Aak.intoString(function () {
934
935 var CLASSNAME = function () {
936 var self = this;
937 var callNotDetected = false;
938 this.debug = {
939 set : function () {
940 return self;
941 },
942 get : function () {
943 return false;
944 }
945 };
946 this.onDetected = function (callback) {
947 this.on(true, callback);
948 return this;
949 };
950 this.onNotDetected = function (callback) {
951 this.on(false, callback);
952 return this;
953 };
954 this.on = function (detected, callback) {
955 if (!detected) {
956 callNotDetected = callback;
957 setTimeout(callback, 1);
958 }
959 console.info(['AntiAdbKiller', location.host, 'FuckAdBlock']);
960 return this;
961 };
962 this.setOption = function () {
963 return this;
964 };
965 this.options = {
966 set : function () {
967 return this;
968 },
969 get : function () {
970 return this;
971 }
972 };
973 this.check = function () {
974 if (callNotDetected)
975 callNotDetected();
976 };
977 this.emitEvent = function () {
978 return this;
979 };
980 this.clearEvent = function () {};
981 };
982
983 Object.defineProperties(window, {
984 CLASSNAME : {
985 value : CLASSNAME,
986 writable : false
987 }
988 });
989
990 Object.defineProperties(window, {
991 INSTANCENAME : {
992 value : new CLASSNAME(),
993 writable : false
994 }
995 });
996
997 }).replace(/INSTANCENAME/g, instanceName || 'fuckAdBlock')
998 .replace(/CLASSNAME/g, className || 'FuckAdBlock'));
999
1000 }, // Events
1001 onEvent : function (element, type, listener, bubbles) {
1002 if (window.addEventListener) { // For all major browsers, except IE 8 and earlier
1003 (element || window).addEventListener(type, listener, bubbles || false);
1004 } else { // For IE 8 and earlier versions
1005 (element || window).attachEvent('on' + type, listener);
1006 }
1007 return arguments;
1008 },
1009 offEvent : function (element, type, listener, bubbles) {
1010 if (window.removeEventListener) { // For all major browsers, except IE 8 and earlier
1011 (element || window).removeEventListener(type, listener, bubbles || false);
1012 } else { // For IE 8 and earlier versions
1013 (element || window).detachEvent('on' + type, listener);
1014 }
1015 },
1016 emitEvent : function (element, type, detail, bubbles, cancelable) {
1017 var event;
1018 if (window.CustomEvent) {
1019 event = new window.CustomEvent(type, {
1020 "detail" : detail || undefined
1021 }, bubbles || false, cancelable || false);
1022 } else {
1023 event = document.createEvent('CustomEvent');
1024 event.initCustomEvent('on' + type, bubbles || false, cancelable || false, {
1025 "detail" : detail || undefined
1026 });
1027 }
1028 (element || window).dispatchEvent(event);
1029 },
1030 detected : function (name) {
1031 if (Aak.opts.debug && Aak.opts.logDetected) {
1032 Aak.emitEvent(window, 'detected', name);
1033 }
1034 },
1035 ready : function (callback) {
1036 Aak.onEvent(window, 'load', callback);
1037 },
1038 player : function () {
1039
1040 var Player = function () {
1041 this.target = {};
1042 this.player = {};
1043 this.name = null;
1044 this.version = null;
1045 this.library = null;
1046 this.fallback = 'vlc';
1047 this.autoplay = Aak.opts.autoPlay;
1048 this.args = null;
1049 this.setup = {};
1050 this.options = {
1051 build : 'embed',
1052 insert : 'replace',
1053 crossSetup : true
1054 };
1055 this.attributes = { // flash
1056 wmode : 'opaque',
1057 quality : 'high',
1058 bgcolor : '#000000',
1059 type : 'application/x-shockwave-flash',
1060 pluginspage : 'http://www.adobe.com/go/getflash',
1061 allowscriptaccess : 'always', // never / always
1062 allowfullscreen : true
1063 };
1064 };
1065
1066 Player.prototype = { // http://tinyurl.com/pb6fthj
1067 getTargetNode : function (element) {
1068
1069 this.target.node = Aak.getElement(element);
1070 this.target.html = this.target.node.outerHTML;
1071 this.target.parent = this.target.node.parentNode;
1072 this.target.tag = this.target.node.tagName;
1073
1074 this.attributes.id = this.attributes.name = Aak.generateID();
1075 this.attributes.height = this.target.node.height || this.target.node.clientHeight || '480px';
1076 this.attributes.width = this.target.node.width || this.target.node.clientWidth || '640px';
1077 },
1078 getMimeType : function (type) {
1079 // doc: http://tinyurl.com/jrs8fgz
1080 switch (type.toLowerCase()) {
1081 case 'mp4':
1082 return 'video/mp4';
1083 case 'webm':
1084 return 'video/webm';
1085 case 'ogg':
1086 case 'ogv':
1087 return 'video/ogg';
1088 case 'flv':
1089 return 'video/x-flv';
1090 case 'hls':
1091 return 'application/x-mpegURL';
1092 case 'hds':
1093 return 'application/f4m+xml';
1094 default:
1095 return type;
1096 }
1097 },
1098 building : function (tagName) {
1099 var self = this;
1100
1101 if (Aak.opts.forceVLC && this.name !== 'vlc') {
1102 Aak.info('force playing with VLC');
1103 return this.vlc.apply(this, this.args);
1104 }
1105
1106 switch (tagName) {
1107 case 'iframe':
1108 this.player.node = document.createElement('iframe');
1109 this.player.node.setAttribute('src', this.attributes.src || location.protocol + '//' + location.host + '/');
1110 if (this.attributes.srcdoc) {
1111 if (this.player.node.hasAttribute("srcdoc") || 'srcdoc' in this.player.node) {
1112 this.player.node.setAttribute('srcdoc', this.attributes.srcdoc);
1113 } else {
1114 // does not work correctly with flowplayer
1115 this.player.node.setAttribute('src', "data:text/html;charset=utf-8," + encodeURIComponent(this.attributes.srcdoc));
1116 }
1117 }
1118 this.player.node.setAttribute('width', this.setup.width);
1119 this.player.node.setAttribute('height', this.setup.height);
1120 this.player.node.setAttribute('style', 'height:' + this.setup.height + 'px; width:' + this.setup.width + 'px;');
1121 this.player.node.setAttribute('frameborder', 0);
1122 this.player.node.setAttribute('scrolling', 'no');
1123 this.player.node.setAttribute('allowfullscreen', true); // http://tinyurl.com/oyyehab
1124 // allowfullscreen webkitallowfullscreen mozallowfullscreen oallowfullscreen msallowfullscreen
1125 break;
1126 case 'video':
1127 var attrName;
1128 this.player.node = document.createElement('video');
1129 for (attrName in this.attributes) {
1130 if (this.attributes.hasOwnProperty(attrName))
1131 this.player.node.setAttribute(attrName, this.attributes[attrName]);
1132 }
1133
1134 if (this.attributes.autoplay) { // fix bug duplicate playing on firefox/chrome
1135 this.player.node.onloadstart = function () {
1136 //this.play();
1137 };
1138 }
1139
1140 this.player.node.onerror = function () { // switch to plugin player
1141 setTimeout(function () {
1142 self.args[0] = self.player.node;
1143 self.vlcplayer.apply(self, self.args);
1144 }, 5000);
1145 };
1146 break;
1147 default: // embed
1148 this.player.node = document.createElement('embed');
1149 for (attrName in this.attributes) {
1150 if (this.attributes.hasOwnProperty(attrName))
1151 this.player.node.setAttribute(attrName, this.attributes[attrName]);
1152 }
1153 }
1154 this.player.html = this.player.node.outerHTML;
1155 this.player.tag = this.player.node.tagName;
1156 this.inserting();
1157 },
1158 inserting : function () {
1159 switch (this.options.insert) {
1160 case 'inner':
1161 this.target.node.innerHTML = this.player.html;
1162 break;
1163 case 'append':
1164 this.target.parent.replaceChild(this.player.node);
1165 break;
1166 default: // replace
1167 this.target.parent.replaceChild(this.player.node, this.target.node);
1168 }
1169 if (Aak.opts.logPlayer) {
1170 Aak.log('player', this);
1171 }
1172 return this;
1173 },
1174 editing : function (elem, opts) { // review
1175 Aak.hasElement(elem, function (thisElement) {
1176 var obj,
1177 swf,
1178 value,
1179 parts,
1180 param,
1181 attributes,
1182 attrName;
1183 var so = thisElement;
1184 var clone = so.cloneNode(true);
1185
1186 // set attriibutes
1187 if (opts.setAttribute) {
1188 attributes = opts.setAttribute;
1189 for (attrName in attributes) {
1190 if (clone.querySelector('param[name="' + attrName + '"]')) {
1191 clone.querySelector('param[name="' + attrName + '"]').value = attributes[attrName];
1192 } else if (clone.getAttribute(attrName)) {
1193 clone.setAttribute(attrName, attributes[attrName]);
1194 }
1195 }
1196 }
1197
1198 // unset attributes
1199 if (opts.unsetAttributes) {
1200 attributes = opts.delAttributes;
1201 for (attrName in attributes) {
1202 if (clone.querySelector('param[name="' + attrName + '"]')) {
1203 Aak.removeElement(clone.querySelector('param[name="' + attrName + '"]'));
1204 } else if (clone.getAttribute(attrName)) {
1205 delete attributes[attrName];
1206 }
1207 }
1208 }
1209
1210 if (opts.setFlashvars || opts.unsetFlashvars) {
1211 if (clone.querySelector('param[name="flashvars"]')) {
1212 param = clone.querySelector('param[name="flashvars"]');
1213 value = param.value;
1214 } else if (clone.getAttribute('flashvars')) {
1215 value = clone.getAttribute('flashvars');
1216 } else if (clone.getAttribute('data') && clone.getAttribute('data').indexOf('?') >= 0) {
1217 parts = clone.getAttribute('data').split('?', 2);
1218 swf = parts.shift();
1219 value = parts.shift();
1220 }
1221
1222 obj = Aak.unserialize(value);
1223 if (opts.setFlashvars) {
1224 obj = Aak.setProperties(obj, opts.setFlashvars);
1225 }
1226 if (opts.unsetFlashvars) {
1227 obj = Aak.unsetProperties(obj, opts.unsetFlashvars);
1228 }
1229 value = Aak.serialize(obj);
1230
1231 if (param) {
1232 param.value = value;
1233 } else if (swf) {
1234 clone.setAttribute('data', swf + '?' + value);
1235 } else {
1236 clone.setAttribute('flashvars', value);
1237 }
1238 }
1239 // replace
1240 Aak.log(so, clone, obj);
1241 Aak.replaceElement(so, clone);
1242 });
1243 },
1244 embedding : function (id, setup, attributes, options) {
1245
1246 this.getTargetNode(id);
1247 this.args = arguments;
1248 this.attributes = Aak.setProperties(this.attributes, attributes || {});
1249 this.options = Aak.setProperties(this.options, options || {});
1250
1251 this.attributes.src = setup.swf;
1252 this.attributes.id = this.attributes.name = Aak.generateID();
1253 this.attributes.height = setup.height || this.attributes.height;
1254 this.attributes.width = setup.width || this.attributes.width;
1255 this.attributes.flashvars = Aak.serialize(setup);
1256 this.attributes = Aak.unsetProperties(this.attributes, 'swf');
1257
1258 this.building('embed');
1259 },
1260 jwplayer : function (id, setup, attributes, options) {
1261 // JwPlayer 7 (flash/html5)
1262 // note: problem with ssl
1263 // setup: http://tinyurl.com/hhrgjap, http://tinyurl.com/gqs46tm
1264 // api: https://developer.jwplayer.com/jw-player/docs/developer-guide/api/javascript_api_reference/
1265 // hls: http://tinyurl.com/pxl9scq
1266 // hls-tester: http://demo.jwplayer.com/stream-tester/
1267 // rtmp-demo: https://www.scaleengine.com/jw6
1268 // iframe: http://tinyurl.com/86agg68
1269
1270 this.getTargetNode(id);
1271 this.args = arguments;
1272 this.attributes = Aak.setProperties(this.attributes, attributes || {});
1273 this.options = Aak.setProperties(this.options, options || {});
1274
1275 this.setup = setup;
1276 if (this.options.crossSetup === true) {
1277 this.setup = {
1278 controls : true,
1279 file : setup.source,
1280 abouttext : Aak.name,
1281 aboutlink : Aak.homeURL,
1282 width : setup.width || this.attributes.width,
1283 height : setup.height || this.attributes.height,
1284 autostart : setup.autoplay || this.autoplay,
1285 primary : 'html5',
1286 preload : 'auto',
1287 skin : { // Seven | Six | Five | Glow | Beelden | Vapor | Bekle | Roundster | Stormtrooper
1288 name : setup.skin || "six" // default skin JWP6
1289 }
1290 };
1291 if (['mp4', 'webm', 'ogg', 'ogv'].indexOf(setup.type) === -1) {
1292 this.setup.primary = 'flash';
1293 }
1294 if (setup.type === 'hls') {
1295 this.setup.hlshtml = true;
1296 }
1297 }
1298
1299 this.attributes.srcdoc = '<html><head><style type="text/css">@font-face{font-family:jw-icons;src:url(' + location.protocol + 'ssl.p.jwpcdn.com/player/v/7.4.3/jw-icons.woff) format("woff"),url(' + location.protocol + '//ssl.p.jwpcdn.com/player/v/7.4.3/jw-icons.ttf) format("truetype");font-weight:400;font-style:normal}</style><script src="' + location.protocol + '//content.jwplatform.com/libraries/V6NfEzT7.js"></script><style type="text/css">html, body{padding:0; margin:0;}</style></head><body><div id="jw-movie"></div><script>jwplayer("jw-movie").setup(' + JSON.stringify(this.setup) + ');</script></body></html>';
1300
1301 this.building('iframe');
1302 },
1303 videojs : function (id, setup, attributes, options) {
1304 // VideoJs 5 (flash/html5)
1305 // setup: http://tinyurl.com/pcgx2ob
1306 // playback: http://tinyurl.com/nscztmm
1307 // demo: http://jsfiddle.net/N8Zs5/18/
1308 // plugins: https://github.com/videojs/video.js/wiki/Plugins
1309
1310 this.getTargetNode(id);
1311 this.args = arguments;
1312 this.attributes = Aak.setProperties(this.attributes, attributes || {});
1313 this.options = Aak.setProperties(this.options, options || {});
1314
1315 this.setup = setup;
1316 if (this.options.crossSetup === true) {
1317 this.setup = {
1318 controls : true,
1319 preload : 'auto',
1320 width : setup.width || this.attributes.width,
1321 height : setup.height || this.attributes.height,
1322 techOrder : ["html5", "flash"],
1323 autoplay : setup.autoplay || this.autoplay,
1324 sources : [{
1325 type : this.getMimeType(setup.type),
1326 src : setup.source
1327 }
1328 ]
1329 };
1330 /* don't work
1331 if (setup.type === 'hls') {
1332 techOrder : ["flash", "html5"],
1333 this.setup.flash = {
1334 //swf : "//reeksite.com/public/swf/videojs-flashls.swf"
1335 swf : 'http://www.flashls.org/videojs/video-js.swf'
1336 };
1337 }
1338 */
1339 }
1340
1341 //
1342 this.attributes.srcdoc = '<html><head><link href="' + location.protocol + '//cdnjs.cloudflare.com/ajax/libs/video.js/5.10.5/alt/video-js-cdn.min.css" rel="stylesheet"><script src="' + location.protocol + '//cdnjs.cloudflare.com/ajax/libs/video.js/5.10.5/video.min.js"></script><script src="' + location.protocol + '//cdnjs.cloudflare.com/ajax/libs/videojs-contrib-hls/3.1.0/videojs-contrib-hls.min.js"></script><style type="text/css">html, body{padding:0; margin:0;}.vjs-default-skin{color:#eee}.vjs-default-skin .vjs-play-progress,.vjs-default-skin .vjs-volume-level{background-color:#eee}.vjs-default-skin .vjs-big-play-button,.vjs-default-skin .vjs-control-bar{background:rgba(0,0,0,.2)}.vjs-default-skin .vjs-slider{background:rgba(0,0,0,.3)}</style></head><body><video id="vjs-movie" class="video-js vjs-default-skin vjs-big-play-centered"></video><script>videojs("vjs-movie", ' + JSON.stringify(this.setup) + ')</script></body></html>';
1343
1344 this.building('iframe');
1345 },
1346 flowplayer : function (id, setup, attributes, options) {
1347 // FlowPlayer 6 (flash)
1348 // note: problem with flashplayer
1349 // support: mp4, flv, f4v, m4v, mov
1350 // setup: https://flowplayer.org/docs/setup.html
1351 // api: https://flowplayer.org/docs/api.html
1352 // demo: http://demos.flowplayer.org/basics/js-setup-autoplay.html
1353 // hds: https://flowplayer.electroteque.org/httpstreaming-hds/fp6
1354 // hls: http://demos.flowplayer.org/api/hlsjs.html
1355 // flv: http://demos.flowplayer.org/basics/flv.html
1356
1357 this.getTargetNode(id);
1358 this.args = arguments;
1359 this.attributes = Aak.setProperties(this.attributes, attributes || {});
1360 this.options = Aak.setProperties(this.options, options || {});
1361
1362 this.setup = setup;
1363 if (this.options.crossSetup === true) {
1364 this.setup = {
1365 width : setup.width || this.attributes.width,
1366 height : setup.height || this.attributes.height,
1367 autoplay : setup.autoplay || this.autoplay,
1368 preload : 'auto'
1369 };
1370 if (setup.type === 'hls') {
1371 this.setup.swf = location.protocol + '//releases.flowplayer.org/6.0.5/flowplayerhls.swf';
1372 this.setup.engine = 'hlsjs';
1373 } else if (['mp4', 'webm', 'ogg', 'ogv'].indexOf(setup.type) === -1) {
1374 this.setup.swf = location.protocol + '//releases.flowplayer.org/6.0.5/flowplayer.swf';
1375 this.setup.engine = 'flash';
1376 this.setup.type = 'video/flash';
1377 }
1378 this.setup.clip = {
1379 sources : [{
1380 type : this.getMimeType(this.setup.type || setup.type),
1381 src : setup.source
1382 }
1383 ]
1384 };
1385 }
1386
1387 this.attributes.srcdoc = '<html><head><link rel="stylesheet" href="' + location.protocol + '//releases.flowplayer.org/6.0.5/skin/functional.css"></script><script src="' + location.protocol + '//code.jquery.com/jquery-1.11.2.min.js"></script><script src="' + location.protocol + '//releases.flowplayer.org/6.0.5/flowplayer.min.js"></script><style type="text/css">html, body{padding:0; margin:0;}</style></head><body><div id="fp-movie"></div><script>flowplayer("#fp-movie", ' + JSON.stringify(this.setup) + ');</script></body></html>';
1388
1389 this.building('iframe');
1390 },
1391 grindplayer : function (id, setup, attributes, options) {
1392 // GrindPlayer 1 (flash)
1393 // setup: http://osmfhls.kutu.ru/docs/grind/
1394 // support: hls, rtmp
1395
1396 this.getTargetNode(id);
1397 this.args = arguments;
1398 this.attributes = Aak.setProperties(this.attributes, attributes || {});
1399 this.options = Aak.setProperties(this.options, options || {});
1400
1401 this.setup = setup;
1402 if (this.options.crossSetup === true) {
1403 this.setup = {
1404 src : setup.source,
1405 streamType : "live",
1406 scaleMode : "letterbox",
1407 autoPlay : setup.autoplay || this.autoplay
1408 };
1409 if (setup.type === 'hls') {
1410 this.setup.plugin_hls = "//reeksite.com/public/swf/flashlsOSMF.swf";
1411 }
1412 if (setup.proxy === true) {
1413 this.setup.src = '//www.dianshibo.com/fetch.php/' + setup.source.substring(setup.source.indexOf('//') + 2);
1414 }
1415 }
1416
1417 this.attributes.src = setup.swf || this.attributes.src || "//reeksite.com/public/swf/GrindPlayer.swf";
1418 this.attributes.height = setup.height || this.attributes.height;
1419 this.attributes.width = setup.width || this.attributes.width;
1420 this.attributes.flashvars = Aak.serialize(this.setup);
1421
1422 this.building('embed');
1423 },
1424 vlc : function (id, setup, attributes, options) {
1425 // VLC Web Plugin (plugin)
1426 // doc: http://tinyurl.com/omlzp39
1427 // plugins: about:plugins
1428 // chrome://flags/#enable-npapi
1429 // https://www.chromium.org/developers/npapi-deprecation
1430 // In September 2015 (Chrome 45) we will remove the override and NPAPI support will be permanently removed from Chrome. Installed extensions that require NPAPI plugins will no longer be able to load those plugins.
1431
1432 this.name = 'vlc';
1433 this.getTargetNode(id);
1434 this.args = arguments;
1435 this.attributes = Aak.setProperties(this.attributes, attributes || {});
1436 this.options = Aak.setProperties(this.options, options || {});
1437
1438 this.setup = setup;
1439 if (this.options.crossSetup === true) {
1440 this.attributes.src = setup.source;
1441 this.attributes.height = setup.height || this.attributes.height;
1442 this.attributes.width = setup.width || this.attributes.width;
1443 this.attributes.controls = true;
1444 if (setup.autoplay || this.autoplay) {
1445 this.attributes.autoplay = true;
1446 }
1447 }
1448
1449 this.attributes.type = "application/x-vlc-plugin";
1450 this.attributes.pluginspage = "http://www.videolan.org";
1451 this.building('embed');
1452 },
1453 html5 : function (id, setup, attributes, options) {
1454 // Video Tag (html5)
1455 // basics: https://html5rocks.com/en/tutorials/video/basics/
1456 // tag: http://www.w3schools.com/tags/tag_video.asp
1457 // support: mp4, webm, ogg
1458 // test: http://www.quirksmode.org/html5/tests/video.html
1459
1460 this.options = Aak.setProperties(this.options, options || {});
1461
1462 this.getTargetNode(id);
1463 this.args = arguments;
1464 this.attributes = Aak.setProperties({}, setup || {});
1465 this.attributes.src = setup.source;
1466 this.attributes.id = this.attributes.name = Aak.generateID();
1467 this.attributes.height = this.attributes.height || this.target.node.clientHeight || "100%";
1468 this.attributes.width = this.attributes.width || this.target.node.clientWidth || "100%";
1469 this.attributes.type = this.getMimeType(this.attributes.type);
1470 this.attributes.controls = 'controls';
1471 this.attributes.preload = 'none';
1472 if (this.attributes.autoplay || this.autoplay) {
1473 this.attributes.autoplay = 'autoplay';
1474 }
1475 this.attributes.style = 'display: block; margin:0 auto;';
1476 this.attributes = Aak.unsetProperties(this.attributes, 'source');
1477
1478 this.building('video');
1479 }
1480 };
1481
1482 return new Player();
1483 },
1484 rules : {
1485 // --------------------------------------------------------------------------------------------
1486 // Anti-Adblock Killer
1487 // --------------------------------------------------------------------------------------------
1488 settings : {
1489 host : ['localhost', 'reek.github.io', 'reeksite.com'],
1490 onEnd : function () {
1491
1492 if (/\/anti-adblock-killer(-pages)?\/$/.test(location.pathname)) {
1493 var settingsBox = Aak.getElement('#aak-settings-box');
1494 var settingsNotice = Aak.getElement('#aak-settings-notice');
1495
1496 if (!Aak.useGM) {
1497 settingsNotice.querySelector('div').innerHTML = 'In native mode, you must edit the options manually: <a href="' + Aak.nativeURL + '">See</a>';
1498 } else if (settingsBox && settingsNotice) {
1499 settingsNotice.style.display = 'none';
1500 settingsBox.style.display = 'block';
1501 Aak.info('GM storage:', Aak.getValue());
1502 Aak.info('GM options:', Aak.opts);
1503 Aak.info('GM api:', Aak.useGM && Aak.apiGM());
1504
1505 // user config
1506 Aak.createElement({
1507 tag : 'div',
1508 html : 'Version: ' + Aak.getVersion() + ' <br>AakScript: true <br>AakList: ' + (!Aak.getElement('#k2Uw7isHrMm5JXP1Vwdxc567ZKc1aZ4I')) + ' <br>Browser: ' + Aak.getBrowser() + ' <br>ScriptManager: ' + Aak.getScriptManager(),
1509 append : '#aak-settings-config'
1510 });
1511
1512 // create options
1513 for (var optName in Aak.options) {
1514 if (Aak.options.hasOwnProperty(optName)) {
1515 var opt = Aak.options[optName];
1516 var checked = Aak.opts[optName] === true ? "checked" : '';
1517 Aak.createElement({
1518 tag : 'div',
1519 html : '<input id="' + optName + '" class="css-checkbox" ' + checked + ' type="' + opt.type + '"/><label for="' + optName + '" title="' + opt.info + '" class="css-label">' + opt.label + '</label>',
1520 append : '#aak-settings-' + opt.group
1521 });
1522 }
1523 }
1524
1525 // save options
1526 Aak.onEvent(Aak.getElement("#aak-settings-save"), "click", function () {
1527 var elems = document.querySelectorAll('.css-checkbox');
1528 for (var i = 0; i < elems.length; i++) {
1529 var elem = elems[i];
1530 if (elem.checked) {
1531 Aak.setValue(elem.id, true);
1532 } else {
1533 Aak.setValue(elem.id, false);
1534 }
1535 }
1536 window.alert('Saved !');
1537 });
1538
1539 // Clear GM storage
1540 Aak.addCommands({
1541 caption : 'Clear GM storage',
1542 execute : function () {
1543 Aak.deleteValue();
1544 window.alert('Cleared !');
1545 }
1546 });
1547 }
1548 }
1549 }
1550 },
1551 userscripts_domains : { // Redirect to Github
1552 host : ['userscripts.org', 'userscripts.org:8080', 'userscripts-mirror.org'],
1553 onStart : function () {
1554 if (/155840$/.test(location.pathname)) {
1555 Aak.go(Aak.homeURL);
1556 }
1557 }
1558 },
1559 openuserjs_org : {
1560 host : ['openuserjs.org'],
1561 onIdle : function () {
1562 var element = Aak.getElement('a[href$="/issues"]');
1563 if (/Anti-Adblock_Killer_Reek/.test(location.pathname) && element) {
1564 Aak.confirmReport(element);
1565 }
1566 }
1567 },
1568 greasyfork_org : {
1569 host : ['greasyfork.org'],
1570 onIdle : function () {
1571 var element = Aak.getElement('a[href$="/feedback"]');
1572 if (/-anti-adblock-killer-reek/.test(location.pathname) && element) {
1573 Aak.confirmReport(element);
1574 }
1575 }
1576 },
1577 monkeyguts_com : {
1578 host : ['monkeyguts.com'],
1579 onIdle : function () {
1580 var element = Aak.getElement('a[href*="code.php?nav=forum"]');
1581 if (/monkeyguts.com\/code.php\?id=351/.test(location.href) && element) {
1582 Aak.confirmReport(element);
1583 }
1584 }
1585 },
1586 // --------------------------------------------------------------------------------------------
1587 // Specific
1588 // --------------------------------------------------------------------------------------------
1589 blogspot : {
1590 // No Country Redirect (NCR)
1591 // Prevent Blogger from Redirecting to Country-Specific Domains
1592 // doc: http://tinyurl.com/7rm34jo
1593 // issue: https://greasyfork.org/fr/forum/discussion/5953
1594 // issue: https://github.com/reek/anti-adblock-killer/issues/490
1595 // test: http://tinyurl.com/nomcxkc
1596 host : ['.blogspot.'],
1597 onStart : function () {
1598 if (Aak.isTopframe) { // fix rediretion loop
1599 var blog = location.host.replace('www.', '').split(".");
1600 if (blog[blog.length - 1] != "com") {
1601 var path = location.href.split("/").slice(3).join('/');
1602 Aak.go("http://" + blog[0] + ".blogspot.com/ncr/" + path);
1603 }
1604 }
1605 }
1606 },
1607 blogspot_knowlet3389 : {
1608 // note: also added abp rule
1609 // issue: https://github.com/reek/anti-adblock-killer/issues/83
1610 // source: http://pastebin.com/A3mCXQ5i
1611 host : ['knowlet3389.blogspot.'],
1612 onStart : function () {
1613 Aak.setLocal('noad', false);
1614 Aak.addStyle("#gAds { height: 17px; } #gAd2 { height: 17px; }");
1615 }
1616 },
1617 uptobox_uptostream : {
1618 // issue: https://github.com/reek/anti-adblock-killer/issues/351
1619 host : ['uptobox.com', 'uptostream.com'],
1620 onStart : function () {
1621 // Old solution [deprecated]
1622 var id = location.pathname.match(/[0-9a-z]{12}/);
1623 if (id !== null) {
1624 Aak.addStyle("#" + id[0] + " { height: 12px; }");
1625 }
1626 // New 12.05.2014
1627 // + abp rule (alternative solution)
1628 Aak.addStyle("#adblocktrap { height: 12px; }");
1629 },
1630 onIdle : function () {
1631 // remove ads
1632 Aak.removeElement('*[src^="http://ads.uptobox.com/"],*[href^="http://ads.uptobox.com/"]');
1633 }
1634 },
1635 anisubsia_com : {
1636 host : ['anisubsia.com'],
1637 onStart : function () {
1638 // + abp rule #@#.adsantilok
1639 Aak.addStyle(".adsantilok { height: 5px; }");
1640 },
1641 onIdle : function () {
1642 Aak.uw.jAntiBlock = function () {};
1643 Aak.uw.CekBlok = function () {};
1644 }
1645 },
1646 freegameserverhost_com : {
1647 // issue: https://github.com/reek/anti-adblock-killer/issues/1512
1648 host : ['freegameserverhost.com'],
1649 onStart : function () {
1650 Aak.addStyle("#fab13 { height: 11px; }");
1651 }
1652 },
1653 elahmad_com : {
1654 host : ['elahmad.com'],
1655 onStart : function () {
1656 Aak.addStyle("#adblock { height: 1px; }");
1657 }
1658 },
1659 mrtzcmp3_net : {
1660 host : ['mrtzcmp3.net'],
1661 onStart : function () {
1662 Aak.addStyle(".rtm_ad { height: 1px; }");
1663 }
1664 },
1665 height_myTestAd : {
1666 // issue: https://github.com/reek/anti-adblock-killer/issues/1241
1667 // issue: https://github.com/reek/anti-adblock-killer/issues/983
1668 // issue: https://github.com/reek/anti-adblock-killer/issues/291
1669 host : ['bknime.com', 'go4up.com', 'debrido.com'],
1670 onStart : function () {
1671 Aak.addStyle(".myTestAd { height: 1px; }");
1672 }
1673 },
1674 debridfast_network : {
1675 // issue: https://greasyfork.org/en/forum/discussion/9406
1676 // issue: https://greasyfork.org/en/forum/discussion/7013
1677 // issue: https://github.com/reek/anti-adblock-killer/issues/1272
1678 // issue: https://github.com/reek/anti-adblock-killer/issues/769
1679 host : ['debridfast.com', 'getdebrid.com', 'debrid.us', 'leecher.us'],
1680 onStart : function () {
1681 Aak.addStyle(".myTestAd, .my24Ad, .nabil { height: 1px; }");
1682 },
1683 onIdle : function () {
1684 document.querySelector('#simpleAd').innerHTML = '<p style="display:none;">debridfast.com</p>';
1685 }
1686 },
1687 bg_gledai_tv : {
1688 host : ['bg-gledai.tv'],
1689 onStart : function () {
1690 Aak.addStyle(".myAd { height: 1px; }");
1691 }
1692 },
1693 thepcspy_com : { // http://thepcspy.com/read/how_to_block_adblock/
1694 host : ['thepcspy.com'],
1695 onStart : function () {
1696 Aak.addStyle(".myTestAd { height: 1px; }");
1697 Aak.addStyle(".blocked { display: none; }");
1698 },
1699 onIdle : function () {
1700 Aak.removeElement('.blocked');
1701 }
1702 },
1703 vg_e24_no : {
1704 // issue: https://github.com/reek/anti-adblock-killer/issues/292
1705 host : ['vg.no', 'e24.no'],
1706 onStart : function () {
1707 // Add this rule, because EasyList allow all hidden elements.
1708 Aak.addStyle(".ad { display: none; }");
1709 }
1710 },
1711 automobile_sportive_com : {
1712 host : ['automobile-sportive.com'],
1713 onStart : function () {
1714 Aak.addStyle(".myTestAd { height: 51px; display: none; }");
1715 }
1716 },
1717 snsw_us : {
1718 host : ['snsw.us'],
1719 onStart : function () {
1720 Aak.addStyle("#ad_1 { height: 1px; }");
1721 }
1722 },
1723 urlchecker_net : {
1724 host : ['urlchecker.net'],
1725 onStart : function () {
1726 Aak.addStyle("#adchecker { height: 20px; }");
1727 }
1728 },
1729 skiplimite_tv : {
1730 host : ['skiplimite.tv'],
1731 onStart : function () {
1732 Aak.addStyle("div.addthis_native_toolbox + div[id] { height: 12px; }");
1733 }
1734 },
1735 filecore_co_nz : {
1736 host : ['filecore.co.nz'],
1737 onStart : function () {
1738 Aak.addStyle(".adsense { height: 5px; }");
1739 }
1740 },
1741 thomas_n_ruth_com : {
1742 // issue: https://github.com/reek/anti-adblock-killer/issues/1111
1743 // source: http://pastebin.com/fu7vkUA1
1744 host : ['thomas-n-ruth.com'],
1745 onStart : function () {
1746 Aak.addStyle(".Google { height: 5px; }");
1747 }
1748 },
1749 interfans_org : {
1750 // test: http://www.interfans.org/forum/
1751 host : ['interfans.org'],
1752 onStart : function () {
1753 Aak.addStyle(".ad_global_header { height: 1px; display: none; }");
1754 }
1755 },
1756 maxdebrideur_com : {
1757 host : ['maxdebrideur.com'],
1758 onStart : function () {
1759 Aak.addStyle(".clear + div[id] { height: 12px; }");
1760 }
1761 },
1762 topzone_it : {
1763 host : ['topzone.lt'],
1764 onStart : function () {
1765 Aak.addStyle(".forumAd { height: 1px; display: none; }");
1766 }
1767 },
1768 nana10_co_il : {
1769 host : ['.nana10.'],
1770 onStart : function () {
1771 Aak.addStyle("#advert-tracker { height: 1px; }");
1772 }
1773 },
1774 plej_tv : {
1775 host : ['plej.tv'],
1776 onStart : function () {
1777 Aak.addStyle(".advert_box { height: 1px; }");
1778 }
1779 },
1780 mangamint_com : {
1781 // note: added rule to allow ".ad728"
1782 // issue: https://greasyfork.org/id/forum/discussion/8524
1783 host : ['mangamint.com'],
1784 onStart : function () {
1785 Aak.addStyle(".ad728 { height: 31px; }");
1786 }
1787 },
1788 debrideurstream_fr : {
1789 host : ['debrideurstream.fr'],
1790 onStart : function () {
1791 Aak.addStyle("#content div[id][align=center] { height: 12px; }");
1792 }
1793 },
1794 preemlinks_com : {
1795 host : ['preemlinks.com'],
1796 onStart : function () {
1797 Aak.addStyle("#divads { height: 1px; }");
1798 }
1799 },
1800 hentai_to : {
1801 host : ['hentai.to'],
1802 onStart : function () {
1803 Aak.addStyle("#hentaito123 { height: 11px; }");
1804 }
1805 },
1806 prototurk_com : {
1807 host : ['prototurk.com'],
1808 onStart : function () {
1809 Aak.addStyle("#reklam { height: 1px; }");
1810 }
1811 },
1812 mufa_de : {
1813 host : ['mufa.de'],
1814 onStart : function () {
1815 Aak.addStyle("#leaderboard { height: 5px; }");
1816 Aak.addStyle("#large-rectangle { height: 5px; }");
1817 Aak.addStyle("#ad-header-468x60 { height: 5px; }");
1818 }
1819 },
1820 watcharab_com : {
1821 host : ['watcharab.com'],
1822 onStart : function () {
1823 // + adp rule watcharab.com#@##adblock
1824 Aak.addStyle("#adblock { height: 5px; }");
1825 }
1826 },
1827 freedomip_com : {
1828 host : ['freedom-ip.com'],
1829 onStart : function () {
1830 Aak.addStyle(".pub_vertical ins, .pub_vertical div { height: 11px; }");
1831 }
1832 },
1833 wakanim_tv : {
1834 host : ['wakanim.tv'],
1835 onStart : function () {
1836 Aak.addStyle("#detector { display: none; }");
1837 Aak.addStyle("#nopub { display: block; }");
1838 }
1839 },
1840 simply_debrid_com : {
1841 // issue: https://github.com/reek/anti-adblock-killer/issues/332
1842 // source: http://pastebin.com/b7MAYXs4
1843 host : ['simply-debrid.com'],
1844 onStart : function () {
1845 Aak.uw.adsbygoogle = {};
1846 Aak.uw.adsbygoogle.loaded = true;
1847 }
1848 },
1849 manga9_com : {
1850 host : ['manga9.com', 'mangabee.co'],
1851 onStart : function () {
1852 Aak.addStyle(".adblock { height: 31px; }");
1853 }
1854 },
1855 onemanga2_com : {
1856 host : ['onemanga2.com'],
1857 onStart : function () {
1858 Aak.addStyle(".afs_ads { height: 5px; }");
1859 }
1860 },
1861 mangabird_com : {
1862 host : ['mangabird.com'],
1863 onStart : function () {
1864 Aak.addStyle(".afs_ads { height: 5px; }");
1865 }
1866 },
1867 kodilive_eu : {
1868 // issue: https://github.com/reek/anti-adblock-killer/issues/1528
1869 // source: http://pastebin.com/ZxvXKqtc
1870 host : ['kodilive.eu'],
1871 onStart : function () {
1872 Aak.addStyle(".Ad { height: 5px; }");
1873 }
1874 },
1875 backin_net : {
1876 // issue: https://github.com/reek/anti-adblock-killer/issues/1383
1877 // issue: https://github.com/reek/anti-adblock-killer/issues/1061
1878 host : ['backin.net'],
1879 onStart : function () {
1880 Aak.addStyle("#divxg { height: 8px; }");
1881 }
1882 },
1883 mobile_tracker_free_com : {
1884 // issue: https://github.com/reek/anti-adblock-killer/issues/1082
1885 host : ['mobile-tracker-free.com'],
1886 onStart : function () {
1887 Aak.addStyle("#myAds { height: 1px; }");
1888 }
1889 },
1890 workupload_com : {
1891 // note: obfuscated
1892 // issue: https://github.com/reek/anti-adblock-killer/issues/1334
1893 // issue: https://github.com/reek/anti-adblock-killer/issues/1290
1894 // source: http://pastebin.com/CPzd2Swx
1895 host : ['workupload.com'],
1896 onAlways : function () {
1897 Aak.addStyle(".adBlock, .adsbygoogle, #sad { height: 11px; }");
1898 }
1899 },
1900 jc_mp_com : {
1901 // by: Giwayume
1902 // issue: https://github.com/reek/anti-adblock-killer/issues/1597
1903 host : ["jc-mp.com"],
1904 onStart : function() {
1905 Aak.addStyle('.adsense {width: 1px; height: 1px; visibility: hidden; display: block; position: absolute;}');
1906 }
1907 },
1908 forbes_com : {
1909 // by: Giwayume
1910 // issue: https://github.com/reek/anti-adblock-killer/issues/865
1911 host : ['forbes.com'],
1912 onStart : function () {
1913 if (window.location.pathname.indexOf('/welcome') > -1) {
1914 Aak.setCookie('welcomeAd', 'true', 86400000, '/');
1915 Aak.setCookie('dailyWelcomeCookie', 'true', 86400000, '/');
1916 window.location = Aak.getCookie('toUrl') || 'http://www.forbes.com/';
1917 }
1918 }
1919 },
1920 bait_adsbygoogle : {
1921 // issue: https://github.com/reek/anti-adblock-killer/issues/547
1922 host : ['bitcoinaliens.com'],
1923 onStart : function () {
1924 Aak.addBaitElement('ins.adsbygoogle');
1925 }
1926 },
1927 bait_tester : {
1928 host : ['osoarcade.com', 'd3brid4y0u.info', 'fileice.net', 'nosteam.ro', 'openrunner.com', 'easybillets.com', 'spox.fr', 'yovoyages.com', 'tv3.co.nz', 'freeallmusic.info', 'putlocker.com', 'sockshare.com', 'dramapassion.com', 'yooclick.com', 'online.ua'],
1929 onStart : function () {
1930 Aak.addBaitElement('div#tester');
1931 }
1932 },
1933 bait_add : {
1934 host : ['filecom.net', 'upshare.org', 'skippyfile.com', 'mwfiles.net', 'up-flow.org'],
1935 onStart : function () {
1936 Aak.addBaitElement('div#add');
1937 }
1938 },
1939 bait_adpbtest : {
1940 host : ['leaguesecretary.com', 'teknogods.com', 'hellsmedia.com'],
1941 onStart : function () {
1942 Aak.addBaitElement('div#adpbtest');
1943 }
1944 },
1945 bait_adtester : {
1946 host : ['freesportsbet.com', 'sportsplays.com'],
1947 onStart : function () {
1948 Aak.addBaitElement('div#ad-tester');
1949 }
1950 },
1951 tgo_tv_com : {
1952 // issue: https://github.com/reek/anti-adblock-killer/issues/303
1953 host : ['tgo-tv.com'],
1954 onStart : function () {
1955 Aak.addStyle("#adb, #bannerad1, .load_stream { display: none; }");
1956 Aak.addBaitElement('div#tester');
1957 },
1958 onEnd : function () {
1959 Aak.uw.threshold = 1000;
1960 Aak.removeElement('.chat_frame'); // bug reload iframe
1961 }
1962 },
1963 freegamehosting_nl : {
1964 host : ['freegamehosting.nl'],
1965 onStart : function () {
1966 Aak.addBaitElement('div#adtest');
1967 }
1968 },
1969 theweatherspace_com : {
1970 host : ['theweatherspace.com'],
1971 onStart : function () {
1972 Aak.addBaitElement('div#ab-bl-advertisement');
1973 }
1974 },
1975 cleodesktop_com : {
1976 // issue: https://github.com/reek/anti-adblock-killer/issues/711
1977 host : ['cleodesktop.com'],
1978 onStart : function () {
1979 Aak.addBaitElement('div#myTestAd');
1980 }
1981 },
1982 imageraider_com : {
1983 // issue: https://github.com/reek/anti-adblock-killer/issues/826
1984 host : ['imageraider.com'],
1985 onStart : function () {
1986 Aak.addBaitElement('div#myGContainer');
1987 }
1988 },
1989 voici_fr : {
1990 // issue: https://greasyfork.org/fr/forum/discussion/10093
1991 // issue: https://github.com/reek/anti-adblock-killer/issues/826
1992 // source: http://pastebin.com/zEVQHTiD
1993 host : ['voici.fr', 'programme-tv.net'],
1994 onStart : function () {
1995 Aak.addBaitElement('div#sas_script2');
1996 }
1997 },
1998 mil_ink : {
1999 // issue: https://github.com/reek/anti-adblock-killer/issues/1652
2000 // source: http://pastebin.com/474NZzPJ
2001 host : ['mil.ink'],
2002 onStart : function () {
2003 Aak.addBaitElement('div#ads_div');
2004 }
2005 },
2006 prem_link : {
2007 // issue: https://github.com/reek/anti-adblock-killer/issues/1152
2008 // issue: https://github.com/reek/anti-adblock-killer/issues/918
2009 // issue: https://github.com/reek/anti-adblock-killer/issues/794
2010 // issue: https://github.com/reek/anti-adblock-killer/issues/692
2011 // issue: https://github.com/reek/anti-adblock-killer/issues/572
2012 // issue: https://github.com/reek/anti-adblock-killer/issues/541
2013 // source: http://pastebin.com/u1nFxJbq
2014 host : ['prem.link'],
2015 onIdle : function () {
2016 Aak.createElement({
2017 tag : 'a',
2018 href : 'http://www.liveadexchanger.com',
2019 append : '#img_new'
2020 });
2021 }
2022 },
2023 cubeupload_com : {
2024 // issue: https://greasyfork.org/en/forum/discussion/5919
2025 host : ['cubeupload.com'],
2026 onStart : function () {
2027 Aak.createElement({
2028 tag : 'iframe',
2029 name : 'iframe',
2030 src : 'about:blank',
2031 style : 'display:none;',
2032 append : document.documentElement
2033 });
2034 }
2035 },
2036 stream4free_eu : {
2037 host : ['stream4free.eu'],
2038 onStart : function () {
2039 // +abp alt solution
2040 Aak.addBaitElement('div#jpayday');
2041 Aak.uw.jpayday_alert = 1;
2042 }
2043 },
2044 _3dnews_ru : {
2045 // issue: https://greasyfork.org/ru/forum/discussion/5750
2046 host : ['3dnews.ru'],
2047 onStart : function () {
2048 Aak.setCookie('adblockwarn', 1);
2049 Aak.addStyle("#earAds { width: 401px; }");
2050 Aak.addBaitElement('div#earAds');
2051 Aak.uw.__AT_detected = true;
2052 }
2053 },
2054 _3dsthem_es : {
2055 // issue: https://github.com/reek/anti-adblock-killer/issues?q=3dsthem
2056 host : ['3dsthem.es'],
2057 onStart : function () {
2058 //Aak.addScript(function () {});
2059 },
2060 onBeforeScript : function () {
2061 /*
2062 return [{
2063 contains : 'main.js',
2064 external : true,
2065 override : '//pastebin.com/raw/2yGRPhRZ'
2066 }
2067 ];
2068 */
2069 }
2070 },
2071 _8muses_com : {
2072 // issue: https://github.com/reek/anti-adblock-killer/issues?q=8muses
2073 // issue: https://greasyfork.org/forum/discussion/8515
2074 // issue: https://greasyfork.org/en/forum/discussion/6407
2075 // source: http://pastebin.com/bMNDxecs
2076 host : ['8muses.com'],
2077 onStart : function () {
2078 Aak.addScript(function () {
2079 var _setTimeout = window.setTimeout;
2080 window.setTimeout = function (fn, delay) {
2081 if (fn.toString().indexOf("$(window).trigger('adblock');") > -1) {
2082 fn = function () {
2083 console.info(['AntiAdbKiller', location.host, 'Anti-AdBlock intercepted :-)']);
2084 };
2085 }
2086 _setTimeout.call(this, fn, delay);
2087 };
2088 });
2089 }
2090 },
2091 thechive_com : {
2092 // issue: https://github.com/reek/anti-adblock-killer/issues/1453
2093 // source: http://pastebin.com/TdpPyrbb
2094 host : ['thechive.com'],
2095 onStart : function () {
2096 Aak.addScript(function () {
2097 Object.defineProperties(window, {
2098 stephaneDetector : {
2099 value : {
2100 hook : function (cb) {
2101 cb(false);
2102 },
2103 init : function () {},
2104 broadcastResult : function () {}
2105 },
2106 writable : false
2107 }
2108 });
2109 });
2110 }
2111 },
2112 richonrails_com : {
2113 // by: Giwayume
2114 // issue: https://github.com/reek/anti-adblock-killer/issues/1447
2115 // source: http://pastebin.com/Ewfwg8BG
2116 host : ['richonrails.com'],
2117 onIdle : function () {
2118 Aak.addScript(function () {
2119 var adsByGoogleHtml = '"<ins+id="aswift_0_expand"+style="display:inline-table;border:none;height:90px;margin:0;padding:0;position:relative;visibility:visible;width:750px;background-color:transparent"><ins+id="aswift_0_anchor"+style="display:block;border:none;height:90px;margin:0;padding:0;position:relative;visibility:visible;width:750px;background-color:transparent"><iframe+marginwidth="0"+marginheight="0"+vspace="0"+hspace="0"+allowtransparency="true"+scrolling="no"+allowfullscreen="true"+onload="var+i=this.id,s=window.google_iframe_oncopy,H=s&&s.handlers,h=H&&H[i],w=this.contentWindow,d;try{d=w.document}catch(e){}if(h&&d&&(!d.body||!d.body.firstChild)){if(h.call){setTimeout(h,0)}else+if(h.match){try{h=s.upd(h,i)}catch(e){}w.location.replace(h)}}"+id="aswift_0"+name="aswift_0"+style="left:0;position:absolute;top:0;"+width="750"+frameborder="0"+height="90"></iframe></ins></ins>"';
2120 $.ajax({
2121 url : $(".article-content").data("url"),
2122 dataType : "script",
2123 method : "post",
2124 data : {
2125 html : adsByGoogleHtml
2126 },
2127 success : function (result) {
2128 var exec = result.replace("$('.article-content')", "$('.article-content-2')");
2129 new Function(exec)();
2130 }
2131 });
2132 $(".article-content").after('<div class="article-content-2"></div>').remove();
2133 });
2134 }
2135 },
2136 rmprepusb_com : {
2137 host : ['rmprepusb.com'],
2138 onStart : function () {
2139 Aak.setCookie('jot_viewer', 3);
2140 }
2141 },
2142 neodrive_co : {
2143 // issue: https://github.com/reek/anti-adblock-killer/issues/1001
2144 host : ['neodrive.co'],
2145 onAlways : function () {
2146 // Prevent popunder
2147 Aak.setCookie('KifPopCnt', 1, null, '/embed/');
2148 }
2149 },
2150 hentaihaven_org : {
2151 // issue: https://github.com/gorhill/uBlock/issues/1340
2152 host : ['hentaihaven.org'],
2153 onAlways : function () {
2154 // Prevent popunder
2155 Aak.setCookie('hh_ppndr1', 1);
2156 Aak.setCookie('hh_ppndr2', 1);
2157 }
2158 },
2159 primeshare_tv : {
2160 host : ['primeshare.tv'],
2161 onStart : function () {
2162 Aak.addBaitElement('div#adblock');
2163 }
2164 },
2165 bluesatoshi_com : {
2166 // issue: https://github.com/reek/anti-adblock-killer/issues/873
2167 host : ['bluesatoshi.com'],
2168 onStart : function () {
2169 Aak.addStyle("#test { height: 280px; }");
2170 Aak.addBaitElement('div#test');
2171 }
2172 },
2173 razercrypt_com : {
2174 // issue: https://github.com/reek/anti-adblock-killer/issues/870
2175 host : ['razercrypt.com'],
2176 onStart : function () {
2177 Aak.addStyle("#test { height: 250px; }");
2178 Aak.addBaitElement('div#test');
2179 }
2180 },
2181 satoshiempire_com : {
2182 // issue: https://github.com/reek/anti-adblock-killer/issues/872
2183 host : ['satoshiempire.com'],
2184 onStart : function () {
2185 Aak.addStyle("#test { height: 250px; }");
2186 Aak.addBaitElement('div#test');
2187 }
2188 },
2189 oneadfaucet_com : {
2190 // issue: https://github.com/reek/anti-adblock-killer/issues/871
2191 host : ['oneadfaucet.com'],
2192 onStart : function () {
2193 Aak.addStyle("#test { height: 250px; }");
2194 Aak.addBaitElement('div#test');
2195 }
2196 },
2197 jkanime_net : {
2198 host : ['jkanime.net'],
2199 // @@||jkanime.net/assets/js/advertisement2.js
2200 onStart : function () {
2201 Aak.addBaitElement('div#reco');
2202 }
2203 },
2204 _720pmkv_com : {
2205 host : ['720pmkv.com'],
2206 onStart : function () {
2207 Aak.addBaitElement('div#advert');
2208 }
2209 },
2210 paidverts_com : {
2211 host : ['paidverts.com'],
2212 onStart : function () {
2213 Aak.addBaitElement('div.afs_ads');
2214 }
2215 },
2216 italiatv_org : {
2217 host : ['italiatv.org'],
2218 onStart : function () {
2219 Aak.addBaitElement('div#fab13');
2220 }
2221 },
2222 chrissmoove_com : {
2223 host : ['chrissmoove.com'],
2224 onStart : function () {
2225 //Aak.addBaitElement('div#adserver');
2226 }
2227 },
2228 eventhubs_com : {
2229 host : ['eventhubs.com'],
2230 onStart : function () {
2231 Aak.addBaitElement('div#blahyblaci1');
2232 }
2233 },
2234 superanimes_com : {
2235 // issue: https://github.com/reek/anti-adblock-killer/issues/1295
2236 // source: http://pastebin.com/FDPAKjTQ
2237 host : ['superanimes.com'],
2238 onStart : function () {
2239 Aak.addBaitElement('div#bannerLoja');
2240 }
2241 },
2242 forum_pac_rom_com : {
2243 // issue: https://github.com/reek/anti-adblock-killer/issues/243
2244 host : ['forum.pac-rom.com'],
2245 onStart : function () {
2246 Aak.addBaitElement('div.banner_ads');
2247 }
2248 },
2249 litv_tv : {
2250 // issue: https://github.com/reek/anti-adblock-killer/issues/1299
2251 // source: http://pastebin.com/zcddvTuC
2252 host : ['litv.tv'],
2253 onStart : function () {
2254 Aak.addBaitElement('div.player_mask');
2255 }
2256 },
2257 leveldown_fr : {
2258 // issue: https://github.com/reek/anti-adblock-killer/issues/595
2259 host : ['leveldown.fr'],
2260 onStart : function () {
2261 Aak.addBaitElement('div#adblock');
2262 Aak.addBaitElement('div#adblocktest');
2263 }
2264 },
2265 globeslot_com : {
2266 // issue: https://github.com/reek/anti-adblock-killer/issues/924
2267 host : ['globeslot.com'],
2268 onStart : function () {
2269 Aak.addBaitElement('div#add');
2270 Aak.addBaitElement('div#add1');
2271 }
2272 },
2273 antennesport_com : {
2274 host : ['antennesport.com', 'serverhd.eu'],
2275 onIdle : function () { // for antennesport
2276 // Remove Pub
2277 Aak.removeElement("#pub .pubclose");
2278 // Redirect to Player
2279 Aak.setElement('#pub .embed iframe', {
2280 src : '/embed/embed.php'
2281 });
2282 }
2283 },
2284 disableAlertbox : {
2285 // issue: https://greasyfork.org/en/forum/discussion/8611
2286 host : ['drivearabia.com', 'putlocker.com', 'doatoolsita.altervista.org', 'sockshare.com', 'free-movie-home.com', 'pc.online143.com', 'kooora.com', 'str3amtv.co.nr', 'str3amtv.altervista.org', 'str3am.altervista.org', 'filecom.net', 'pipocas.tv', 'generatupremium.biz', 'mega-debrid.eu', 'premiumst0re.blogspot.com', 'dl-protect.com', 'newsinlevels.com', 'vipracing.biz'],
2287 onAlways : function () {
2288 Aak.uw.alert = function () {};
2289 }
2290 },
2291 generatupremium_biz : {
2292 host : ['generatupremium.biz'],
2293 onStart : function () {
2294 // Disable Confirm Box
2295 //Aak.uw.confirm = function (){};
2296 Aak.setCookie('genera', false);
2297 }
2298 },
2299 adswizz_com : {
2300 // by: Skr4tchGr3azyMonkiBallllllZzzz
2301 // issue: https://github.com/reek/anti-adblock-killer/issues/809
2302 host : ['yes.fm'],
2303 onStart : function () {
2304 Aak.addScript(function () {
2305 window.com_adswizz_synchro_initialize = function () {};
2306 });
2307 }
2308 },
2309 derstandard_at : {
2310 // by: Alexander255
2311 // patch: http://pastebin.com/raw.php?i=r7Q4DrfB
2312 // issue: https://github.com/reek/anti-adblock-killer/issues/105
2313 host : ['derstandard.at'],
2314 onStart : function () {
2315
2316 var makeISOTimestampUTC = function () {
2317 var pad = function (amount, width) {
2318 var padding = "";
2319 while (padding.length < width - 1 && amount < Math.pow(10, width - padding.length - 1)) {
2320 padding += "0";
2321 }
2322 return padding + amount.toString();
2323 };
2324
2325 var date = new Date();
2326 return [pad(date.getUTCFullYear(), 4), "-",
2327 pad(date.getUTCMonth() + 1, 2), "-",
2328 pad(date.getUTCDate(), 2), "T",
2329 pad(date.getUTCHours(), 2), ":",
2330 pad(date.getUTCMinutes(), 2), ":",
2331 pad(date.getUTCSeconds(), 2)].join();
2332 };
2333
2334 document.cookie.split('; ').forEach(function (cookie) {
2335 // Find main storage cookie
2336 if (cookie.substr(0, 6) == "MGUID=") {
2337 // Decompose information from main storage cookie
2338 var values = {};
2339 cookie.substr(6).split("&").forEach(function (assignment) {
2340 var pos = assignment.indexOf('=');
2341 if (pos > -1) {
2342 values[assignment.substr(0, pos)] = assignment.substr(pos + 1);
2343 }
2344 });
2345
2346 // Update "first viewed" timestamp
2347 values.Timestamp = makeISOTimestampUTC();
2348
2349 // Recompose information in main storage cookie
2350 cookie = "MGUID=";
2351 for (var key in values) {
2352 if (values.hasOwnProperty(key)) {
2353 cookie += key + "=" + values[key] + "&";
2354 }
2355 }
2356 cookie = cookie.substr(0, (cookie.length - 1));
2357
2358 // Update cookie
2359 document.cookie = cookie;
2360 }
2361 });
2362 }
2363 },
2364 tek_domains : {
2365 // by: Reek, Alexander255
2366 // issue: https://github.com/reek/anti-adblock-killer/issues/788
2367 // issue: https://github.com/reek/anti-adblock-killer/issues/512
2368 host : ['tek.no', 'gamer.no', 'teknofil.no', 'insidetelecom.no', 'prisguide.no', 'diskusjon.no', 'teknojobb.no', 'akam.no', 'hardware.no', 'amobil.no'],
2369 onIdle : function () {
2370
2371 /*
2372 var ad_frame = document.createElement("iframe");
2373 ad_frame.name = "_frame";
2374 ad_frame.style.display = "none";
2375 document.body.appendChild(ad_frame);
2376 ad_frame.contentWindow.wrappedJSObject.inFIF = true;
2377 */
2378
2379 // fix 27.11.2015
2380 Aak.createElement({
2381 tag : 'div',
2382 id : 'google_ads_iframe_',
2383 html : '<p></p>',
2384 append : 'body'
2385 });
2386
2387 }
2388 },
2389 planetatvonlinehd_network : {
2390 // issue: https://github.com/reek/anti-adblock-killer/issues/1467
2391 // issue: https://github.com/reek/anti-adblock-killer/issues/159
2392 host : ['planetatvonlinehd.blogspot.', 'planetatvonlinehd.com'],
2393 onStart : function () {
2394 Aak.addStyle('.adsantilok { height: 1px; }');
2395 //Aak.uw.jQAntiAdsBlock = function (){}; // don't work
2396 }
2397 },
2398 beta_speedtest_net : {
2399 // issue: https://github.com/reek/anti-adblock-killer/issues/628
2400 // issue: https://github.com/reek/anti-adblock-killer/issues/562
2401 // issue: https://github.com/reek/anti-adblock-killer/issues/484
2402 // source: http://paste2.org/53ymghX1
2403 host : ['beta.speedtest.net'],
2404 onAlways : function () {
2405 Aak.uw.adsOoklaComReachable = true;
2406 Aak.uw.scriptsLoaded = function () {};
2407 }
2408 },
2409 binbucks_com : {
2410 // by: Alexander255
2411 // issue: https://github.com/reek/anti-adblock-killer/issues/545
2412 host : ['binbucks.com'],
2413 onIdle : function () {
2414 Aak.uw.testJuicyPay = true;
2415 Aak.uw.testSensePay = true;
2416 }
2417 },
2418 whiskyprices_domains : {
2419 // issue: https://github.com/reek/anti-adblock-killer/issues/1284
2420 // source: http://pastebin.com/Epr5tREL
2421 host : ['whiskyprijzen.com', 'whiskyprices.co.uk', 'whiskypreise.com', 'whiskyprix.fr'],
2422 onAlways : function () {
2423 Aak.uw.OA_show = true;
2424 }
2425 },
2426 nicoblog_org : {
2427 // issue: https://github.com/reek/anti-adblock-killer/issues/1184
2428 // source: http://pastebin.com/MNHpLs2V
2429 host : ['nicoblog.org'],
2430 onIdle : function () {
2431 var el = document.querySelector('.src');
2432 el.removeAttribute('class');
2433 }
2434 },
2435 di_se : {
2436 // note: add this rule for chrome user
2437 // issue: https://github.com/reek/anti-adblock-killer/issues/1319
2438 // source: http://pastebin.com/9bDPQzMX
2439 host : ['di.se'],
2440 onIdle : function () {
2441 Aak.removeElement('#header_overlay');
2442 Aak.removeElement('#message_modal');
2443 }
2444 },
2445 megogo_net : {
2446 // issue: PM
2447 // source1: http://pastebin.com/ccHQg3hn
2448 // source2: http://pastebin.com/gk0vEQHN
2449 // note: two adblock check
2450 host : ['megogo.net'],
2451 onStart : function () {
2452 Object.defineProperty(Aak.uw, "adBlock", {
2453 enumerable : true,
2454 writable : false,
2455 value : false
2456 });
2457 Object.defineProperty(Aak.uw, "showAdBlockMessage", {
2458 enumerable : true,
2459 writable : false,
2460 value : function () {}
2461 });
2462 }
2463 },
2464 libertaddigital_com : {
2465 // issue: https://github.com/reek/anti-adblock-killer/issues/1642
2466 // source: http://pastebin.com/6Fzp0vrE
2467 host : ['libertaddigital.com'],
2468 onStart : function () {
2469 Object.defineProperty(Aak.uw, "ad_already_played", {
2470 enumerable : true,
2471 writable : false,
2472 value : true
2473 });
2474 Object.defineProperty(Aak.uw, "puedeMostrarAds", {
2475 enumerable : true,
2476 writable : false,
2477 value : true
2478 });
2479 }
2480 },
2481 folha_uol_com_br : {
2482 // issue: https://github.com/reek/anti-adblock-killer/issues/1396
2483 // source: f( ( typeof paywall_access == "undefined" || paywall_access != true ) && ( typeof folha_ads == "undefined" || folha_ads != true ) ) {
2484 host : ['folha.uol.com.br'],
2485 onStart : function () {
2486 Object.defineProperty(Aak.uw, "paywall_access", {
2487 enumerable : true,
2488 writable : false,
2489 value : true
2490 });
2491 Object.defineProperty(Aak.uw, "folha_ads", {
2492 enumerable : true,
2493 writable : false,
2494 value : true
2495 });
2496 }
2497 },
2498 gamer_com_tw : {
2499 // by: mmis1000
2500 // userscript: https://greasyfork.org/en/scripts/16525
2501 // issue: : https://github.com/reek/anti-adblock-killer/issues/975
2502 host : ['gamer.com.tw'],
2503 onStart : function () {
2504 Object.defineProperty(Aak.uw, 'AntiAd', {
2505 enumerable : true,
2506 writable : false,
2507 value : null
2508 });
2509 }
2510 },
2511 armorgames_com : {
2512 // issue: https://github.com/reek/anti-adblock-killer/issues/845
2513 host : ['armorgames.com'],
2514 onStart : function () {
2515 Object.defineProperty(Aak.uw, 'ga_detect', {
2516 enumerable : true,
2517 writable : false,
2518 value : null
2519 });
2520 }
2521 },
2522 mangahost_com : {
2523 // issue: https://github.com/reek/anti-adblock-killer/issues/957
2524 // issue: https://github.com/reek/anti-adblock-killer/issues/558
2525 // source: http://pastebin.com/GrpbJENA
2526 host : ['mangahost.com'],
2527 onStart : function () {
2528 Object.defineProperty(Aak.uw, "testDisplay", {
2529 enumerable : true,
2530 writable : false,
2531 value : false
2532 });
2533 }
2534 },
2535 videowood_tv : {
2536 // issue: https://github.com/reek/anti-adblock-killer/issues/1339
2537 // source: http://videowood.tv/build/assets/js/pembed-97a640f625.js
2538 host : ['videowood.tv'],
2539 onStart : function () {
2540 Aak.uw.open = function () {}; // prevent popup
2541 Aak.uw.config = {};
2542 Object.defineProperty(Aak.uw.config, "adb_remind", {
2543 enumerable : true,
2544 writable : false,
2545 value : false
2546 });
2547 }
2548 },
2549 infojobs_com_br : {
2550 // issue: https://github.com/reek/anti-adblock-killer/issues/1339
2551 // source: http://pastebin.com/LPg6093U
2552 // redirect: http://www.infojobs.com.br/nopublicity.aspx
2553 host : ['infojobs.com.br'],
2554 onStart : function () {
2555 Aak.addScript(function () {
2556 var webUI = webUI || {};
2557 webUI.Utils = webUI.Utils || {};
2558 Object.defineProperty(webUI.Utils, "StopAdBlock", {
2559 enumerable : true,
2560 writable : false,
2561 value : function () {}
2562 });
2563 });
2564 }
2565 },
2566 cloudwebcopy_com : {
2567 // issue: https://github.com/reek/anti-adblock-killer/issues/714
2568 host : ['cloudwebcopy.com'],
2569 onStart : function () {
2570 var setTimeoutClone = Aak.uw.setTimeout;
2571 Aak.uw.setTimeout = null;
2572 setTimeout(function () {
2573 Aak.uw.setTimeout = setTimeoutClone;
2574 }, 5000);
2575 }
2576 },
2577 narkive_com : {
2578 // issue: https://github.com/reek/anti-adblock-killer/issues/569
2579 host : ['narkive.com'],
2580 onAlways : function () {
2581 Aak.uw.adblock_status = function () {
2582 return false;
2583 };
2584 }
2585 },
2586 pregen_net : {
2587 host : ['pregen.net'],
2588 onStart : function () {
2589 // skip page info
2590 Aak.setCookie('pgn', 1);
2591 }
2592 },
2593 phys_org : {
2594 // issue: https://github.com/reek/anti-adblock-killer/issues/768
2595 host : ['phys.org'],
2596 onAlways : function () {
2597 Aak.uw.chkAB = function () {};
2598 }
2599 },
2600 onvasortir_com : {
2601 // issue: https://github.com/reek/anti-adblock-killer/issues/338
2602 // issue: https://github.com/reek/anti-adblock-killer/issues/333
2603 // issue: https://github.com/reek/anti-adblock-killer/issues/330
2604 // issue: https://github.com/reek/anti-adblock-killer/issues/91
2605 // issue: https://github.com/reek/anti-adblock-killer/issues/89
2606 host : ['onvasortir.com'],
2607 onAlways : function () {
2608 // +abp rule alt solution
2609 Aak.uw.sas = {};
2610 }
2611 },
2612 ville_ideale_com : {
2613 // issue: https://github.com/reek/anti-adblock-killer/issues/258
2614 // source: http://pastebin.com/16mnmeMc
2615 host : ['ville-ideale.com'],
2616 onAlways : function () {
2617 // +abp rule alt solution
2618 Aak.uw.execsp = function () {};
2619 }
2620 },
2621 notre_planete_info : {
2622 // issue: https://github.com/reek/anti-adblock-killer/issues/258
2623 // source: http://pastebin.com/qrS6QGGE
2624 host : ['notre-planete.info'],
2625 onAlways : function () {
2626 // +abp rule alt solution
2627 Aak.uw.pubpop = function () {};
2628 }
2629 },
2630 apkmirror_com : {
2631 // issue: https://github.com/reek/anti-adblock-killer/issues/378
2632 // issue: https://github.com/reek/anti-adblock-killer/issues/224
2633 // issue: https://github.com/reek/anti-adblock-killer/issues/78
2634 host : ['apkmirror.com'],
2635 onAlways : function () {
2636 Aak.uw.doCheck = function () {};
2637 }
2638 },
2639 mtlblog_com : {
2640 // issue: https://github.com/reek/anti-adblock-killer/issues/948
2641 // issue: https://greasyfork.org/forum/discussion/7753
2642 // source: http://pastebin.com/BFrDPM6b
2643 host : ['mtlblog.com'],
2644 onStart : function () {
2645 Object.defineProperty(Aak.uw, 'puabs', {
2646 enumerable : true,
2647 value : function () {}
2648 });
2649 }
2650 },
2651 anizm_com : {
2652 // issue:
2653 host : ['anizm.com'],
2654 onAlways : function () {
2655 Aak.uw.stopAdBlock = {};
2656 }
2657 },
2658 diarioinformacion_com : {
2659 // issue: https://github.com/reek/anti-adblock-killer/issues/1550
2660 host : ['diarioinformacion.com'],
2661 onStart : function () {
2662 Object.defineProperty(Aak.uw, 'pr_okvalida', {
2663 enumerable : true,
2664 value : true
2665 });
2666 }
2667 },
2668 cnbeta_com : {
2669 // issue: https://github.com/reek/anti-adblock-killer/issues/1301
2670 // source: http://pastebin.com/vXNCztwx
2671 host : ['cnbeta.com'],
2672 onStart : function () {
2673 Object.defineProperty(Aak.uw, 'JB', {
2674 enumerable : true,
2675 value : function () {}
2676 });
2677 }
2678 },
2679 themarker_haaretz : {
2680 // issue: https://github.com/reek/anti-adblock-killer/issues/1292
2681 // source: http://pastebin.com/m08dkDT4
2682 host : ['themarker.com', 'haaretz.co.il'],
2683 onStart : function () {
2684 Object.defineProperty(Aak.uw, 'AdBlockUtil', {
2685 enumerable : true,
2686 value : {}
2687 });
2688 }
2689 },
2690 pipocas_tv : {
2691 // issue:
2692 host : ['pipocas.tv'],
2693 onStart : function () {
2694 // Also added in disableAlertbox
2695 // No popup
2696 Aak.setCookie('popup_user_login', 'yes');
2697 }
2698 },
2699 _15min_lt : {
2700 // issue: https://github.com/reek/anti-adblock-killer/issues?q=15min.it
2701 // source: http://pastebin.com/YWf3HTqr
2702 host : ['15min.lt'],
2703 onStart : function () {
2704 Object.defineProperty(Aak.uw, '__adblock_js_test', {
2705 enumerable : true,
2706 writable : false,
2707 value : true
2708 });
2709 }
2710 },
2711 sc2casts_com : {
2712 // by: Giwayume
2713 // issue: https://github.com/reek/anti-adblock-killer/issues/1599
2714 host : ['sc2casts.com'],
2715 onStart : function() {
2716 Aak.addScript(function() {
2717 window._gaq = { push:function() {} };
2718 Object.defineProperty(window, "showdialog", {
2719 value: function() {},
2720 configurable: false,
2721 writable: false
2722 });
2723 Object.defineProperty(window, "showPopup2", {
2724 value: function() {},
2725 configurable: false,
2726 writable: false
2727 });
2728 });
2729 }
2730 },
2731 vgunetwork_com : {
2732 // issue:
2733 host : ['vgunetwork.com'],
2734 onIdle : function () {
2735 Aak.setCookie('stopIt', 1);
2736 var close = Aak.getElement('#some_ad_block_key_close');
2737 if (close) {
2738 close.click();
2739 }
2740 }
2741 },
2742 seekingalpha_com : {
2743 // issue:
2744 host : ['seekingalpha.com'],
2745 onAlways : function () {
2746 Aak.uw.SA.Pages.Article.is_gnikcolbda = function () {
2747 return false;
2748 };
2749 }
2750 },
2751 linkcrypt_ws : {
2752 // issue: https://github.com/reek/anti-adblock-killer/issues/286
2753 // issue: https://github.com/reek/anti-adblock-killer/pull/67
2754 host : ['linkcrypt.ws'],
2755 onIdle : function () {
2756 Aak.setElement('#ad_cont', {
2757 id : '',
2758 style : 'display:block;'
2759 });
2760 Aak.setElement('#container_check', {
2761 style : 'display:none;'
2762 });
2763 }
2764 },
2765 eventosppv_me : {
2766 // issue:
2767 host : ['eventosppv.me'],
2768 onIdle : function () {
2769 Aak.removeElement('#nf37');
2770 }
2771 },
2772 bolor_toli_com : {
2773 // issue: https://github.com/reek/anti-adblock-killer/issues/552
2774 host : ['bolor-toli.com'],
2775 onEnd : function () {
2776 var ads = document.getElementsByClassName('banner');
2777 for (var i = 0; i < ads.length; i++) {
2778 var ad = ads[i];
2779 ad.innerHTML = '<br>';
2780 ad.style.height = '1px';
2781 }
2782 }
2783 },
2784 vivo_sx : {
2785 // issue: https://github.com/reek/anti-adblock-killer/issues/280
2786 host : ['vivo.sx'],
2787 onEnd : function () {
2788 var alert = Aak.getElement('#alert-throttle');
2789 if (alert) {
2790 Aak.removeElement(alert);
2791 }
2792 var button = Aak.getElement('button#access');
2793 if (button) {
2794 button.removeAttribute('id');
2795 button.removeAttribute('disabled');
2796 button.innerHTML = 'Continue to video';
2797 }
2798 setTimeout(function () {
2799 var input = Aak.getElement('input[name="throttle"]');
2800 if (input) {
2801 Aak.removeElement(input);
2802 }
2803 }, 1000);
2804 }
2805 },
2806 luxyad_com : { // skip redirect myanimes.li
2807 // issue:
2808 host : ['luxyad.com'],
2809 onIdle : function () {
2810 if ('/Information.php' == location.pathname) {
2811 var href = location.href;
2812 location.href = href.substr(href.indexOf('url=') + 4, href.length);
2813 }
2814 }
2815 },
2816 mrpiracy_domains : {
2817 // issue: https://github.com/reek/anti-adblock-killer/issues/1405
2818 host : ['mrpiracy.xyz', 'mrpiracy.club'],
2819 onBeforeScript : function () {
2820 return [{
2821 contains : 'Desativa o AdBlock para continuar',
2822 external : false,
2823 remove : true
2824 }
2825 ];
2826 }
2827 },
2828 dbplanet_net : {
2829 // issue: PM
2830 host : ['dbplanet.net'],
2831 onStart : function () {
2832 Aak.setCookie('newnoMoreAdsNow', 1);
2833 }
2834 },
2835 aidemu_fr : {
2836 // issue:
2837 host : ['aidemu.fr'],
2838 onStart : function () {
2839 Aak.setCookie('adblockPopup', true);
2840 }
2841 },
2842 eami_in : {
2843 // issue:
2844 host : ['eami.in'],
2845 onAlways : function () {
2846 Aak.setCookie('ad_locked', 1);
2847 }
2848 },
2849 bigdownloader_com : {
2850 // issue:
2851 host : ['bigdownloader.com'],
2852 onIdle : function () {
2853 Aak.removeElement('#anti_adblock');
2854 }
2855 },
2856 freeskier_com : {
2857 // by: Gorhill
2858 // issue: https://github.com/reek/anti-adblock-killer/issues/639
2859 // note: also added list rule
2860 host : ['freeskier.com'],
2861 onIdle : function () {
2862 var el = document.getElementById("adb-not-enabled");
2863 if (el !== null) {
2864 el.style.removeProperty("display");
2865 }
2866 el = document.getElementById("videoContainer");
2867 if (el !== null) {
2868 el.style.removeProperty("display");
2869 }
2870 }
2871 },
2872 gametrailers_com : {
2873 // issue:
2874 host : ['gametrailers.com'],
2875 onIdle : function () {
2876 Aak.removeElement('#ad_blocking');
2877 }
2878 },
2879 scan_onepiece_naruto_mx : {
2880 // issue: https://github.com/reek/anti-adblock-killer/issues/582
2881 // issue: https://github.com/reek/anti-adblock-killer/issues/279
2882 host : ['scan-mx.com', 'onepiece-mx.net', 'naruto-mx.net'],
2883 onAlways : function () {
2884 Aak.uw.ad_block_test = function () {};
2885 },
2886 onIdle : function () {
2887 Aak.setElement('#yop', {
2888 id : ''
2889 });
2890 }
2891 },
2892 // Bitcoins
2893 bitcoinker_com : {
2894 // issue: https://github.com/reek/anti-adblock-killer/issues/230
2895 host : ['bitcoinker.com'],
2896 onStart : function () {
2897 Aak.uw.claim = function () {
2898 return true;
2899 };
2900 },
2901 onIdle : function () {
2902 Aak.removeElement('#E33FCCcX2fW');
2903 }
2904 },
2905 moondoge_co_in : {
2906 // issue: https://github.com/reek/anti-adblock-killer/issues/384
2907 // issue: https://github.com/reek/anti-adblock-killer/issues/232
2908 // issue: https://github.com/reek/anti-adblock-killer/issues/233
2909 // issue: https://github.com/reek/anti-adblock-killer/issues/236
2910 host : ['moondoge.co.in', 'moonliteco.in', 'moonbit.co.in', 'bitcoinzebra.com'],
2911 onIdle : function () {
2912 Aak.removeElement('#AB, #E442Dv, #eCC5h');
2913 }
2914 },
2915 bitcoiner_net : {
2916 // issue: https://github.com/reek/anti-adblock-killer/issues/349
2917 host : ['bitcoiner.net', 'litecoiner.net'],
2918 onStart : function () {
2919 Aak.addBaitElement('div#tester');
2920 Aak.addBaitElement('div#ad-top');
2921 }
2922 },
2923 bitcoins_nx_tc : {
2924 // issue:
2925 host : ['freebitcoins.nx.tc', 'getbitcoins.nx.tc'],
2926 onAlways : function () {
2927 Aak.uw.ad_block_test = function () {
2928 return false;
2929 };
2930 }
2931 },
2932 freecoins4_me : {
2933 // issue:
2934 host : ['freecoins4.me'],
2935 onAlways : function () {
2936 Aak.uw.check = function () {
2937 return false;
2938 };
2939 }
2940 },
2941 torrent_tv_ru : {
2942 // issue: https://github.com/reek/anti-adblock-killer/issues/537
2943 host : ['torrent-tv.ru'],
2944 onAlways : function () {
2945 Aak.uw.c_Oo_Advert_Shown = true;
2946 }
2947 },
2948 cwtv_com : {
2949 // by: Kalbasit
2950 // pull: https://github.com/reek/anti-adblock-killer/pull/763
2951 // issue: https://github.com/reek/anti-adblock-killer/issues/340
2952 // issue: https://github.com/reek/anti-adblock-killer/issues/762
2953 host : ['cwtv.com'],
2954 onAlways : function () {
2955 Aak.uw.CWTVIsAdBlocking = undefined;
2956 }
2957 },
2958 bild_de : {
2959 // issue: https://github.com/reek/anti-adblock-killer/issues?q=bild
2960 host : ['bild.de'],
2961 onBeforeScript : function () {
2962 return [{
2963 contains : 'http://www.bild.de/wa/ll/bild-de/unangemeldet-42925516.bild.html',
2964 external : false,
2965 replace : ['javascript', 'void(0);'].join(':')
2966 }
2967 ];
2968 }
2969 },
2970 inn_co_il : {
2971 // issue: https://github.com/reek/anti-adblock-killer/issues/532
2972 host : ['inn.co.il'],
2973 onStart : function () {
2974 Aak.addScript(function () {
2975 var TRC = {};
2976 TRC.blocker = {
2977 states : {
2978 ABP_DETECTION_DISABLED : -2,
2979 ABP_NOT_DETECTED : 0,
2980 ABP_DETECTED : 1
2981 },
2982 createBlockDetectionDiv : function () {
2983 return document.createElement("div");
2984 },
2985 isBlockDetectedOnDiv : function () {
2986 return 0;
2987 },
2988 isBlockDetectedOnClassNames : function () {
2989 return 0;
2990 },
2991 getBlockedState : function () {
2992 return 0;
2993 }
2994 };
2995 });
2996 }
2997 },
2998 turkanime_tv : {
2999 // issue: https://github.com/reek/anti-adblock-killer/issues/446
3000 // issue: https://github.com/reek/anti-adblock-killer/issues/139
3001 // issue: https://greasyfork.org/tr/forum/discussion/4282/
3002 host : ['turkanime.tv'],
3003 onAlways : function () {
3004 Aak.uw.adblockblock = function () {};
3005 Aak.uw.BlokKontrol = {};
3006 }
3007 },
3008 wtfbit_ch : {
3009 // issue: https://github.com/reek/anti-adblock-killer/issues/407
3010 host : ['wtfbit.ch'],
3011 onAlways : function () {
3012 Aak.uw.writeHTMLasJS = function () {};
3013 }
3014 },
3015 aranzulla_it : {
3016 // issue: https://github.com/reek/anti-adblock-killer/issues?q=aranzulla.it
3017 // source: http://pastebin.com/yMM6YgxW
3018 host : ['aranzulla.it'],
3019 onStart : function () {
3020 Object.defineProperty(Aak.uw, "abCheck", {
3021 value : {},
3022 configurable : false,
3023 writable : false
3024 });
3025 }
3026 },
3027 lesechos_fr : {
3028 // Reek, Giwayume
3029 // issue: https://github.com/reek/anti-adblock-killer/issues?q=lesechos.fr
3030 // source: http://pastebin.com/CMM8WGLj
3031 host : ['lesechos.fr', 'lesechos.com'],
3032 onStart : function() {
3033 Aak.addScript(function() {
3034 Object.defineProperty(window, "checkAdBlock", {
3035 value: function() {},
3036 configurable: false,
3037 writable: false
3038 });
3039 });
3040 },
3041 onAlways : function () {
3042 Aak.uw.call_Ad = 1;
3043 Aak.uw.paywall_adblock_article = function () {};
3044 }
3045 },
3046 bitvisits_com : {
3047 // issue: https://github.com/reek/anti-adblock-killer/issues/266
3048 host : ['bitvisits.com'],
3049 onAlways : function () {
3050 Aak.uw.blockAdblockUser = function () {};
3051 }
3052 },
3053 exrapidleech_info : {
3054 // by: Alexander255, Reek, Giwayume
3055 // patch: http://pastebin.com/Q664diQ2
3056 // issue: https://github.com/reek/anti-adblock-killer/issues?q=exrapidleech
3057 // source: http://pastebin.com/5e27syjA
3058 host : ['exrapidleech.info'],
3059 onStart : function () {
3060
3061 var tomorrow = new Date();
3062 tomorrow.setDate(tomorrow.getDate() + 1);
3063
3064 // prevent popup
3065 Aak.setCookie('popcashpuCap', 1);
3066 Aak.setCookie('popcashpu', 1);
3067 Aak.setCookie('nopopatall', tomorrow.getTime().toString());
3068 Aak.setCookie('noadvtday', 0);
3069 //Aak.setCookie('bv_DSKskdck_s1d', 'bvDSKskdcks1d');
3070
3071 // hide notice
3072 Aak.addStyle('div.container div.row div.col-md-5 div.row fieldset div.alert.alert-danger.lead, div.container div.row div.panel.panel-default div.panel-body p {display:none;}');
3073
3074 // prevent redirect to verify page
3075 Object.defineProperty(Aak.uw, 'bdvbnr_pid', {
3076 enumerable : true,
3077 value : []
3078 });
3079
3080 Aak.addScript(function () {
3081 (function () {
3082 // prevent popup
3083 window.open = function () {};
3084
3085 // prevent redirect to verify page
3086 var frame1 = document.createElement('iframe');
3087 frame1.src = 'http://bdfrm.bidvertiser.com/BidVertiser.dbm?pid=383865&bid=1737418&RD=';
3088 frame1.id = 'bdvi';
3089 frame1.style = 'display:none';
3090 document.documentElement.appendChild(frame1);
3091 })();
3092 });
3093 }
3094 },
3095 vipleague_domains : {
3096 // note: also killed by AakList
3097 // issue: https://github.com/reek/anti-adblock-killer/issues?q=vipbox
3098 // issue: https://github.com/reek/anti-adblock-killer/issues?q=vipleague
3099 // source: http://pastebin.com/NERVzHzS
3100 host : ["vipleague.is", "vipleague.ws", "vipleague.tv", "vipleague.se", "vipleague.tv", "vipleague.me", "vipleague.mobi", "vipleague.co", "vipleague.sx", "vipleague.ch", "vipbox.tv", "vipbox.co", "vipbox.biz", "vipbox.sx", "vipbox.eu", "vipbox.so", "vipbox.nu", "vipboxsa.co", "strikeout.co", "strikeout.me", "homerun.re", "vipboxtv.co", "vipapp.me"],
3101 onStart : function () {
3102 Aak.uw.iExist = true;
3103 Aak.setCookie('xclsvip', 1);
3104 Aak.addStyle(".vip_052x003 { height: 250px; }");
3105 Aak.addStyle(".vip_09x827 { height: 26px; }");
3106 }
3107 },
3108 vg_no : {
3109 // issue: https://github.com/reek/anti-adblock-killer/issues/292
3110 // +abp rule
3111 host : ['vg.no', 'e24.no'],
3112 onAlways : function () {
3113 Aak.uw.__AB__ = function () {};
3114 }
3115 },
3116 pornve_com : {
3117 // issue: https://github.com/reek/anti-adblock-killer/issues/947
3118 // source: http://pastebin.com/7TPPkq12
3119 host : ['pornve.com'],
3120 onAlways : function () {
3121 Aak.uw.adxjwupdate = 1;
3122 }
3123 },
3124 lol_moa_tw : {
3125 // issue: https://github.com/reek/anti-adblock-killer/issues/1114
3126 host : ['lol.moa.tw'],
3127 onIdle : function () {
3128 Aak.addScript(function () {
3129 var MoaObj = MoaObj || {};
3130 MoaObj.ad = MoaObj.ad || {};
3131 MoaObj.ad.hasAdblock = function () {
3132 return false;
3133 };
3134 MoaObj.ad.checkABP = function () {
3135 return false;
3136 };
3137 });
3138 }
3139 },
3140 multiup_org : {
3141 // by: Watilin
3142 // note: alternative solution
3143 // issue: https://github.com/reek/anti-adblock-killer/issues/677
3144 host : ['multiup.org'],
3145 onEnd : function () {
3146 var links = document.querySelectorAll("a.btn[style]");
3147 for (var i = 0; i < links.length; i++) {
3148 if ("none" === links[i].style.display)
3149 links[i].style.display = "";
3150 }
3151 var buttons = document.querySelectorAll("button.detect");
3152 for (i = 0; i < buttons.length; i++) {
3153 buttons[i].style.display = "none";
3154 }
3155 }
3156 },
3157 dailybitcoins_org : {
3158 // issue: https://github.com/reek/anti-adblock-killer/issues/107
3159 host : ['dailybitcoins.org'],
3160 onIdle : function () {
3161 Aak.removeElement('.ad-img');
3162 }
3163 },
3164 kozaczek_zeberka : {
3165 // issue: https://github.com/reek/anti-adblock-killer/issues/414
3166 host : ['kozaczek.pl', 'zeberka.pl'],
3167 onStart : function () {
3168 Aak.setCookie('ablc', 1);
3169 Aak.setCookie('cookie_policy', 1);
3170 }
3171 },
3172 spankwire_sites : {
3173 // issue: https://github.com/reek/anti-adblock-killer/issues/887
3174 // source: http://pastebin.com/TFB1dtgb
3175 host : ['spankwire.com', 'keezmovies.com', 'extremetube.com', 'mofosex.com'],
3176 onStart : function () {
3177 Aak.setCookie("abClosed", "true");
3178 Aak.setCookie("hide_ad_msg", "1");
3179 }
3180 },
3181 youporn_network : {
3182 // issue: https://github.com/reek/anti-adblock-killer/issues/887
3183 // source: http://pastebin.com/TFB1dtgb
3184 host : ['youporn.com', 'youporngay.com'],
3185 onStart : function () {
3186 Aak.setCookie("adblock_message", "closed");
3187 }
3188 },
3189 psarips_com : {
3190 // issue: https://github.com/reek/anti-adblock-killer/issues/153
3191 host : ['psarips.com'],
3192 onStart : function () {
3193 Aak.addBaitElement('div#advert');
3194 }
3195 },
3196 extratorrent_domains : {
3197 host : ['extratorrent.cc', 'extratorrent.com'],
3198 onStart : function () {
3199 // prevent popup
3200 // source are obfuscated in external js
3201 Aak.setCookie('ppu_delay', 1);
3202 Aak.setCookie('ppu_main', 1);
3203 Aak.setCookie('ppu_sub', 1);
3204 Aak.setCookie('ppu_show_on', 1);
3205 }
3206 },
3207 tny_cz : {
3208 host : ['tny.cz', 'pasted.co'],
3209 onStart : function () {
3210 // prevent popup
3211 Aak.setCookie('__.popunderCap', 1);
3212 Aak.setCookie('__.popunder', 1);
3213 }
3214 },
3215 clubedohardware_com_br : { // two antiadblock
3216 host : ['clubedohardware.com.br'],
3217 onStart : function () {
3218 if (Aak.contains(location.host, 'forum')) {
3219 // Solution 1
3220 Aak.addStyle("#banner, script { height: 51px; }");
3221 Aak.addBaitElement('div#banner');
3222 } else { // Website
3223 // Solution 1
3224 Aak.addBaitElement('div.banner_topo');
3225 }
3226 },
3227 onIdle : function () {
3228 if (Aak.contains(location.host, 'forum')) {
3229 // Solution 2
3230 Aak.uw.addBlocking.hide();
3231 Aak.uw.addBlocking.kill();
3232 } else { // Website
3233 // Solution 2
3234 document.body.id = '';
3235 Aak.removeElement('.adblock');
3236 }
3237 }
3238 },
3239 debrastagi_com : {
3240 host : ['debrastagi.com'],
3241 onIdle : function () {
3242 Aak.removeElement('#stp-main');
3243 Aak.removeElement('#stp-bg');
3244 }
3245 },
3246 ddlfrench_org : {
3247 host : ['ddlfrench.org'],
3248 onIdle : function () {
3249 // Fix bug display content
3250 Aak.setElement('#dle-content .d-content', {
3251 'class' : ''
3252 });
3253 Aak.setElement('#content', {
3254 'id' : ''
3255 });
3256 }
3257 },
3258 megadebrid_eu : {
3259 host : ['mega-debrid.eu'],
3260 onEnd : function () {
3261 // Activate button debrid
3262 Aak.setElement('.realbutton', {
3263 'onclick' : '',
3264 'type' : 'submit'
3265 });
3266 }
3267 },
3268 slideplayer_domains : {
3269 // by: Alexander255
3270 // issue: https://github.com/reek/anti-adblock-killer/issues/1333
3271 // issue: https://github.com/reek/anti-adblock-killer/issues/515
3272 // issue: https://github.com/reek/anti-adblock-killer/issues/296
3273 // demo: http://slideplayer.fr/slide/1304026/#
3274 host : ['slideplayer.*'],
3275 onEnd : function () {
3276
3277 // Disable anti-adblocker
3278 Aak.uw.force_remove_ads = true;
3279
3280 // Circumvent "share to download" rule
3281 Aak.addScript(function () {
3282 var slide_id = window.get_current_slide_id();
3283 var slide_srv = document.getElementById("player_frame").src.split("/")[3];
3284 var time = 86400 + Math.floor(Date.now() / 1000);
3285 var secret = encodeURIComponent(window.strtr(window.MD5.base64("secret_preved slideplayer never solved " + time + slide_id + ".ppt"), "+/", "- "));
3286
3287 var url = "http://player.slideplayer.org/download/" + slide_srv + "/" + slide_id + "/" + secret + "/" + time + "/" + slide_id + ".ppt";
3288 var links = document.querySelectorAll("a.download_link");
3289 for (var i = 0; i < links.length; i++) {
3290 /* Remove original "share to download" popup event listener */
3291 var events = $._data(links[i]).events.click;
3292 events.splice(0, events.length);
3293
3294 /* Set normal link href instead */
3295 links[i].href = url;
3296 }
3297 });
3298
3299 }
3300 },
3301 bokepspot_com : {
3302 host : ['bokepspot.com'],
3303 onStart : function () {
3304 // Hide Disclaimer
3305 Aak.setCookie('hideDialog', 'hide');
3306 },
3307 onIdle : function () {
3308 // Remove Disable AdBlock
3309 Aak.removeElement('#tupiklan');
3310 }
3311 },
3312 picload_com : {
3313 host : ['picload.org'],
3314 onStart : function () {
3315 Aak.setCookie('pl_adblocker', false);
3316 },
3317 onIdle : function () {
3318 Aak.uw.ads_loaded = true;
3319 Aak.uw.imageAds = false;
3320 Aak.removeElement('div[oncontextmenu="return false;"]');
3321 }
3322 },
3323 freezedownload_com : {
3324 host : ['freezedownload.com'],
3325 onIdle : function () {
3326 if (/freezedownload.com\/download\//.test(location.href)) {
3327 Aak.removeElement('body > div[id]');
3328 }
3329 }
3330 },
3331 monnsutogatya_com : {
3332 // issue: PM
3333 // source: http://pastebin.com/1Lw60h6k
3334 host : ['monnsutogatya.com'],
3335 onIdle : function () {
3336 Aak.addStyle("#site-box {display:block;}");
3337 Aak.removeElement('#for-ad-blocker');
3338 }
3339 },
3340 rapid8_com : {
3341 host : ['rapid8.com'],
3342 onIdle : function () {
3343 Aak.removeElement('div.backk + #blcokMzg');
3344 Aak.removeElement('div.backk');
3345 }
3346 },
3347 turkdown_com : {
3348 host : ['turkdown.com'],
3349 onIdle : function () {
3350 // remove facebook box
3351 Aak.removeElement('#duyuru');
3352 }
3353 },
3354 filmovizija_domains : {
3355 host : ['filmovizija.me', 'filmovizija.com', 'filmovizija.in', 'filmovizija.net'],
3356 onIdle : function () {
3357 /*
3358 var d = new Date();
3359 var weekday = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
3360 var n = weekday[d.getDay()];
3361 Aak.setElement('#' + n, {
3362 html : ''
3363 });
3364 Aak.removeElement('#' + n);
3365 */
3366 }
3367 },
3368 hackintosh_zone : {
3369 // by: Alexander255
3370 // issue: https://github.com/reek/anti-adblock-killer/issues/559
3371 // issue: https://github.com/reek/anti-adblock-killer/issues/427
3372 // issue: https://github.com/reek/anti-adblock-killer/issues/187
3373 // issue: https://github.com/reek/anti-adblock-killer/pull/114
3374 // source: http://paste2.org/DnB9Oj4f
3375 host : ['hackintosh.zone'],
3376 onStart : function () {
3377 Aak.setCookie('ips4_lastvisit', 0, false, location.pathname);
3378 },
3379 onIdle : function () {
3380
3381 var head = document.getElementsByTagName("head")[0];
3382 // Fake Google ad frame content
3383 var ad1 = document.createElement("ins");
3384 ad1.className = "adsbygoogle";
3385 ad1.appendChild(document.createTextNode("AAK"));
3386 head.insertBefore(ad1, head.childNodes[0]);
3387
3388 /*
3389 // Fake CleanMyMac ad frame size
3390 var ad2 = document.createElement("div");
3391 ad2.id = "nycuhevgqi";
3392 Object.defineProperty(ad2.wrappedJSObject, 'clientHeight', {value: 1});
3393 head.insertBefore(ad2, head.childNodes[0]);
3394 */
3395
3396 var elems = document.querySelectorAll('.adsensegrey');
3397 for (var i = 0; i < elems.length; i++) {
3398 var node = document.createElement("img");
3399 node.src = Aak.imgBait;
3400 elems[i].appendChild(node);
3401 }
3402
3403 },
3404 onBeforeScript : function () {
3405 return [{
3406 contains : 'disable ADBlock completely',
3407 external : false,
3408 remove : true
3409 }
3410 ];
3411 }
3412 },
3413 privateinsta_com : {
3414 host : ['privateinsta.com'],
3415 onIdle : function () {
3416 // + abp rule
3417 Aak.uw.dont_scroll = false;
3418 Aak.removeElement("#overlay_div");
3419 Aak.removeElement("#overlay_main_div");
3420 }
3421 },
3422 risikogesundheit_de : {
3423 host : ['risiko-gesundheit.de'],
3424 onIdle : function () {
3425 setTimeout(function () {
3426 window.stop();
3427 }, 5000);
3428 }
3429 },
3430 oneplaylist_eu_pn : {
3431 host : ['oneplaylist.eu.pn'],
3432 onIdle : function () {
3433 // kill popunder
3434 Aak.uw.makePopunder = false;
3435 }
3436 },
3437 onmeda_de : {
3438 // note: script obfuscated line 1110
3439 // issue: https://greasyfork.org/forum/discussion/8576
3440 // issue: https://github.com/reek/anti-adblock-killer/issues/1067
3441 // source: http://pastebin.com/qf46bN3z
3442 // source: http://pastebin.com/RwHyF0NL
3443 host : ['onmeda.de'],
3444 onAlways : function () {
3445 Aak.uw.$ADP = true;
3446 Aak.uw.sas_callAd = function () {};
3447 Aak.uw.sas_callAds = function () {};
3448 }
3449 },
3450 turbodebrideur_com : {
3451 // issue: https://github.com/reek/anti-adblock-killer/issues/599
3452 // issue: https://github.com/reek/anti-adblock-killer/issues/563
3453 // issue: https://github.com/reek/anti-adblock-killer/issues/526
3454 host : ['turbodebrideur.com'],
3455 onIdle : function () {
3456 Aak.createElement({
3457 tag : 'div',
3458 id : 'pubdirecte',
3459 html : '<img src="' + Aak.imgBait + '"/><a href="#"> </a>',
3460 append : 'body'
3461 });
3462 }
3463 },
3464 rockfile_eu : {
3465 // issue: https://github.com/reek/anti-adblock-killer/issues/1256
3466 host : ['rockfile.eu'],
3467 onIdle : function () {
3468 Aak.createElement({
3469 tag : 'iframe',
3470 src : 'about:blank',
3471 style : 'visibility:hidden;',
3472 append : 'body'
3473 });
3474 }
3475 },
3476 linkbucks_antiadblock : {
3477 // issue: https://github.com/reek/anti-adblock-killer/issues/932
3478 // issue: https://github.com/reek/anti-adblock-killer/issues/469
3479 // issue: https://github.com/reek/anti-adblock-killer/issues/277
3480 // v3: http://pastebin.com/0gh8LMGH
3481 // note: no solution, anti-adblock difficult to bypass --> http://pastebin.com/1NRq7WvZ
3482 host : ['linkbucks.com', 'miniurls.co', 'picbucks.com', 'picturesetc.net', 'placepictures.com', 'poontown.net', 'qqc.co', 'qvvo.com', 'realfiles.net', 'rqq.co', 'seriousdeals.net', 'seriousfiles.com', 'seriousurls.com', 'sexpalace.gs', 'theseblogs.com', 'thesefiles.com', 'theseforums.com', 'thosegalleries.com', 'tinybucks.net', 'tinylinks.co', 'tnabucks.com', 'tubeviral.com', 'uberpicz.com', 'ubervidz.com', 'ubucks.net', 'ugalleries.net', 'ultrafiles.net', 'urlbeat.net', 'urlpulse.net', 'whackyvidz.com', 'youfap.me', 'yyv.co', 'zxxo.net', 'zff.co', 'linkbucksdns.co', 'miniurls.com', 'dyo.gs', 'goneviral.com', 'eafyfsuh.net', 'sasontnwc.net'],
3483 onStart : function () {
3484 // do nothing...
3485 }
3486 },
3487 linkbucks_visitscript : {
3488 // issue:
3489 host : ['referencemega.com', 'fpabd.com', 'crackacc.com'],
3490 onStart : function () {
3491 // Skip visitScript when site use CloudFlare Rocket Script
3492 Aak.setCookie('_lbGatePassed', true);
3493 }
3494 },
3495 link_tl : {
3496 // issue: https://github.com/reek/anti-adblock-killer/issues?q=link.tl
3497 // issue: https://greasyfork.org/fr/forum/discussion/8437
3498 // source: http://pastebin.com/1MkCnmL7
3499 host : ['link.tl'],
3500 onStart : function () {
3501 Aak.addStyle('.adblock { height:1px; }');
3502 Aak.uw.adblocker = false;
3503 }
3504 },
3505 wstream_video : {
3506 // issue: https://github.com/reek/anti-adblock-killer/issues/1382
3507 // source: http://pastebin.com/EiARVQXt
3508 host : ['wstream.video'],
3509 onStart : function () {
3510 Aak.addStyle('#adiv { height:4px; }');
3511 }
3512 },
3513 _4shared_com : {
3514 host : ['4shared.com'],
3515 onIdle : function () {
3516 // Hide "Disable AdBlodk" messages
3517 document.querySelector('body').classList.remove("jsBlockDetect");
3518 }
3519 },
3520 pro_domains : {
3521 host : ['pro-zik.ws', 'pro-tect.ws', 'pro-ddl.ws', 'pro-sport.ws'],
3522 onStart : function () {
3523 Aak.setCookie('visitedf', true);
3524 Aak.setCookie('visitedh', true);
3525 }
3526 },
3527 comptoirhardware_com : {
3528 host : ['comptoir-hardware.com'],
3529 onAlways : function () {
3530 Aak.uw.adblock = 'non';
3531 }
3532 },
3533 bakersfield_com : {
3534 // issue: https://github.com/reek/anti-adblock-killer/issues/657
3535 // note: also solution to AakList
3536 host : ['bakersfield.com'],
3537 onAlways : function () {
3538 Aak.uw.AD_SLOT_RENDERED = true;
3539 }
3540 },
3541 ekstrabladet_dk : {
3542 // issue: https://github.com/reek/anti-adblock-killer/issues?q=ekstrabladet
3543 // source: http://pastebin.com/R029XpCr
3544 host : ['ekstrabladet.dk', 'eb.dk'],
3545 onAlways : function () {
3546 Aak.uw.ADTECH = {};
3547 }
3548 },
3549 pcgames_download_net : {
3550 // issue: https://github.com/reek/anti-adblock-killer/issues/1451
3551 // issue: https://greasyfork.org/forum/discussion/9328
3552 // source: http://pastebin.com/EBVZg3VB
3553 host : ['pcgames-download.net'],
3554 onAlways : function () {
3555 Aak.setCookie('noAdblockNiceMessage', 1);
3556 Aak.uw.mgCanLoad30547 = true;
3557 }
3558 },
3559 lachainemeteo_com : {
3560 // note: also killed by AakList
3561 // issue: https://github.com/reek/anti-adblock-killer/issues/590
3562 // issue: https://github.com/reek/anti-adblock-killer/issues/245
3563 // issue: https://github.com/reek/anti-adblock-killer/issues/215
3564 host : ['lachainemeteo.com'],
3565 onAlways : function () {
3566 Aak.uw.js_loaded = true;
3567 }
3568 },
3569 mac4ever_com : {
3570 // issue: https://github.com/reek/anti-adblock-killer/issues/997
3571 // source: http://pastebin.com/RQnCEYK6
3572 host : ['mac4ever.com'],
3573 onAlways : function () {
3574 Aak.uw.coquinou = function () {};
3575 }
3576 },
3577 thesimsresource_com : {
3578 // issue: https://github.com/reek/anti-adblock-killer/issues?q=thesimsresource.com
3579 // source: http://pastebin.com/DE9rbjxY
3580 host : ['thesimsresource.com'],
3581 onAlways : function () {
3582 Aak.uw.gadsize = true;
3583 Aak.uw.iHaveLoadedAds = true;
3584 }
3585 },
3586 yellowbridge_com : {
3587 host : ['yellowbridge.com'],
3588 onAlways : function () {
3589 Aak.uw.finalizePage = function () {
3590 return;
3591 };
3592 }
3593 },
3594 game_debate_com : {
3595 // issue: https://github.com/reek/anti-adblock-killer/issues/1366
3596 // source: http://pastebin.com/UzsiX0FK
3597 host : ['game-debate.com'],
3598 onAlways : function () {
3599 Aak.uw.ad_block_test = function () {};
3600 }
3601 },
3602 adscendmedia : {
3603 host : ['adscendmedia.com'],
3604 onStart : function () {
3605 // adscendmedia - https://www.adscendmedia.com/
3606 var ref = document.createElement('a').href = document.referrer;
3607 var host = location.host;
3608 var path = location.pathname;
3609 if (Aak.contains(path, '/widget_adblock.php') && !Aak.contains(ref.host, host)) {
3610 // Auto report
3611 Aak.detected('Adscendmedia', ref.host, host);
3612 // Notification
3613 Aak.notification('You must subscribe to <b>AakList (Anti-Adblock Killer )</b> <a href="' + Aak.subscribeURL + '" target="_blank">Subscribe</a>');
3614 }
3615 }
3616 },
3617 adworkmedia : {
3618 host : ['adworkmedia.com', 'loxtk.com', 'contentlockingnetworks.com'],
3619 onStart : function () {
3620 // AdWorkMedia - https://www.adworkmedia.com/
3621 var ref = document.createElement('a').href = document.referrer;
3622 var host = location.host;
3623 var path = location.pathname;
3624 if (Aak.contains(path, '/help/removeAB.php') && !Aak.contains(ref.host, host)) {
3625 // Auto report
3626 Aak.info('Adworkmedia', ref.host, host);
3627 // Notification
3628 Aak.notification('You must subscribe to <b>AakList (Anti-Adblock Killer )</b> <a href="' + Aak.subscribeURL + '" target="_blank">Subscribe</a>');
3629 }
3630 }
3631 },
3632 // --------------------------------------------------------------------------------------------
3633 // Players
3634 // --------------------------------------------------------------------------------------------
3635 kissanime_com : {
3636 // issue: https://github.com/reek/anti-adblock-killer/issues/451
3637 // issue: https://github.com/reek/anti-adblock-killer/issues/381
3638 // issue: https://github.com/reek/anti-adblock-killer/issues/302
3639 // issue: https://github.com/reek/anti-adblock-killer/issues/257
3640 // issue: https://github.com/reek/anti-adblock-killer/issues/178
3641 // issue: https://github.com/reek/anti-adblock-killer/issues/196
3642 // issue: https://github.com/reek/anti-adblock-killer/issues/56
3643 host : ['kissanime.com', 'kissanime.to'],
3644 onStart : function () {
3645 // Masking ads
3646 Aak.addStyle('iframe[id^="adsIfrme"], .divCloseBut { display:none; }');
3647 // Solution 1
3648 Aak.uw.DoDetect2 = null;
3649 },
3650 onIdle : function () {
3651
3652 // Solution 1 abp rule
3653 // @@||kissanime.com^$elemhide
3654
3655 var divContentVideo = document.querySelector('#divContentVideo');
3656
3657 // Solution 2
3658 if (Aak.uw.DoDetect2) {
3659 Aak.uw.DoDetect2 = null;
3660 Aak.uw.CheckAdImage = null;
3661 Aak.info('Solution 2');
3662 } //Solution 3
3663 else if (divContentVideo) {
3664
3665 var divDownload = document.querySelector('#divDownload').cloneNode(true);
3666
3667 setTimeout(function () {
3668 divContentVideo.innerHTML = '';
3669 Aak.uw.DoHideFake();
3670 divContentVideo.appendChild(divDownload);
3671 Aak.removeElement('iframe[id^="adsIfrme"], .divCloseBut');
3672 Aak.info('Solution 3');
3673 }, 5500);
3674 }
3675 }
3676 },
3677 Kisscartoon_me : {
3678 // issue: https://github.com/reek/anti-adblock-killer/issues/488
3679 host : ['kisscartoon.me'],
3680 onAlways : function () {
3681 Aak.uw.xaZlE = function () {};
3682 },
3683 onIdle : function () {
3684 Aak.removeElement('iframe[id^="adsIfrme"]');
3685 }
3686 },
3687 openload_domains : {
3688 // issue: https://github.com/reek/anti-adblock-killer/issues?q=openload
3689 host : ['openload.co', 'openload.io', 'openload.tv'],
3690 onStart : function () {
3691 Aak.uw.adblock = false;
3692 Aak.uw.adblock2 = false;
3693 Aak.uw.popAdsLoaded = true;
3694 // hide fake play button used to open popunder
3695 //Aak.addStyle('#videooverlay { display:none; }')
3696 }
3697 },
3698 youwatch_network : {
3699 // issue: https://github.com/reek/anti-adblock-killer/issues/1293
3700 // issue: https://github.com/reek/anti-adblock-killer/issues/308
3701 // issue: https://github.com/reek/anti-adblock-killer/issues/529
3702 // issue: https://github.com/reek/anti-adblock-killer/issues/535
3703 // test: http://youwatch.org/embed-59p7i3cdkse0-453x320.html
3704 // test: http://youwatch.org/59p7i3cdkse0
3705 host : ['youwatch.org', 'chouhaa.info'],
3706 onStart : function () {
3707 // skip anti-adblock
3708 Aak.uw.adsShowPopup = 1;
3709 },
3710 onIdle : function () {
3711 // renove ads + fake play button
3712 Aak.removeElement('#player_img, #player_img + div[id]');
3713 }
3714 },
3715 exashare_com : {
3716 // by: Watilin
3717 // pull: https://github.com/reek/anti-adblock-killer/pull/519
3718 // issue: https://github.com/reek/anti-adblock-killer/issues/624
3719 // issue: https://github.com/reek/anti-adblock-killer/issues/486
3720 // issue: https://github.com/reek/anti-adblock-killer/issues/506
3721 // test: http://exashare.com/galw2ge2kzsv
3722 host : ['exashare.com', 'chefti.info', 'bojem3a.info', 'ajihezo.info'],
3723 onStart : function () {
3724 // skip anti-adblock
3725 Aak.uw.adsShowPopup = 1;
3726 },
3727 onIdle : function () {
3728 // renove ads + fake play button
3729 Aak.removeElement('#player_img, #player_img + div[id]');
3730 }
3731 },
3732 an1me_se : {
3733 // issue: https://github.com/reek/anti-adblock-killer/issues/190
3734 host : ['an1me.se'],
3735 onIdle : function () {
3736 setTimeout(function () {
3737 Aak.uw.isBlockAds2 = false;
3738 }, 10000);
3739 }
3740 },
3741 hqq_tv : { // putlocker.is
3742 host : ['hqq.tv'],
3743 onIdle : function () {
3744 // + abp rule
3745 // http://hqq.tv/player/embed_player.php?vid=R3DGHG3GKXX7&autoplay=no
3746 if ('/player/embed_player.php' == location.pathname) {
3747 document.querySelector('form[id^="form-"]').submit();
3748 }
3749 }
3750 },
3751 // Poland
3752 wp_domains : {
3753 // Note: disable EasyPrivacy
3754 // issue: https://github.com/reek/anti-adblock-killer/issues/956
3755 // issue: https://github.com/reek/anti-adblock-killer/issues/905
3756 // issue: https://github.com/reek/anti-adblock-killer/issues/300
3757 host : ['biztok.pl', 'wp.tv', 'wp.pl', 'sportowefakty.pl', 'kafeteria.tv', 'kafeteria.pl', '.wrzuta.pl', 'pudelek.tv', 'komediowo.pl', 'sfora.pl', 'autokrata.pl', 'sportfan.pl', 'wawalove.pl', 'hotmoney.pl', 'aleseriale.pl', 'babol.pl', 'snobka.pl', 'nocoty.pl', 'money.pl', 'abczdrowie.pl', 'gadzetomania.pl', 'autokult.pl', 'komorkomania.pl'],
3758 onStart : function () {
3759 // prevent popup anti-adblock from abczdrowie.pl
3760 Aak.setCookie('ABCABC', true);
3761 },
3762 onIdle : function () {
3763
3764 Aak.hasElement('.wp-player', function () {
3765
3766 var replacePlayerWP = function (mid, player) {
3767 /* Request
3768 http://get.wp.tv/?mid=1661056
3769 http://wp.tv/player/mid,1661056,embed.json
3770 http://get.wp.tv/?f=2896462.1426329056904.l.webm&rnd=1
3771 https://wp.tv/player/mid,1747117,embed.json
3772 */
3773 Aak.request({
3774 url : 'http://wp.tv/player/mid,' + mid + ',embed.json',
3775 onload : function (result) {
3776 var res = result.responseText;
3777 var obj = JSON.parse(res);
3778 Aak.log(obj);
3779
3780 var Player = new Aak.player();
3781 Player.videojs(player, {
3782 source : Aak.fixProtocolURL(obj.clip.url[1].url), // HD
3783 type : 'mp4',
3784 autoplay : false
3785 });
3786 }
3787 });
3788 };
3789
3790 var replacePlayerWrzuta = function (key, channel, elem) {
3791 Aak.request({
3792 // http://www.wrzuta.pl/npp/embed/wolnapolska2/0I0HQ2mutJc
3793 url : 'http://www.wrzuta.pl/npp/embed/' + channel + '/' + key,
3794 onload : function (result) {
3795 var res = result.responseText;
3796 var obj = JSON.parse(res);
3797 Aak.log(obj);
3798
3799 var Player = new Aak.player();
3800 Player.videojs(elem, {
3801 source : Aak.fixProtocolURL(obj.url[0].url), //HD
3802 type : 'mp4',
3803 autoplay : false
3804 });
3805 }
3806 });
3807 };
3808
3809 // Using an external flash player is impossible because protected by crossdomain.xml
3810 var players = document.querySelectorAll('.wp-player'); // #Player0, #Player1, #mainPlayer
3811 if (players.length) {
3812 // fixbug gm_xhr loop request - http://tinyurl.com/pqa9htq
3813 for (var i = 0; i < players.length; i++) {
3814 var mid = null;
3815 var player = players[i];
3816 var parent = player.parentNode;
3817 var script = player.previousSibling;
3818 var title = player.querySelector('.titleCont a.title');
3819 var embedvideos = document.querySelectorAll('script[src*="/embed_video.js"]');
3820 Aak.log(player, parent, script, title);
3821
3822 if (embedvideos.length) {
3823 // pudelek.wrzuta.pl: http://tinyurl.com/l8jo5v2
3824 // pudelek.tv: http://tinyurl.com/klyzh6r, http://tinyurl.com/z7fr89v
3825 // pudelek.tv (triple): http://tinyurl.com/n9b27o2
3826 // film.wp.pl: http://tinyurl.com/q7k5bxp
3827 var embedvideo = embedvideos[i];
3828 var key = /key=(\w+)/.exec(embedvideo.src)[1];
3829 var channel = /login=(\w+)/.exec(embedvideo.src)[1];
3830 var autostart = /autoplay/.test(embedvideo.src);
3831 replacePlayerWrzuta(key, channel, player, autostart);
3832 Aak.log('embed_video.js');
3833 } else if (title && /mid/.test(title.href)) {
3834 // sportowefakty.pl: http://tinyurl.com/l6zabcx
3835 mid = title.href.match(/mid[=,]([0-9]+)/);
3836 Aak.log('title.href');
3837 } else if (parent.id) {
3838 if (parent.dataset.url) {
3839 // wp.tv: http://tinyurl.com/pzde29t
3840 mid = parent.dataset.url.match(/mid[=,]([0-9]+)/);
3841 Aak.log('parent.dataset.url');
3842 } else {
3843 if (parent.previousSibling.innerHTML) {
3844 // wiadomosci.wp.pl: http://tinyurl.com/gqtt9ca
3845 mid = parent.previousSibling.innerHTML.match(/mid[=,]([0-9]+)/);
3846 Aak.log('script.inline.innerHTML');
3847 } else {
3848 // kafeteria.tv: http://tinyurl.com/nofp58a
3849 // abczdrowie.pl: http://tinyurl.com/hx6s5et
3850 mid = parent.innerHTML.match(/mid[=,]([0-9]+)/);
3851 Aak.log('parent.innerHTML');
3852 }
3853 }
3854 } else if (script && script.tagName == 'SCRIPT') {
3855 // film.wp.pl: http://tinyurl.com/mh9onfw
3856 // pudelek.tv (double): http://tinyurl.com/lefvwtx
3857 mid = script.innerHTML.match(/mid[=,]([0-9]+)/);
3858 Aak.log('script.src.innerHTML');
3859 }
3860 if (mid !== null && mid.length == 2) {
3861 replacePlayerWP(mid[1], player);
3862 }
3863 }
3864 }
3865 });
3866 }
3867 },
3868 moje_filmy_tk : {
3869 // issue: https://github.com/reek/anti-adblock-killer/issues/1010
3870 // source: http://pastebin.com/7G2RBnqq
3871 host : ['moje-filmy.tk'],
3872 onIdle : function () {
3873 var searchvalue = ['var playerInstance', '});'];
3874 var script = Aak.hasScript(searchvalue[0]);
3875
3876 if (script) {
3877 var source = script.innerHTML;
3878 var str = source.substring(source.lastIndexOf(searchvalue[0]), source.lastIndexOf(searchvalue[1]) + searchvalue[1].length);
3879 Aak.addScript(str);
3880 }
3881 }
3882 },
3883 tvn_pl : {
3884 // by: Reek, Marek
3885 // solution: http://tinyurl.com/ohbvz4r, http://tinyurl.com/jq8s462
3886 // issue: https://github.com/reek/anti-adblock-killer/issues/581
3887 // issue: https://github.com/reek/anti-adblock-killer/issues/510
3888 // issue: https://github.com/reek/anti-adblock-killer/issues/293
3889 // issue: https://github.com/reek/anti-adblock-killer/issues/192
3890 // test: http://tinyurl.com/o6d9h66, http://tinyurl.com/z77m4zh
3891 host : ['tvn.pl', 'tvn24.pl', 'player.pl'],
3892 onEnd : function () {
3893 Aak.hasElement('header.detailImage', function (thisElement) {
3894 if (Aak.getCookie('country_code') && Aak.getSession('generateToken')) {
3895 var parts = document.location.href.split(/[.,]/);
3896 var id = parts[parts.length - 2];
3897 var params = {
3898 platform : "Mobile",
3899 terminal : "Android",
3900 format : "json",
3901 v : "2.0",
3902 authKey : "b4bc971840de63d105b3166403aa1bea",
3903 type : "episode",
3904 id : id,
3905 sort : "newest",
3906 m : "getItem",
3907 deviceScreenHeight : 1600,
3908 deviceScreenWidth : 2560
3909 };
3910 var api = 'https://api.tvnplayer.pl/api/?' + Aak.serialize(params);
3911 var proxy = 'http://www.proxy.xmc.pl/index.php?hl=3e5&q=';
3912
3913 // Get videoUrl
3914 Aak.request({
3915 url : Aak.getCookie('country_code') != 'PL' ? proxy + Aak.encodeURI(api) : api,
3916 headers : {
3917 "User-Agent" : "Mozilla/5.0 (Linux; U; Android 4.2; en-us; Nexus 10 Build/JVP15I) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30"
3918 },
3919 onload : function (result) {
3920 var res = result.responseText;
3921 Aak.log(res);
3922 var o = JSON.parse(res);
3923 var videoUrl = o.item.videos.main.video_content[Number(Aak.opts.videoHD)].url;
3924 var generateToken = new Function('videoUrl', Aak.getSession('generateToken'));
3925 var videoUrlWithSeed = generateToken(videoUrl);
3926 var Player = new Aak.player();
3927 Player.videojs(thisElement, {
3928 source : videoUrlWithSeed,
3929 type : 'mp4',
3930 autoplay: false
3931 }, {}, {insert:'inner'});
3932 }
3933 });
3934 } else {
3935 Aak.request({ // get and store generateToken function
3936 url : 'http://pastebin.com/raw/D9qM4DR3',
3937 onload : function (response) {
3938 var res = response.responseText;
3939 Aak.setSession('generateToken', res);
3940 Aak.request({ // get user ip
3941 url : 'http://ip-api.com/json',
3942 onload : function (response) {
3943 var res = response.responseText;
3944 var json = JSON.parse(res);
3945 Aak.setCookie('country_code', json.countryCode);
3946 Aak.refresh();
3947 }
3948 });
3949 }
3950 });
3951 }
3952 });
3953 }
3954 },
3955 ipla_tv : {
3956 // by: Marek
3957 // solution: http://tinyurl.com/ptb4ybg
3958 // issue. https://github.com/reek/anti-adblock-killer/issues/522
3959 // test: http://tinyurl.com/hz7gpxx
3960 host : ['ipla.tv'],
3961 onIdle : function () {
3962 Aak.addStyle('.html5-player-wrapper { display:none; }'); // chrome/opera
3963 var oldPlayer = document.querySelector('.html5-player-wrapper, #vod-player');
3964 Aak.request({
3965 url : '/VOD/play-in-ipla/' + location.href.match(/\/vod-(\d+)/)[1],
3966 onload : function (result) {
3967 var videoURL;
3968 var res = result.responseText;
3969 var idn = res.match(/ipla:\/\/playvod-1\|([a-z0-9]+)/)[1];
3970 Aak.log(idn);
3971 Aak.request({
3972 url : 'http://getmedia.redefine.pl/vods/get_vod/?cpid=1&ua=mipla/23&media_id=' + idn,
3973 onload : function (result) {
3974 var res = result.responseText;
3975 var o = JSON.parse(res);
3976 Aak.log(o);
3977 if (o.vod.video_hd) {
3978 videoURL = o.vod.video_hd;
3979 } else if (o.vod.video) {
3980 videoURL = o.vod.video;
3981 } else {
3982 videoURL = o.vod.copies[0].url;
3983 }
3984
3985 var Player = new Aak.player();
3986 Player.videojs(oldPlayer, {
3987 source : videoURL,
3988 type : 'mp4',
3989 width : 820,
3990 height : 450,
3991 autoplay : false
3992 });
3993 }
3994 });
3995 }
3996 });
3997 }
3998 },
3999 koscian_net : {
4000 // issue: https://github.com/reek/anti-adblock-killer/issues/914
4001 // source: http://pastebin.com/yGSPBRqe
4002 host : ['koscian.net'],
4003 onIdle : function () {
4004 var elems = document.querySelectorAll('.ban');
4005 for (var i = 0; i < elems.length; i++) {
4006 elems[i].remove();
4007 //elems[i].innerHTML = '<br>';
4008 }
4009 }
4010 },
4011 // France
4012 playtv_fr : { // research solution
4013 host : ['play.tv', 'playtv.fr'],
4014 onAlways : function () {},
4015 onEnd : function () {}
4016 },
4017 rmcsportbfmtv_com : { // webradio
4018 host : ['rmcsport.bfmtv.com'],
4019 onIdle : function () {
4020
4021 var flashvars = {
4022 urlRadio : "http://mp3lg4.tdf-cdn.com/10160/rmc.mp3",
4023 nom : "live",
4024 categorie : "live",
4025 urlSmart : "" // set empty to remove audio ad
4026 };
4027 var params = {
4028 wmode : "transparent"
4029 };
4030
4031 Aak.uw.swfobject.embedSWF("/swf/RMCLIVE.swf", "liveplayer", "70", "90", "10.0.0", "", flashvars, params);
4032 }
4033 },
4034 eclypsia_com : {
4035 host : ['eclypsia.com'],
4036 onAlways : function () {
4037 // Solution 1
4038 // abp rules
4039
4040 // Solution 2
4041 Aak.uw.isABActivated = function () {
4042 return false;
4043 }; // Kill antiadblock
4044 Aak.uw.refresh_iframe = function () {}; // Stop ads to be loaded
4045 },
4046 onEnd : function () {
4047 // Solution 3
4048 var element = document.querySelector('div[id^="webtv_iframe_"]');
4049 if (element !== null) {
4050 var videoId = element.id.split('_')[2];
4051 setTimeout(function () {
4052 element.innerHTML = '<iframe frameborder="0" width="812" height="500" src="http://www.dailymotion.com/embed/video/' + videoId + '?logo=0&autoPlay=1&autoMute=0"></iframe>';
4053 }, 1000);
4054 }
4055 }
4056 },
4057 m6web_fr : {
4058 // issue: https://github.com/reek/anti-adblock-killer/issues/461
4059 // test: http://tinyurl.com/ptn2vrl
4060 host : ['m6web.fr'],
4061 onEnd : function () {
4062 var player = document.querySelector('object[id$="_flash_api"]');
4063 var script = Aak.hasScript('M6.Player.config');
4064
4065 if (player !== null && script !== null) {
4066 var found = script.innerHTML.match(/M6.Player.config = (\{.+\});/);
4067 var config = JSON.parse(found.pop());
4068
4069 // Replace player
4070 var Player = new Aak.player();
4071 Player.videojs(player.parentNode, {
4072 source : config.sources[1].src,
4073 type : 'mp4',
4074 autoplay : false
4075 });
4076
4077 }
4078 }
4079 },
4080 gamingroom_tv : {
4081 host : ['gamingroom.tv'],
4082 onAlways : function () {
4083 Aak.uw.adblock_detect = function () {};
4084 Aak.uw.GR_adblock_hide_video = function () {};
4085 Aak.uw.adblock_video_msg_start = function () {};
4086 Aak.uw.adblock_video_msg_stop = function () {};
4087 Aak.uw.disable_chat = function () {};
4088 }
4089 },
4090 // Germany
4091 now_domains : {
4092 // issue: https://github.com/reek/anti-adblock-killer/issues/336
4093 // test: http://tinyurl.com/peeobou
4094 // test: http://jsbin.com/vucobejofo
4095 host : ['voxnow.de', 'rtl-now.rtl.de', 'rtl2now.rtl2.de', 'n-tvnow.de', 'superrtlnow.de', 'rtlnitronow.de', 'nowtv.de'],
4096 onIdle : function () {
4097 /*
4098 var Player = new Aak.player();
4099 Player.editing('#videoplayer', {
4100 unsetFlashvars : 'abcheck_enabled,adcall,adclasses,adconfig,admeta,adslog,agof,ama,angebot,as,asparts,breakad,connectioncheck,cslog,dev,dimmer,errorlog,feedback,fmsident,gtv,highlights,ivw,ivw_play,js,js_event_function,logo,logo_basewidth,logopos,nielsen,ord,osmf,svm,tile,videoplaza,videoplaza_base_url,videoplaza_share,videoplaza_tag,vpEnvironmentURL,xl'
4101 });
4102 */
4103 }
4104 },
4105 rtl_de : {
4106 // issue: https://github.com/reek/anti-adblock-killer/issues/1541
4107 // test: http://tinyurl.com/h7ccvqq
4108 host : ['rtl.de'],
4109 onIdle : function () {
4110 Array.prototype.slice.call(document.querySelectorAll('div[data-widget="video"]')).map(function (video) {
4111 var cfg = Aak.intoObject(video.dataset.playerLayerCfg);
4112 var file = cfg.videoinfo.mp4url;
4113 Aak.log(video, cfg, file);
4114
4115 // Replace player
4116 var Player = new Aak.player();
4117 Player.videojs(video, {
4118 source : file,
4119 type : 'mp4',
4120 autoplay : false
4121 });
4122 });
4123 }
4124 },
4125 myspass_de : {
4126 // issue: https://github.com/reek/anti-adblock-killer/issues/76
4127 // test: http://tinyurl.com/lto9pyd
4128 host : ['myspass.de'],
4129 onIdle : function () {
4130 var videoid = location.pathname.match(/\/(\d+)\/$/);
4131
4132 if (videoid !== null) {
4133 Aak.request({
4134 url : 'http://www.myspass.de/myspass/includes/apps/video/getvideometadataxml.php?id=' + videoid[1],
4135 onload : function (result) {
4136 var res = result.responseText;
4137 Aak.log(res);
4138
4139 // Get video
4140 var parser = new window.DOMParser();
4141 var dom = parser.parseFromString(res, "application/xml");
4142 var file = dom.getElementsByTagName("url_flv").item(0).textContent;
4143
4144 // Remove elements
4145 Aak.removeElement('div.loadingGif');
4146
4147 // Replace player
4148 var Player = new Aak.player();
4149 Player.videojs('#player', {
4150 source : file,
4151 type : 'mp4',
4152 autoplay : false
4153 });
4154
4155 }
4156 });
4157 }
4158 }
4159 },
4160 // Nederland
4161 rtlxl_nl : {
4162 // test: http://tinyurl.com/l2zkv3d
4163 host : ['rtlxl.nl', 'rtlnieuws.nl'],
4164 onEnd : function () {
4165 var Player = new Aak.player();
4166 Player.editing('#_rtlosmf0', {
4167 setFlashvars : {
4168 adblock : false
4169 }
4170 });
4171 }
4172 },
4173 // Norway
4174 vgtv_network : {
4175 // note: skip video ads + anti-adblock
4176 // jwplayer: http://tinyurl.com/zyv79hg
4177 // issue: https://github.com/reek/anti-adblock-killer/issues/1402
4178 // issue: https://github.com/reek/anti-adblock-killer/issues/367
4179 // test: http://tinyurl.com/nwp85t, http://tinyurl.com/nwp85t
4180 host : ['vgtv.no', 'vg.no'],
4181 onEnd : function () {
4182 var oldHash = null;
4183 var videoId = null;
4184 var videoIdRegex = /#\!\/video\/(\d+)\//;
4185
4186 // check if the location hash changes
4187 setInterval(function () {
4188 var player = Aak.getElement('.video-player');
4189
4190 if (player && location.hash != oldHash && videoIdRegex.test(location.hash)) {
4191 oldHash = location.hash;
4192 videoId = oldHash.match(videoIdRegex)[1];
4193/*
4194 var hlsurl = 'https://svpsecurehdvod-vh.akamaihd.net/i/2016/03/20160312_56e421f86af45_vg01/,1280_720_3500,960_540_1500,640_360_800,480_270_500,.mp4.csmil/master.m3u8';
4195 console.log(player)
4196
4197 // don't work with chrome
4198 // player.innerHTML = '<div id="noAdPlayer">This text will be replaced with a player.</div>';
4199
4200
4201 // can't load m3u8 4032 status code
4202 //console.log(unsafeWindow.jwplayer)
4203
4204 Aak.request({
4205 url : 'http://svp.vg.no/svp/api/v1/vgtv/assets/' + videoId + '?additional=settings|chapters|cuePoints|externalId|barrels|externalCategoryId|nextAsset&appName=vgtv-website',
4206 onload : function (result) {
4207 var res = result.responseText;
4208 var obj = JSON.parse(res);
4209 Aak.log(obj);
4210
4211 // replace player
4212 var Player = new Aak.player();
4213 Player.vlc(player, {
4214 source : obj.streamUrls.hls, // m3u8
4215 type : 'hls',
4216 autoplay : false
4217 });
4218 }
4219 }, {}, {
4220 insert : 'inner'
4221 });
4222*/
4223 }
4224 }, 1e3);
4225 }
4226 },
4227 mtg_radio : {
4228 // issue: https://github.com/reek/anti-adblock-killer/issues/1495
4229 host : ['play.radio1.se', 'play.bandit.se', 'play.lugnafavoriter.com', 'play.rixfm.se'],
4230 onEnd : function () {
4231 Aak.addScript(function () {
4232 setTimeout(function () {
4233 window.player_load_live(window.stream_id);
4234 }, 1000);
4235 });
4236 }
4237 },
4238 dplay_network : {
4239 // issue: https://github.com/reek/anti-adblock-killer/issues/1463
4240 host : ['dplay.com', 'dplay.dk', 'dplay.se'],
4241 onStart : function () {
4242 var date = new Date();
4243 date.setDate(date.getDate() + 365);
4244 var timestamp = date.getTime().toString();
4245 var value = JSON.stringify({
4246 "notificationSubmission" : "submitted",
4247 "reportingExpiry" : timestamp,
4248 "notificationExpiry" : timestamp
4249 });
4250 Aak.setCookie('dsc-adblock', value);
4251 }
4252 },
4253 viasat_tv : {
4254 // note: skip video ads + anti-adblock
4255 // issue: https://github.com/reek/anti-adblock-killer/issues?q=tv3play
4256 /* test: http://www.tv3play.no/programmer/redningsskoyta hds/hls
4257 http://www.tv3play.dk/programmer/linse-og-didde-ekstra hds/hls
4258 http://www.tv3play.se/program/glamourama hds/hls
4259 http://www.tv6play.se/program/99-saker-man-maste-gora-innan-man-dor hds/hls
4260 http://www.tv8play.se/program/efterlyst--1 hds/hls
4261 http://www.tv10play.se/program/garpens-europa hds/hls
4262 http://tvplay.skaties.lv/parraides/tv3-zinas hds/hls
4263 http://play.tv3.lt/programos/beatos-virtuve rtmp/hls
4264 http://tv3play.tv3.ee/sisu/puhapaev-sepoga rtmp/hls */
4265 host : ['tv3play.no', 'tv3play.dk', 'tv3play.se', 'tv6play.se', 'tv8play.se', 'tv10play.se', 'tvplay.skaties.lv', 'play.tv3.lt', 'tv3play.tv3.ee'],
4266 onIdle : function () {
4267 Aak.hasElement('#video-player', function (thisElement) {
4268 thisElement.id = '';
4269 //var videoId = location.pathname.split('/').pop();
4270 var videoId = thisElement.getAttribute('data-video-id');
4271 Aak.log(thisElement, videoId);
4272
4273 // get video sources
4274 Aak.request({
4275 url : 'http://playapi.mtgx.tv/v3/videos/stream/' + videoId,
4276 onload : function (result) {
4277 var res = result.responseText;
4278 var obj = JSON.parse(res);
4279 Aak.log(obj);
4280
4281 /* Innholdet du prøver å se er kun tilgjengelig for brukere i Norge
4282 Programmet er blokeret for visning fra denne geografiske position.
4283 Programą galite matyti tik jungdamiesi iš Lietuvos interneto tiekėjų tinklų */
4284 if (obj.msg) {
4285 return thisElement.innerHTML = obj.msg;
4286 }
4287
4288 if (location.host === 'tv3play.tv3.ee') {
4289 var Player = new Aak.player();
4290 Player.grindplayer(thisElement, {
4291 source : obj.streams.medium,
4292 type : 'rtmp/mp4',
4293 autoplay : true
4294 });
4295 } else {
4296 // create video tag for new player
4297 Aak.createElement({
4298 tag : 'video',
4299 id : 'noAdPlayer',
4300 classid : 'video-js vjs-default-skin',
4301 width : thisElement.clientWidth || 730,
4302 height : thisElement.clientHeight || 410,
4303 preload : 'auto',
4304 controls : true,
4305 autoplay : true,
4306 replace : thisElement
4307 });
4308
4309 // parse sources
4310 var srcArray = [];
4311 if (obj.streams.high && obj.streams.high !== '') {
4312 srcArray.push({
4313 type : "video/mp4", // mp4
4314 src : obj.streams.high
4315 });
4316 } if (obj.streams.hls && obj.streams.hls !== '') {
4317 srcArray.push({
4318 type : "application/x-mpegURL", // m3u8
4319 src : obj.streams.hls
4320 });
4321 } if (obj.streams.medium && obj.streams.medium !== '') {
4322 var type = obj.streams.medium.indexOf('rtmp') === 0 ? 'rtmp/mp4' : 'application/f4m+xml';
4323 srcArray.push({
4324 type : type,
4325 src : obj.streams.medium
4326 });
4327 }
4328 Aak.log(srcArray, JSON.stringify(srcArray));
4329
4330 // initialize new player
4331 Aak.addScript(Aak.intoString(function () {
4332 (function () {
4333 function onVjsReady() {
4334 if (typeof window.videojs !== 'function') {
4335 onVjsReady();
4336 } else {
4337 window.videojs("noAdPlayer").src(/_SOURCES_/);
4338 }
4339 }
4340 onVjsReady();
4341 })();
4342 }).replace("/_SOURCES_/", JSON.stringify(srcArray)));
4343 }
4344 }
4345 });
4346 });
4347 }
4348 },
4349 // Russia
4350 rutube_ru : { // research solution
4351 /* test: http://rutube.ru/video/bd5f6047657f0bdcbfbb0edad2bb7c61/ */
4352 host : ['rutube.ru'],
4353 onEnd : function () {
4354 Aak.hasElement('#rutubePlayerHolder', function () { //dmFyIG9wdHMgPSBBYWsuZ2V0RWxlbWVudCgiI29wdGlvbnMiKTsNCiAgICAgICAgICAgIHZhciBvID0gQWFrLmludG9PYmplY3Qob3B0cy5kYXRhc2V0LnZhbHVlKTsNCiAgICAgICAgICAgIHZhciBtM3U4VXJsID0gby52aWRlb19iYWxhbmNlci5tM3U4Ow0KICAgICAgICAgICAgY29uc29sZS5sb2cobTN1OFVybCk7DQoNCiAgICAgICAgICAgIHZhciBQbGF5ZXIgPSBuZXcgQWFrLnBsYXllcigpOw0KICAgICAgICAgICAgUGxheWVyLnZpZGVvanMoJyNydXR1YmVQbGF5ZXJIb2xkZXInLCB7DQogICAgICAgICAgICAgICAgc291cmNlIDogbTN1OFVybCwNCiAgICAgICAgICAgICAgICB0eXBlIDogJ2hscycsDQogICAgICAgICAgICAgICAgLy9wcm94eTogdHJ1ZSwNCiAgICAgICAgICAgICAgICBhdXRvcGxheSA6IHRydWUNCiAgICAgICAgICAgICAgfTsgKTs=
4355 });
4356 }
4357 },
4358 // Italy
4359 rai_tv : { // research solution
4360 host : ['rai.tv'],
4361 onStart : function () {},
4362 onIdle : function () {}
4363 },
4364 // TV Stream
4365 block_streams_tv : {
4366 // note: redirect to http://block.streams.tv/
4367 host : ['firstrow.co', 'firstrows.ru', 'firstrows.tv', 'firstrows.org', 'firstrows.co', 'firstrows.biz', 'firstrowus.eu', 'firstrow1us.eu', 'firstsrowsports.eu', 'firstrowsportes.tv', 'firstrowsportes.com', 'justfirstrowsports.com', 'hahasport.me', 'wiziwig.ru', 'wiziwig.sx', 'wiziwig.to', 'wiziwig.tv', 'myp2p.biz', 'myp2p.tv', 'myp2p.la', 'myp2p.ec', 'myp2p.eu', 'myp2p.sx', 'myp2p.ws', 'myp2p.com', 'atdhe.ru', 'atdhe.se', 'atdhe.bz', 'atdhe.top', 'atdhe.to', 'atdhe.me', 'atdhe.mx', ' atdhe.li', 'atdhe.al'],
4368 onAlways : function () {
4369 Aak.setCookie("adb", 1); // prevent anti-adblock
4370 Aak.uw.open = function () {}; // prevent popup
4371 Aak.addStyle("#bannerInCenter, #hiddenBannerCanvas { display: none; }"); // hide ads
4372 }
4373 },
4374 buzina_xyz : {
4375 // note: disable refcontrol, used by firstrowsports
4376 // issue: https://github.com/reek/anti-adblock-killer/issues/1268
4377 // issue: https://github.com/reek/anti-adblock-killer/issues/1243
4378 // issue: https://github.com/reek/anti-adblock-killer/issues/889
4379 // issue: https://greasyfork.org/forum/discussion/8975
4380 // source: http://pastebin.com/8VTrkvS9
4381 host : ['buzina.xyz', 'farmet.info', 'rimladi.com', 'kitorelo.com', 'omnipola.com', 'porosin.co.uk', 'rimleno.com', 'simple4alls.com', 'arsopo.com'],
4382 onStart : function () {
4383 Aak.addStyle("#adsframe { height: 151px; }");
4384 },
4385 onIdle : function () {
4386 if (/buzina.xyz/.test(location.host)) { // keeps same host stream
4387 Aak.hasElement('iframe[src*=".php?hash="]', function (thisElement) {
4388 // http://arsopo.com/w2.php?hash=panda58
4389 // http://www.buzina.xyz/nana1v1.php?onthetop
4390 var parts = thisElement.src.split('/');
4391 parts[2] = Aak.rules.buzina_xyz.host.pop();
4392 Aak.log(thisElement, parts);
4393 thisElement.src = parts.join('/');
4394
4395 /* dmFyIG8gPSB7CgkJCSAgICAicGxheWxpc3QiIDogW3sKCQkJICAgICAgICAicHJvdmlkZXIiIDogInJ0bXAiLAoJCQkgICAgICAgICJ1cmwiIDogInBhbmRhMT9lJTNEMTQ2NTA3MDMyNiUyNnN0JTNEUHJ0SFl5dkJ6ZDlaZDdoRF9mUkhUZzExMTEzMCIKCQkJICAgICAgfQoJCQkgICAgXSwKCQkJICAgICJwbHVnaW5zIiA6IHsKCQkJICAgICAgInJ0bXAiIDogewoJCQkgICAgICAgICJ1cmwiIDogImZsb3dwbGF5ZXIucnRtcC0zLjIuMTEuc3dmIiwgCgkJCQkJLy8idXJsIjogImh0dHA6Ly9yZWxlYXNlcy5mbG93cGxheWVyLm9yZy9zd2YvZmxvd3BsYXllci5ydG1wLTMuMi4xMS5zd2YiLAoJCQkgICAgICAgICJuZXRDb25uZWN0aW9uVXJsIiA6ICJydG1wOi8vMTg1LjgyLjIxNS40NTozNTc5L3ZvZC8iCgkJCSAgICAgIH0sCgkJCSAgICAgICJjb250cm9scyIgOiB7CgkJCQkgICAgInVybCI6ICJodHRwOi8vcmVsZWFzZXMuZmxvd3BsYXllci5vcmcvc3dmL2Zsb3dwbGF5ZXIuY29udHJvbHMtMy4yLjE2LnN3ZiIsIC8vIGFkZGVkIGJlY2F1c2UgbWlzc2luZwoJCQkgICAgICAgICJwbGF5IiA6IGZhbHNlLAoJCQkgICAgICAgICJzY3J1YmJlciIgOiBmYWxzZQoJCQkgICAgICB9CgkJCSAgICB9LAoJCQkgICAgInBsYXllcklkIiA6ICJwbGF5ZXIiLAoJCQkgICAgImNsaXAiIDogewoJCQkgICAgICAidXJsIiA6ICJwYW5kYTE/ZSUzRDE0NjUwNzAzMjYlMjZzdCUzRFBydEhZeXZCemQ5WmQ3aERfZlJIVGcxMTExMzAiCgkJCSAgICB9CgkJCSAgfQoKCQkJICB2YXIgbmV3VXJsID0gcGFydHMuc2xpY2UoMCwgMykuam9pbignLycpICsgJy9mbG93cGxheWVyLTMuMi4xNi5zd2Y/Y29uZmlnPScgKyBlc2NhcGUoSlNPTi5zdHJpbmdpZnkobykpOwoJCQkgIC8vdmFyIG5ld1VybCA9ICdodHRwOi8vcmVsZWFzZXMuZmxvd3BsYXllci5vcmcvc3dmL2Zsb3dwbGF5ZXItMy4yLjE2LnN3Zj9jb25maWc9JyArIGVzY2FwZShKU09OLnN0cmluZ2lmeShvKSk7CgkJCSAgY29uc29sZS5sb2cobmV3VXJsKTsKCQkJICB0aGlzRWxlbWVudC5zcmMgPSBuZXdVcmw7
4396 */
4397
4398 });
4399 } else { // skip anti-adblock
4400 Aak.removeElement('#adsframe');
4401 Aak.getElement('#remove-over').click();
4402 }
4403 }
4404 },
4405 allmyvideos_net : {
4406 // note: obfuscated
4407 // issue: https://github.com/reek/anti-adblock-killer/issues/274
4408 host : ['allmyvideos.net', 'amvtv.net'],
4409 onStart : function () {
4410 // skip fake play button
4411 Aak.setCookie('_favbt33', 1);
4412 }
4413 },
4414 ilive_domains : {
4415 host : ['ilive.to', 'streamlive.to'],
4416 onEnd : function () {
4417 if (/^\/embedplayer.php/i.test(location.pathname)) {
4418 setTimeout(function () {
4419 // Skip timer
4420 Aak.uw.removeOverlayHTML();
4421 }, 1000);
4422 }
4423 }
4424 },
4425 micast_tv : {
4426 host : ['micast.tv'],
4427 onStart : function () {
4428 // prevent popunder
4429 Aak.setCookie('vid_main', true);
4430 Aak.setCookie('vid_sub', true);
4431 // remove overlay
4432 Aak.addScript(function () {
4433 window.onload = function () {
4434 if (window.removeOverlayHTML)
4435 window.removeOverlayHTML();
4436 };
4437 });
4438 }
4439 },
4440 pxstream_tv : {
4441 host : ['pxstream.tv'],
4442 onEnd : function () {
4443 if (/^\/embedrouter.php/.test(location.pathname)) {
4444 setTimeout(function () {
4445 // Skip timer and close ads
4446 Aak.uw.closeAd();
4447 }, 1000);
4448 }
4449 }
4450 },
4451 sawlive_tv : {
4452 host : ['sawlive.tv'],
4453 onIdle : function () {
4454 if (/^\/embed\/watch\//i.test(location.pathname)) {
4455 // Skip timer and close ads
4456 Aak.uw.display = false;
4457 Aak.uw.closeMyAd();
4458 }
4459 }
4460 },
4461 goodcast_co : {
4462 host : ['goodcast.co'],
4463 onIdle : function () {
4464 if (/^\/stream.php/.test(location.pathname)) {
4465 // remove ads allowed by easylist
4466 Aak.uw.$(".advertisement").hide();
4467 Aak.uw.$('.adsky iframe').attr("src", "about:blank");
4468 }
4469 }
4470 },
4471 showsport_tv_com : {
4472 host : ['showsport-tv.com'],
4473 onIdle : function () {
4474 if (/^\/ch.php/.test(location.pathname)) {
4475 // remove ads allowed by easylist
4476 Aak.removeElement('#advertisement, .advertisement');
4477 }
4478 }
4479 },
4480 sharecast_to : {
4481 host : ['sharecast.to'],
4482 onIdle : function () {
4483 if (/^\/embed.php/.test(location.pathname)) {
4484
4485 // Disable popunders
4486 var interval = setInterval(function () {
4487 Aak.setCookie('vid_main', true);
4488 Aak.setCookie('vid_sub', 2);
4489 Aak.setCookie('vid_delay', true);
4490 }, 100);
4491
4492 setTimeout(function () {
4493 clearInterval(interval);
4494 }, 5000);
4495
4496 // Remove transparent overlay
4497 Aak.removeElement('#table1');
4498 }
4499 }
4500 },
4501 videomega_tv : {
4502 // issue: https://github.com/reek/anti-adblock-killer/issues?q=videomega
4503 host : ['videomega.tv'],
4504 onStart : function () {
4505 if (/^\/view.php/.test(location.pathname)) {
4506 // prevent popunder
4507 Aak.setCookie('vid_mainpu', true);
4508 Aak.setCookie('vid_subpu', true);
4509 Aak.setCookie('vid_delay', true);
4510 }
4511 },
4512 onEnd : function () {
4513 // kill abc
4514 // fix bug on firefox: The video could not be loaded, either because the server or network failed or because the format is not supported.
4515 var script = Aak.hasScript('Please disable AdBlock Plugin to watch the video');
4516 if (script) {
4517 var source = script.innerHTML;
4518 var substring = source.substring(source.lastIndexOf('eval('), source.lastIndexOf(')') + 1);
4519 var deobfuscated = Aak.unpackScript(substring);
4520 var newScript = 'if('+deobfuscated.substring(deobfuscated.indexOf('true'));
4521 Aak.addScript(newScript);
4522 }
4523 }
4524 },
4525 flowplayer_antiadblock : {
4526 host : ['videofun.me', 'videobug.net', 'video44.net', 'play44.net', 'byzoo.org', 'playbb.me', 'videowing.me', 'videozoo.me', 'easyvideo.me', 'playpanda.net'],
4527 onEnd : function () {
4528
4529 /*
4530 http://www.animetoon.tv/black-lagoon-episode-1
4531 http://videowing.me/embed?w=718&h=438&video=ongoing/yu-gi-oh_arc-v_-_53.mp4
4532 http://playbb.me/embed.php?w=718&h=438&vid=at/nw/yu-gi-oh_arc-v_-_53.mp4
4533 http://videozoo.me/embed.php?w=718&h=438&vid=at/nw/yu-gi-oh_arc-v_-_53.mp4
4534 http://www.easyvideo.me/gogo/?w=718&h=438&file=yu-gi-oh_arc-v_-_53.mp4&sv=1
4535 http://playpanda.net/embed.php?w=718&h=438&vid=at/nw/yu-gi-oh_arc-v_-_53.mp4
4536 */
4537
4538 // allow fullscreen when abp is enabled and remove ad layer
4539 // ads blocked by abp rule
4540 if (/^\/(embed|gogo|gplus)/.test(location.pathname)) {
4541 var Player = new Aak.player();
4542 Player.editing('#flowplayer_api', {
4543 setAttributes : {
4544 allowfullscreen : true
4545 }
4546 });
4547 }
4548 }
4549 },
4550 r3z : {
4551 // issue: https://github.com/reek/anti-adblock-killer/issues/1545
4552 // issue: https://github.com/reek/anti-adblock-killer/issues/1323
4553 // issue: https://github.com/reek/anti-adblock-killer/issues/884
4554 // source: http://pastebin.com/C159kevn
4555 host : ['cityam.com', 'computerworlduk.com', 'techworld.com'],
4556 onStart : function () {
4557 /* don't work with chrome
4558 Object.defineProperty(Aak.uw, '_r3z', {
4559 enumerable : true,
4560 writable : false,
4561 value : {}
4562 });
4563 */
4564 },
4565 onIdle : function () {
4566 Aak.uw.$("#r3z-wait").remove();
4567 Aak.uw.$(".r3z-hide").removeClass("r3z-hide");
4568 Aak.uw._r3z = null;
4569 }
4570 },
4571 google_jobrunner : {
4572 // issue: https://greasyfork.org/en/forum/messages/405
4573 // issue: https://github.com/reek/anti-adblock-killer/issues/1343
4574 // issue: https://github.com/reek/anti-adblock-killer/issues/1342
4575 // issue: https://github.com/reek/anti-adblock-killer/issues/831
4576 // issue: https://github.com/reek/anti-adblock-killer/issues/1274
4577 // issue: https://github.com/reek/anti-adblock-killer/issues/1262
4578 // issue: https://github.com/reek/anti-adblock-killer/issues/561
4579 host : ['next-episode.net', 'kingmaker.news', 'gamespowerita.com', 'todayidol.com', 'receive-a-sms.com', 'wakeupcallme.com', 'ringmycellphone.com', 'faqmozilla.org', 'thememypc.com'],
4580 onAlways : function () {
4581 Aak.uw.google_jobrunner = {};
4582 }
4583 },
4584 // fuckadbock customized
4585 fab_sports_fr : {
4586 // issue: https://github.com/reek/anti-adblock-killer/issues/1217
4587 // source: http://pastebin.com/SpEN5duS
4588 host : ['sports.fr'],
4589 onStart : function () {
4590 Aak.fakeFuckAdBlock('fabInstance', 'FabInstance');
4591 }
4592 },
4593 fab_europe1_fr : {
4594 // issue: https://github.com/reek/anti-adblock-killer/issues/1188
4595 // source: http://pastebin.com/ULe1vzQR
4596 host : ['europe1.fr'],
4597 onStart : function () {
4598 Aak.fakeFuckAdBlock('fabInstance', 'FabInstance');
4599 }
4600 },
4601 fab_newyorker_com : {
4602 // issue: https://github.com/reek/anti-adblock-killer/issues/1177
4603 host : ['newyorker.com'],
4604 onStart : function () {
4605 Aak.fakeFuckAdBlock('sniffAdBlock', 'SniffAdBlock');
4606 }
4607 },
4608 fab_wired_com : {
4609 // issue: https://github.com/reek/anti-adblock-killer/issues/1061
4610 // issue: https://greasyfork.org/fr/forum/discussion/8235
4611 // source: http://pastebin.com/Pq14v4FC
4612 host : ['wired.com'],
4613 onStart : function () {
4614 Aak.fakeFuckAdBlock('sniffAdBlock', 'SniffAdBlock');
4615 }
4616 },
4617 fab_mangasproject_domains : {
4618 // note: fuckadblock with custom instance name
4619 // note: also added abp rule
4620 // issue: https://github.com/reek/anti-adblock-killer/issues/1127
4621 // issue: https://greasyfork.org/fr/forum/discussion/4132
4622 // issue: https://github.com/reek/anti-adblock-killer/issues/858
4623 // source: https://mangas.zlx.com.br/mangazord_lib/js/lib/controllers/Leitor/Leitor.min.js
4624 host : ['mangasproject.com.br', 'mangasproject.net.br', 'mangas.zlx.com.br'],
4625 onStart : function () {
4626 Aak.fakeFuckAdBlock('mangasLeitorSlider', Aak.generateID());
4627 }
4628 },
4629 fab_qnimate_com : {
4630 // issue: https://github.com/reek/anti-adblock-killer/issues/739
4631 // issue: https://github.com/reek/anti-adblock-killer/issues/705
4632 // note: fuckadblock customized
4633 host : ['qnimate.com'],
4634 onAlways : function () {
4635 Aak.uw.adBlockDetected = function () {};
4636 }
4637 },
4638 fab_eurotransport_de : {
4639 // issue: https://github.com/reek/anti-adblock-killer/issues/858
4640 // note: fuckadblock with custom instance name
4641 host : ['eurotransport.de'],
4642 onStart : function () {
4643 Aak.fakeFuckAdBlock('antiAdBlock', Aak.generateID());
4644 }
4645 },
4646 fab_cadetect : {
4647 // by: Skr4tchGr3azyMonkiBallllllZzzz
4648 // issue: https://github.com/reek/anti-adblock-killer/issues/784
4649 // note: fuckadblock with custom instance name
4650 host : ['tzetze.it', 'beppegrillo.it', 'la-cosa.it'],
4651 onStart : function () {
4652 Aak.fakeFuckAdBlock('cadetect', 'CADetect');
4653 }
4654 },
4655 fab_agar_game : {
4656 // note: fuckadblock with custom instance name
4657 // issue: https://github.com/reek/anti-adblock-killer/issues/1257
4658 // issue: https://github.com/reek/anti-adblock-killer/issues/1135
4659 host : ['agario.sx', 'agarabi.com'],
4660 onStart : function () {
4661 Aak.fakeFuckAdBlock('agario_SX_ads', Aak.generateID());
4662 }
4663 },
4664 fab_filespace_com : {
4665 // note: fuckadblock with custom instance name
4666 // source: http://pastebin.com/YAS0As87
4667 // issue: https://github.com/reek/anti-adblock-killer/issues/1037
4668 host : ['filespace.com'],
4669 onStart : function () {
4670 Aak.fakeFuckAdBlock('fAB', Aak.generateID());
4671 }
4672 },
4673 fab_topserialy_sk : {
4674 // note: fuckadblock with custom instance name
4675 // source: http://pastebin.com/42tUQ9aV
4676 host : ['topserialy.sk'],
4677 onStart : function () {
4678 Aak.fakeFuckAdBlock('sratNaVas', Aak.generateID());
4679 }
4680 },
4681 fab_customized : {
4682 // issue: https://github.com/reek/anti-adblock-killer/issues/1455
4683 // issue: https://github.com/reek/anti-adblock-killer/issues/1657
4684 // source: http://pastebin.com/N42a5BjE
4685 host : ['epicurious.com', 'desktopsolution.org', 'indiatimes.com'],
4686 onStart : function() {
4687 Aak.addScript(function () {
4688 (function () {
4689 var _setAttribute = window.Element.prototype.setAttribute;
4690 window.Element.prototype.setAttribute = function (name, value) {
4691 if (name == 'class' && value.indexOf('text_ads') != -1) {
4692 value = '';
4693 console.info(this, 'fab intercepted :-)');
4694 }
4695 _setAttribute.call(this, name, value);
4696 };
4697 })();
4698 });
4699 }
4700 },
4701 d3xt3er_antiadblock : {
4702 // site: http://d3xt3r.com/anti-adblock
4703 // case: http://sport-show.fr/js/advertisement-AdBlock.js
4704 // case: http://www.2site.me/advertisement-AdBlock.js
4705 host : ['sport-show.fr', 'vipflash.net', '2site.me'],
4706 onStart : function () {
4707 Aak.addStyle("#blockblockA {visibility:invisible;display:none;} #blockblockA td {visibility:invisible;display:none;} #blockblockA td p {visibility:invisible;display:none;} #blockblockB {visibility:visible;display:block;}");
4708 }
4709 },
4710 adblock_notify : {
4711 // by: Skr4tchGr3azyMonkiBallllllZzzz
4712 // issue: https://github.com/reek/anti-adblock-killer/issues/1392
4713 // issue: https://github.com/reek/anti-adblock-killer/issues/1039
4714 // issue: https://github.com/reek/anti-adblock-killer/issues/592
4715 // issue: https://github.com/reek/anti-adblock-killer/issues/813
4716 host : ['gametransfers.com', 'winandmac.com', 'free-steam-giveaways.com', 'canalwp.com', 'alphahistory.com'],
4717 onAlways : function () {
4718 Aak.setCookie('anCookie', true);
4719 Aak.uw.anOptions = {};
4720 }
4721 },
4722 lutte_adblock : {
4723 // site: http://lutteadblock.blogspot.com/2014/11/le-script.html
4724 // issue: https://github.com/reek/anti-adblock-killer/issues/938
4725 // issue: https://github.com/reek/anti-adblock-killer/issues/580
4726 host : ['lewebtvbouquetfrancophone.overblog.com', 'webtv.bloguez.com', 'latelegratuite.blogspot.com', 'totaldebrid.org', '37.187.173.205'],
4727 onStart : function () {
4728 Aak.addBaitElement('div#my_ad_div');
4729 Aak.uw.jabbahud = function () {};
4730 }
4731 },
4732 antiblock : {
4733 // site: antiblock.org
4734 // note: customized
4735 // issue:
4736 host : ['mybank.pl', 'rapidgrab.pl'],
4737 onStart : function () {
4738 Aak.addScript(function () {
4739 (function () {
4740 var _addEventListener = window.addEventListener;
4741 window.addEventListener = function (type, listener, options) {
4742 if (listener.toString().indexOf('.nextFunction()}') > -1) {
4743 listener = function () {
4744 console.info(['AntiAdbKiller', location.host, 'AntiBlock{customized}']);
4745 };
4746 }
4747 _addEventListener.call(this, type, listener, options);
4748 };
4749 })();
4750 });
4751 }
4752 },
4753 blockadblock : {
4754 // site: blockadblock.com
4755 // note: random instance name
4756 // source: https://gist.github.com/Watilin/af75e0a2e82a2efb384bde9c7b41dec8
4757 // issues: https://github.com/reek/anti-adblock-killer/issues?q=label:BlockAdBlock
4758 // issue: https://greasyfork.org/forum/discussion/8273
4759 // issue: https://greasyfork.org/forum/discussion/7625
4760 host : ['blockadblock.com', 'linkdrop.net', 'revclouds.com', 'leporno.org', 'uploadshub.com', 'dasolo.org', 'fullstuff.net', 'zeusnews.it', 'cheminots.net', 'lolsy.tv', 'animes-mangas-ddl.com', 'noticiasautomotivas.com.br', 'darkstars.org', 'corepacks.com', 'naturalbd.com', 'coolsoft.altervista.org', 'openload.us', 'cda-online.pl', 'urbanplanet.org', 'mamahd.com', 'sadeempc.com', 'avmoo.com', 'thailande-fr.com', 'btaia.com', 'tusoft.org', 'hisse.net', 'europeup.com', 'nrj.fr', 'srnk.co', 'animmex.co', 'socketloop.com', 'crackhex.com', 'revealedtricks4u.com', 'pizzamaking.com', 'computerworm.net', 'yourlifeupdated.net'],
4761 onStart : function () {
4762 Aak.addScript(function () {
4763 (function () {
4764 var _setTimeout = window.setTimeout;
4765 window.setTimeout = function (fn, delay) {
4766 if (typeof fn === 'string' && fn.indexOf('bab_elementid') > -1) {
4767 fn = function () {
4768 console.info(['AntiAdbKiller', location.host, 'BlockAdBlock']);
4769 };
4770 }
4771 _setTimeout.call(this, fn, delay);
4772 };
4773 })();
4774 });
4775 }
4776 },
4777 gpt_sp : {
4778 // by: Reek, Giwayume
4779 // note: when adblock detected inject new ads, redirect to http://tinyurl.com/zq2z5o6
4780 // issue: https://github.com/reek/anti-adblock-killer/issues/1636
4781 // issue: https://github.com/reek/anti-adblock-killer/issues/1596
4782 // issue: https://github.com/reek/anti-adblock-killer/issues/1297
4783 // issue: https://github.com/reek/anti-adblock-killer/issues/1144
4784 // issue: https://github.com/reek/anti-adblock-killer/issues/1542
4785 // source: http://pastebin.com/8Ajitfb2
4786 host : ['marketwatch.com', 'deadline.com', 'tweaktown.com', 'nypost.com', 'realgm.com', 'nasdaq.com'],
4787 onStart : function () {
4788 Aak.addStyle(".container--bannerAd, .col--ad { display: none; }");
4789 Aak.addScript(function () {
4790 (function () {
4791 // Giwayume
4792 window._sp_ = window._sp_ || {};
4793 window._sp_.config = window._sp_.config || {};
4794 Object.defineProperty(window._sp_.config, "content_control_callback", {
4795 value : function () {},
4796 writable : false,
4797 configurable : false
4798 });
4799 // Reek
4800 var _addEventListener = window.EventTarget.prototype.addEventListener;
4801 window.EventTarget.prototype.addEventListener = function (type, listener, options) {
4802 if (type == 'sp.blocking') {
4803 listener = function () {
4804 console.info(['AntiAdbKiller', location.host, 'GPT{sp-blocking}']);
4805 };
4806 }
4807 _addEventListener.call(this, type, listener, options);
4808 };
4809 })();
4810 });
4811 }
4812 },
4813 krux_asl : {
4814 // note: when adblock detected inject new ads
4815 // source: http://pastebin.com/0HD7N84i
4816 host : ['commentcamarche.net', 'journaldesfemmes.com', 'linternaute.com'],
4817 onBeforeScript : function () {
4818 return [{
4819 detected : 'Krux{asl}',
4820 contains : 'Asl.prototype.inject',
4821 external : false,
4822 remove : true
4823 }
4824 ];
4825 }
4826 },
4827 krux_adp : {
4828 // note: when adblock detected inject new ads
4829 // source:
4830 host : ['fourchette-et-bikini.fr', 'meteocity.com'],
4831 onStart : function () {
4832 Aak.uw.adProtect = 1;
4833 }
4834 },
4835 phoenix_goyavelab : {
4836 // note: when adblock detected inject new ads
4837 // note: script anti-adblock obfuscated,
4838 // issue: https://github.com/reek/anti-adblock-killer/issues/
4839 // doc: http://tinyurl.com/gl3ghq2
4840 // source: http://pastebin.com/hsAmdSuf
4841 host : ['demo-phoenix.com', 'dpstream.net', 'gum-gum-streaming.com', 'jeu.info', 'sofoot.com', 'gaara-fr.com', 'gaytube.com', 'tuxboard.com', 'xstory-fr.com', 'hentaifr.net', 'filmstreaming-hd.com', 'filmvf.net', 'hentaihaven.org', 'narutoshippudenvf.com', 'thebadbuzz.com', 'manga-news.com', 'jeu.video'],
4842 onAlways : function () {
4843 //Aak.uw.__$dc = function () {};
4844 Aak.addStyle('body {visibility: visible;}');
4845 },
4846 onBeforeScript : function () {
4847 return [{
4848 detected : 'PhoenixGoyavelab',
4849 contains : 'PHENV',
4850 external : false,
4851 remove: true
4852 }
4853 ];
4854 }
4855 },
4856 ad_defend_uabp : {
4857 // note: when adblock detected inject new ads
4858 // source: http://pastebin.com/cFQCp80W
4859 host : ['tvspielfilm.de', 'finanzen.ch'],
4860 onBeforeScript : function () {
4861 return [{
4862 detected : 'AdDefend{UABPInject}',
4863 contains : 'UABPInject',
4864 external : false,
4865 remove : true
4866 }
4867 ];
4868 }
4869 },
4870 ad_defend_uab : {
4871 // note: when adblock detected inject new ads
4872 // userscript: https://openuserjs.org/scripts/schwarztee/AdDefend_Klatsche
4873 // userscript: https://gist.github.com/anonymous/a9b9956baf1d59a107c5
4874 // source: http://pastebin.com/1VyW0u9m, http://pastebin.com/AZqhRxWU
4875 // issue: https://github.com/reek/anti-adblock-killer/issues?q=label:AdDefend
4876 // pull: https://github.com/reek/anti-adblock-killer/pull/467
4877 host : ['watchgeneration.fr', 'turbo.fr', '24matins.fr', 'foot01.com', 'clubic.com', 'macg.co', 'begeek.fr', 'igen.fr', 'gamestar.de', 'focus.de', 'stern.de', 'sat1.', 'prosieben.', 'kabeleins.', 'sat1gold.', 'sixx.', 'prosiebenmaxx.', 'fem.com', 'the-voice-of-germany.', 'wetter.com', 'wetteronline.de', 'pcwelt.de', 'boerse-online.de', 'sportauto.de', 'auto-motor-und-sport.de', 'motor-klassik.de', '4wheelfun.de', 'autostrassenverkehr.de', 'lustich.de', 'spox.com', 'shz.de', 'transfermarkt.de', 'rp-online.de', 'motorradonline.de', '20min.ch', 'main-spitze.de', 'wormser-zeitung.de', 'lampertheimer-zeitung.de', 'wiesbdener-tagblatt.de', 'buerstaedter-zeitung.de', 'wiesbdener-kurier.de', 'rhein-main-presse.de', 'allgemeine-zeitung.de', 'ariva.de', 'spiegel.de', 'brigitte.de', 'dshini.net', 'gala.de', 'gamepro.de', 'gamona.de', 'pnn.de', 'promobil.de', 'sportal.de', 'webfail.com', 'computerbild.de', 'finanzen.net', 'comunio.de', 'medisite.fr'],
4878 onBeforeScript : function () {
4879 return [{
4880 detected : 'AdDefend{uabInject}',
4881 contains : 'uabInject',
4882 external : false,
4883 remove : true
4884 }
4885 ];
4886 }
4887 },
4888 /* solved by AakLIst
4889 tisoomi_indirekt : {
4890 // inline: http://pastebin.com/npmXTUHw
4891 // external: http://pastebin.com/hvWnCuDw
4892 host : ['energy.de', 'getvids.de', 'gewinde-normen.de', 'podcast.de', 'spielespielen24.de', 'dialo.de'],
4893 onBeforeScript : function (e) {
4894 var target = e.target || e.srcElement;
4895 var text = target.text;
4896 if (Aak.contains(text, 'n="abcdefghijklm",r="nopqrstuvwxyz",i="0123456789";var s=t==0?i:t==1?n')) {
4897 Aak.stopScript(e);
4898 Aak.log('Tisoomi Indirekt');
4899 }
4900 }
4901 },
4902 */
4903 /* solved by AakLIst
4904 tisoomi_direkt : {
4905 // inline: http://pastebin.com/2vq38JXY
4906 host : ['autozeitung.de', 'formel1.de', 'fremdwort.de', 'inside-handy.de', 'motorsport-total.com', 'aussenwirtschaftslupe.de', 'donnerwetter.de', 'wintotal.de'],
4907 onBeforeScript : function (e) {
4908 var target = e.target || e.srcElement;
4909 var text = target.text;
4910 if (Aak.contains(text, 'function detect()')) {
4911 Aak.stopScript(e);
4912 Aak.log('Tisoomi Direkt');
4913 }
4914 }
4915 },
4916 */
4917 // --------------------------------------------------------------------------------------------
4918 // Generic
4919 // --------------------------------------------------------------------------------------------
4920 generic : {
4921 host : ['.*?'],
4922 onRemove : function (removedNode) {
4923 if (Aak.opts.removed) {
4924 if (removedNode.src ||
4925 removedNode.id ||
4926 removedNode.className &&
4927 !/^firebug/.test(removedNode.className)) {
4928 // Node removed
4929 Aak.log(removedNode);
4930 }
4931 }
4932 },
4933 onStart : function () {
4934
4935 // FuckAdBlock & BlockAdBlock v3 and v4
4936 // site: http://www.sitexw.fr/fuckadblock/
4937 // repo: https://github.com/sitexw/FuckAdBlock
4938 // repo: https://github.com/sitexw/BlockAdBlock
4939 // note: when fuckadblock.js or blockadblock.js is blocked
4940 // demo v3: http://sh.st/vovHE
4941 // demo v4: http://al.ly/qBbXH
4942 // issue: https://github.com/reek/anti-adblock-killer/issues/888
4943 // issue: https://github.com/reek/anti-adblock-killer/issues/824
4944 Aak.fakeFuckAdBlock('fuckAdBlock', 'FuckAdBlock');
4945 Aak.fakeFuckAdBlock('blockAdBlock', 'BlockAdBlock');
4946
4947 // canRunAds
4948 // repo: https://github.com/MatthewGross/CanRunAds
4949 // note: use externall script "/js/ads.js" -> var canRunAds = true;
4950 Object.defineProperty(Aak.uw, 'canRunAds', {
4951 enumerable : true,
4952 writable : false,
4953 value : true
4954 });
4955
4956 // canShowAds
4957 // issue: https://github.com/reek/anti-adblock-killer/issues/1197
4958 Object.defineProperty(Aak.uw, 'canShowAds', {
4959 enumerable : true,
4960 writable : false,
4961 value : true
4962 });
4963
4964 // Adblocker Detecting Scripts: Method 2
4965 // gist: https://gist.github.com/irazasyed/3d247d3d121e781a3872
4966 // note: use externall script "/js/ads.js" -> isAdBlockActive = false;
4967 Object.defineProperty(Aak.uw, 'isAdBlockActive', {
4968 enumerable : true,
4969 writable : false,
4970 value : false
4971 });
4972
4973 /*
4974 window.iHaveLoadedAds = true;
4975 var niceAdsCheck=true;
4976 adblock = false
4977 is_blocker = false;
4978 */
4979 },
4980 onIdle : function () {
4981
4982 // AdBlock Detector (XenForo Rellect)
4983 // site: http://tinyurl.com/pa28xdn
4984 // cloneInto: http://tinyurl.com/k6qphme
4985 // issue: https://github.com/reek/anti-adblock-killer/issues/805
4986 // issue: https://github.com/reek/anti-adblock-killer/issues/804
4987 // issue: https://github.com/reek/anti-adblock-killer/issues/591
4988 if (Aak.uw.XenForo && typeof Aak.uw.XenForo.rellect == 'object') {
4989 Aak.uw.XenForo.rellect = {
4990 AdBlockDetector : {
4991 start : function () {}
4992 }
4993 };
4994 Aak.detected('AdBlock Detector (XenForo Rellect)');
4995 }
4996
4997 /*
4998 // Adunblock - http://adunblock.com/
4999 if (Aak.getCookie('adblock') == 1) {
5000 Aak.setCookie('adblock', 0);
5001 Aak.setCookie('bar_closed', 1);
5002 }
5003 */
5004
5005 // Adblock Blocker
5006 // https://wordpress.org/plugins/addblockblocker/
5007 // http://tinyurl.com/nswn6fz
5008 // http://pastebin.com/d65zr37m
5009 /* can cause a bug
5010 var ads = document.getElementsByClassName('afs_ads');
5011 var ad = ads.length && ads[ads.length - 1];
5012 if (ad && ad.innerHTML.length === 0 || ad.clientHeight === 0) {
5013 Aak.addScript(function () {
5014 getElementsByClassNameNative = HTMLDocument.prototype.getElementsByClassName;
5015 HTMLDocument.prototype.getElementsByClassName = function (className) {
5016 if (className == 'afs_ads') {
5017 console.info(['AntiAdbKiller', location.host, 'AdblockBlocker', className]);
5018 var uniqid = Date.now();
5019 var bait = document.createElement("div");
5020 bait.innerHTML = '<br>';
5021 bait.className = uniqid;
5022 document.body.appendChild(bait);
5023 return document.getElementsByClassName(uniqid);
5024 }
5025 return getElementsByClassNameNative.apply(this, arguments);
5026 };
5027 });
5028 }
5029 */
5030
5031 // Adbuddy
5032 if (typeof Aak.uw.closeAdbuddy === 'function') {
5033 Aak.uw.closeAdbuddy();
5034 Aak.detected('Adbuddy');
5035 }
5036
5037 // AdBlock Alerter (WP)
5038 // https://github.com/wp-plugins/adblock-alerter
5039 //
5040 if (Aak.getElement('div.adb_overlay > div.adb_modal_img')) {
5041 // Remove Alert + Allow Scroll
5042 Aak.removeElement('div.adb_overlay');
5043 Aak.addStyle('html,body {height:auto; overflow: auto;}');
5044 Aak.detected('AdBlockAlerter');
5045 }
5046
5047 // Unknow Anti AdBlock system
5048 if (Aak.getElement('#blockdiv') && Aak.contains(Aak.getElement('#blockdiv').innerHTML, 'disable ad blocking or use another browser without any adblocker when you visit')) {
5049 Aak.removeElement('#blockdiv');
5050 }
5051
5052 // Antiblock.org v2
5053 // note: detect and store block id
5054 // demo: http://tinyurl.com/nhyhpzk
5055 var styles = document.querySelectorAll('style');
5056 for (var i = 0; i < styles.length; i++) {
5057 var style = styles[i];
5058 var cssRules = style.sheet.cssRules;
5059 for (var j = 0; j < cssRules.length; j++) {
5060 var cssRule = cssRules[j];
5061 var cssText = cssRule.cssText;
5062 var pattern = /^#([a-z0-9]{4,10}) ~ \* \{ display: none; \}/;
5063 if (pattern.test(cssText)) {
5064 var id = pattern.exec(cssText)[1];
5065 if (Aak.hasScript("w.addEventListener('load'," + id + ",false)")) {
5066 Aak.aabs.abo2 = id;
5067 break;
5068 }
5069 }
5070 }
5071 }
5072
5073 var win = Aak.uw;
5074 for (var prop in win) {
5075 try {
5076 if (!/^webkit/.test(prop) && /^[a-z0-9]{4,12}$/i.test(prop) && win.hasOwnProperty(prop) && typeof win[prop] === 'object') {
5077 var method = win[prop];
5078
5079 // Antiblock.org v3 & BetterStopAdblock
5080 // issue: https://github.com/reek/anti-adblock-killer/issues/833
5081 if (method.deferExecution &&
5082 method.displayMessage &&
5083 method.getElementBy &&
5084 method.getStyle &&
5085 method.insert &&
5086 method.nextFunction) {
5087 if (method.toggle) {
5088 Aak.aabs.bsa = prop;
5089 Aak.detected('BetterStopAdblock{dom}');
5090 } else {
5091 Aak.aabs.abo3 = prop;
5092 Aak.detected('Antiblock3{dom}');
5093 }
5094 win[prop] = null; // kill instance
5095 }
5096
5097 // BlockAdBlock
5098 // site: blockadblock.com
5099 // note: random instance name
5100 // source: https://gist.github.com/Watilin/af75e0a2e82a2efb384bde9c7b41dec8
5101 // issues: https://github.com/reek/anti-adblock-killer/issues?q=label%3ABlockAdBlock
5102 if (method.bab) {
5103 Aak.detected('BlockAdBlock{dom}');
5104 win[prop] = null; // kill instance
5105 }
5106 }
5107 } catch (e) {
5108 //console.log('error', prop)
5109 }
5110 }
5111
5112 // Anti-Adblockers
5113 var aabs = {
5114 // Plugins WordPress
5115 NoAdBlock : '(/plugins/no-adblock/|/blockBlock/blockBlock.jquery.js)',
5116 BetterStopAdblock : '(/plugins/better-stop-adblock/|bsa-script-doctype.js|bsa-script-no-doctype.js)',
5117 AdBlockBlocker : '/plugins/wordpress-adblock-blocker/',
5118 AntiBlockBukssaAyman : '/plugins/anti-block/',
5119 BlockAlyzer : '/plugins/blockalyzer-adblock-counter/',
5120 AdBlockingDetector : '/plugins/ad-blocking-detector/',
5121 // Plugins Website
5122 Adworkmedia : '(adworkmedia|loxtk|contentlockingnetworks).com/gLoader.php',
5123 Adscendmedia : 'adscendmedia.com/gwjs.php',
5124 FuckAdBlock : '(/fuckadblock.js|/blockadblock.js)',
5125 jQueryAdBlock : '/jquery.adblock.js',
5126 jQueryAdblockDetector : '/jquery.adblock-detector.js',
5127 AdBlockAdvertisement : '/advertisement.js',
5128 AdBlockAdvert : '/advert.js',
5129 AdBlockAdvCustom : '/advertisement(.+).js',
5130 AdBlockAdframe : '/adframe.js',
5131 AntiAdBuster : '/anti-ad-buster.js',
5132 RTKAntiAdblock : '/blockcake.js',
5133 AdblockDetector : '/AdblockDetector/handler.min.js',
5134 jQueryAntiAdsBlock : '/jquery.antiadsblock.js',
5135 Adbuddy : '/js/adbuddy.min.js',
5136 AntiADsBlocker : '/aadb/script.js'
5137 };
5138
5139 var scripts = document.scripts;
5140 for (var y = 0; y < scripts.length; y++) {
5141 var script = scripts[y];
5142 if (script.src) {
5143 for (var key in aabs) {
5144 if (new RegExp(aabs[key], 'i').test(script.src)) {
5145 Aak.detected([key, script.src]);
5146 break;
5147 }
5148 }
5149 }
5150 }
5151
5152 },
5153 onInsert : function (insertedNode) {
5154
5155 // All Nodes
5156 if (Aak.opts.inserted) {
5157 if (insertedNode.src ||
5158 insertedNode.id ||
5159 insertedNode.className &&
5160 !/firebug/.test(insertedNode.innerHTML)) {
5161 // Node inserted
5162 Aak.log(insertedNode);
5163 }
5164 }
5165
5166 // No-Adblock - http://www.no-adblock.com/
5167 if (insertedNode.id &&
5168 insertedNode.id.length == 4 &&
5169 /^[a-z0-9]{4}$/.test(insertedNode.id) &&
5170 insertedNode.nodeName == 'DIV' &&
5171 insertedNode.firstChild &&
5172 insertedNode.firstChild.id &&
5173 insertedNode.firstChild.id == insertedNode.id &&
5174 Aak.contains(insertedNode.innerHTML, 'no-adblock.com')) {
5175 // Remove
5176 Aak.detected('No-Adblock', false, location.href);
5177 Aak.removeElement(insertedNode);
5178 //Aak.log(insertedNode);
5179 }
5180
5181 // StopAdblock - http://stopadblock.org/downloads/
5182 if (insertedNode.id &&
5183 insertedNode.id.length == 7 &&
5184 /^a[a-z0-9]{6}$/.test(insertedNode.id) &&
5185 insertedNode.nodeName == 'DIV' &&
5186 insertedNode.parentNode &&
5187 insertedNode.parentNode.id &&
5188 insertedNode.parentNode.id == insertedNode.id + '2' &&
5189 Aak.contains(insertedNode.innerHTML, 'stopadblock.org')) {
5190 // Remove
5191 Aak.detected('StopAdBlock', false, location.href);
5192 Aak.removeElement(insertedNode);
5193 //Aak.log(insertedNode);
5194 }
5195
5196 // AntiAdblock (Packer)
5197 var reIframeId = /^(zd|wd)$/;
5198 var reImgId = /^(xd|gd)$/;
5199 var reImgSrc = /\/ads\/banner.jpg/;
5200 var reIframeSrc = /(\/adhandler\/|\/adimages\/|ad.html)/;
5201
5202 // Communs
5203 if (insertedNode.id &&
5204 reImgId.test(insertedNode.id) &&
5205 insertedNode.nodeName == 'IMG' &&
5206 reImgSrc.test(insertedNode.src) ||
5207 insertedNode.id &&
5208 reIframeId.test(insertedNode.id) &&
5209 insertedNode.nodeName == 'IFRAME' &&
5210 reIframeSrc.test(insertedNode.src)) {
5211
5212 // Variant 1
5213 if (insertedNode.id == 'xd') {
5214 Aak.detected('AntiAdblockPackerZdxd', false, location.href);
5215 } // Variant 2
5216 else if (insertedNode.id == 'gd') {
5217 Aak.detected('AntiAdblockPackerWdgd', false, location.href);
5218 }
5219 // Remove
5220 //Aak.log(insertedNode);
5221 Aak.removeElement(insertedNode);
5222 }
5223
5224 // Adunblock - http://adunblock.com/
5225 var reId = /^[a-z]{8}$/;
5226 var reClass = /^[a-z]{8} [a-z]{8}/;
5227 var reBg = /^[a-z]{8}-bg$/;
5228 var reMessage = /Il semblerait que vous utilisiez un bloqueur de publicité !/;
5229
5230 // Communs
5231 if (typeof Aak.uw.vtfab != 'undefined' &&
5232 typeof Aak.uw.adblock_antib != 'undefined' &&
5233 insertedNode.parentNode &&
5234 insertedNode.parentNode.nodeName == 'BODY' &&
5235 insertedNode.id &&
5236 reId.test(insertedNode.id) &&
5237 insertedNode.nodeName == 'DIV' &&
5238 insertedNode.nextSibling &&
5239 insertedNode.nextSibling.className &&
5240 insertedNode.nextSibling.nodeName == 'DIV') {
5241
5242 // Full Screen Message (Premium)
5243 // <div id="lfyhsvdq" class="tvwnoqdf svonexrk" style="top: 100px; opacity: 1; visibility: visible;">
5244 // <div class="tvwnoqdf-bg" style="display: block;"></div>
5245 if (insertedNode.className &&
5246 reClass.test(insertedNode.className) &&
5247 reBg.test(insertedNode.nextSibling.className) &&
5248 insertedNode.nextSibling.style &&
5249 insertedNode.nextSibling.style.display != 'none') {
5250
5251 // Remove Message
5252 Aak.detected("AdUnBlockPremium");
5253 Aak.removeElement(insertedNode.nextSibling); // overlay
5254 Aak.removeElement(insertedNode); // box
5255 }
5256 // Top bar Message (Free)
5257 // <div id="vixmgrly">
5258 // <div id="mfnhaiyx" class="lkrnvbyt">
5259 else if (insertedNode.nextSibling.id &&
5260 reId.test(insertedNode.nextSibling.id) &&
5261 reMessage.test(insertedNode.innerHTML)) {
5262
5263 // Remove Message
5264 Aak.detected("AdUnBlockFree");
5265 Aak.removeElement(insertedNode);
5266 }
5267 }
5268
5269 // Antiblock - http://antiblock.org/
5270 var reMsgId = /^[a-z0-9]{4,10}$/i;
5271 var reTag1 = /^(div|span|b|i|font|strong|center)$/i;
5272 var reTag2 = /^(a|b|i|s|u|q|p|strong|center)$/i;
5273 var reWords1 = /ad blocker|ad block|ad-block|adblocker|ad-blocker|adblock|bloqueur|bloqueador|Werbeblocker|adblockert|آدبلوك بلس|блокировщиком/i;
5274 var reWords2 = /kapat|disable|désactivez|désactiver|desactivez|desactiver|desative|desactivar|desactive|desactiva|deaktiviere|disabilitare|απενεργοποίηση|запрещать|állÃtsd le|publicités|рекламе|verhindert|advert|kapatınız/i;
5275
5276 // Antiblock.org (all version)
5277 if (insertedNode.parentNode &&
5278 insertedNode.id &&
5279 insertedNode.style &&
5280 insertedNode.childNodes.length &&
5281 insertedNode.firstChild &&
5282 !insertedNode.firstChild.id &&
5283 !insertedNode.firstChild.className &&
5284 reMsgId.test(insertedNode.id) &&
5285 reTag1.test(insertedNode.nodeName) &&
5286 reTag2.test(insertedNode.firstChild.nodeName)) {
5287 //Aak.log(insertedNode);
5288
5289 // Kill audio message
5290 var audio = insertedNode.querySelector("audio[loop]");
5291 if (audio) {
5292 audio.pause();
5293 Aak.detected('Antiblock{audio}');
5294 Aak.removeElement(audio);
5295 }
5296 // Antiblock.org v2
5297 // demo: http://tinyurl.com/h3mwta4
5298 else if ((Aak.aabs.abo2 && insertedNode.id == Aak.aabs.abo2) ||
5299 (insertedNode.firstChild.hasChildNodes() && reWords1.test(insertedNode.firstChild.innerHTML) && reWords2.test(insertedNode.firstChild.innerHTML))) {
5300 Aak.detected('Antiblock2{insert}');
5301 Aak.removeElement(insertedNode);
5302 }
5303 // Antiblock.org v3
5304 // demo: http://tinyurl.com/qecfa7w
5305 // case: http://tinyurl.com/zbrlr3a /* fork */
5306 else if ((Aak.aabs.abo3 && insertedNode.id == Aak.aabs.abo3) ||
5307 (insertedNode.firstChild.hasChildNodes() && insertedNode.firstChild.firstChild.nodeName == 'IMG' && /^data:image\/png;base64/.test(insertedNode.firstChild.firstChild.src))) {
5308 Aak.uw[Aak.aabs.abo3] = null;
5309 Aak.detected('Antiblock3{insert}');
5310 Aak.removeElement(insertedNode);
5311 }
5312 // BetterStopAdblock
5313 // demo: http://tinyurl.com/js9zat4
5314 // source: http://pastebin.com/YimkrtKB
5315 // issue: http://tinyurl.com/zetgbtx
5316 else if (Aak.aabs.bsa && insertedNode.id == Aak.aabs.bsa) {
5317 Aak.uw[Aak.aabs.bsa] = null;
5318 Aak.detected('BetterStopAdblock{insert}');
5319 Aak.removeElement(insertedNode);
5320 }
5321 // Many false positive
5322 else {
5323 //Aak.removeElement(insertedNode);
5324 }
5325 }
5326 }
5327 }
5328 },
5329 blockDetect : function () {
5330
5331 // Exclude domains
5332 // issue: https://github.com/reek/anti-adblock-killer/issues/1466
5333 // issue: https://github.com/reek/anti-adblock-killer/issues/1263
5334 // issue: https://greasyfork.org/en/forum/discussion/8422/
5335 // issue: https://github.com/reek/anti-adblock-killer/issues/986
5336 // issue: https://github.com/reek/anti-adblock-killer/issues/857
5337 // issue: https://github.com/reek/anti-adblock-killer/issues/617
5338 // issue: https://greasyfork.org/fr/forum/discussion/5426
5339 // issue: https://github.com/reek/anti-adblock-killer/issues/419
5340 // issue: https://github.com/reek/anti-adblock-killer/issues/377
5341 var excludes = ["360.cn", "amazon.", "apple.com", "ask.com", "baidu.com", "bing.com", "bufferapp.com", "chatango.com", "chromeactions.com", "easyinplay.net", "ebay.com", "facebook.com", "flattr.com", "flickr.com", "ghacks.net", "google.", "imdb.com", "imgbox.com", "imgur.com", "instagram.com", "jsbin.com", "jsfiddle.net", "linkedin.com", "live.com", "mail.ru", "microsoft.com", "msn.com", "paypal.com", "pinterest.com", "preloaders.net", "qq.com", "reddit.com", "stackoverflow.com", "tampermonkey.net", "twitter.com", "vimeo.com", "wikipedia.org", "w3schools.com", "yahoo.", "yandex.ru", "youtu.be", "youtube.com", "xemvtv.net", "vod.pl", "agar.io", "pandoon.info", "fsf.org", "adblockplus.org", "plnkr.co", "exacttarget.com", "dolldivine.com", "popmech.ru", "calm.com"];
5342 var host = location.host;
5343 var excluded = false;
5344 excludes.forEach(function (exclude) {
5345 if (new RegExp(exclude).test(host)) {
5346 excluded = true;
5347 if (Aak.opts.logExcluded) {
5348 Aak.warn('Excluded');
5349 }
5350 return false;
5351 }
5352 });
5353
5354 // Include domains
5355 // IsEventupported: http://tinyurl.com/oeez8c7
5356 if (!excluded) {
5357
5358 var handlerEvents = function () {
5359 var rule = Aak.rules[name];
5360
5361 rule.host.forEach(function (host) {
5362 // Check host
5363 if (new RegExp(host).test(location.host)) {
5364
5365 // Native mode
5366 if (!Aak.useGM && Aak.isTopframe) {
5367 Aak.warn('Run natively.');
5368 }
5369
5370 // Log rule used
5371 if (rule.host[0] != '.*?') {
5372 Aak.detected('rule', rule);
5373 }
5374
5375 // Before DOM load
5376 if (rule.onStart) {
5377 rule.onStart();
5378 }
5379 // On all statements
5380 if (rule.onAlways) {
5381 rule.onAlways(); // start
5382 Aak.onEvent(window, 'DOMContentLoaded', rule.onAlways); // idle
5383 Aak.onEvent(window, 'load', rule.onAlways); // end
5384 }
5385 // Before Script Executed
5386 if (rule.onBeforeScript) {
5387
5388 // options: contains, search, replace, override, remove, external
5389 var optionsBeforeScript = rule.onBeforeScript();
5390 if (typeof optionsBeforeScript == "object") {
5391
5392 var handlerBeforeScript = function (e, options) {
5393 var isEvent = e instanceof window.Event;
5394 var thisScript = (e.target || e.srcElement) || e;
5395
5396 options.forEach(function (o) { // hasAttribute
5397 var src = o.external ? 'src' : 'innerHTML';
5398 var search = new RegExp(o.contains, o.flags || '');
5399
5400 if (thisScript[src] && thisScript[src].length && search.test(thisScript[src])) {
5401
5402 // Stop script execution
5403 if (isEvent) {
5404 e.preventDefault();
5405 e.stopPropagation();
5406 }
5407
5408 // Create new script
5409 var parent = thisScript.parentNode;
5410 var newScript = document.createElement('script');
5411
5412 // Replace a part of the script
5413 if (o.replace) {
5414 newScript[src] = thisScript[src].replace(search, o.replace);
5415 parent.replaceChild(newScript, thisScript);
5416 } // Override script
5417 else if (o.override) {
5418 newScript[src] = o.override;
5419 parent.replaceChild(newScript, thisScript);
5420 } // Remove script
5421 else if (o.remove) {
5422 parent.removeChild(thisScript);
5423 }
5424
5425 if (o.detected) {
5426 Aak.detected(o.detected);
5427 }
5428
5429 if (Aak.opts.logInterceptedScripts) {
5430 Aak.log(src, o, thisScript, newScript);
5431 }
5432 }
5433 });
5434 };
5435
5436 // Browser supporting event beforescriptexecute
5437 if ('onbeforescriptexecute' in document) {
5438 Aak.onEvent(window, 'beforescriptexecute', function (e) {
5439 handlerBeforeScript(e, optionsBeforeScript);
5440 });
5441 } else { // Browser not suppoting beforescriptexecute
5442
5443 var loadDocument = function (optionsBeforeScript) {
5444 //if (document.referrer === '')
5445 //return;
5446
5447 Aak.warn('onbeforescript-compatible');
5448
5449 // Stop loading
5450 Aak.addScript('window.stop();'); // chrome/opera
5451 //Aak.addScript('document.open();'); // firefox
5452
5453 // Get content
5454 Aak.request({
5455 url : location.href,
5456 headers : {
5457 "Referer" : document.referrer
5458 },
5459 onload : function (result) {
5460 var html = result.responseText;
5461 var parser = new window.DOMParser();
5462 var doc = parser.parseFromString(html, "text/html");
5463 var scripts = doc.scripts;
5464
5465 for (var i = 0; i < scripts.length; i++) {
5466 var thisScript = scripts[i];
5467 handlerBeforeScript(thisScript, optionsBeforeScript);
5468 }
5469
5470 // Convert to string
5471 html = doc.documentElement.outerHTML;
5472
5473 // Write new content to HTML document:
5474 Aak.addScript('document.open(); document.write(unescape("' + window.escape(html) + '")); document.close();'); // chrome/opera
5475 //Aak.addScript('document.write(unescape("' + escape(html) + '")); document.close();'); // firefox
5476 }
5477 });
5478 };
5479 loadDocument(optionsBeforeScript);
5480 }
5481 }
5482 } // After Script Executed
5483 if (rule.onAfterScript) {
5484 if ('onafterscriptexecute' in document) { // Mozilla Firefox
5485 Aak.onEvent(window, 'afterscriptexecute', rule.onAfterScript);
5486 }
5487 }
5488 // When DOM Load
5489 if (rule.onIdle) {
5490 if (!Aak.useGM) { // Native mode
5491 rule.onIdle();
5492 } else {
5493 //Aak.onEvent(window, 'DOMContentLoaded', rule.onIdle);
5494 Aak.onEvent(window, 'DOMContentLoaded', rule.onIdle);
5495 }
5496 }
5497 // When Window Load
5498 if (rule.onEnd) {
5499 if (!Aak.useGM) { // Native mode
5500 rule.onEnd();
5501 } else {
5502 Aak.onEvent(window, 'load', rule.onEnd);
5503 }
5504 }
5505 // When DOM AttrModified
5506 if (rule.onAttrModified) {
5507 Aak.onEvent(window, 'DOMAttrModified', rule.onAttrModified, false);
5508 }
5509 // When DOM SubtreeModified
5510 if (rule.onSubtreeModified) {
5511 Aak.onEvent(window, 'DOMSubtreeModified', rule.onSubtreeModified, false);
5512 }
5513 // When DOM Elements are Inserted in Document
5514 if (rule.onInsert) {
5515
5516 // Mutation Observer
5517 // doc: http://tinyurl.com/mxxzee4
5518 // support: http://tinyurl.com/nepn7vy
5519 if (typeof window.MutationObserver != 'undefined' ||
5520 typeof WebKitMutationObserver != 'undefined') {
5521
5522 // Mutation Observer
5523 var MutationObserver1 = window.MutationObserver || window.WebKitMutationObserver;
5524
5525 // Create an observer instance
5526 var obs1 = new MutationObserver1(function (mutations) {
5527 // We can safely use `forEach` because we already use mutation
5528 // observers that are more recent than `forEach`. (source: MDN)
5529 mutations.forEach(function (mutation) {
5530 // we want only added nodes
5531 if (mutation.addedNodes.length) {
5532 Array.prototype.forEach.call(mutation.addedNodes, function (addedNode) {
5533 if (Aak.opts.logInsertedNodes) {
5534 Aak.log(addedNode);
5535 }
5536 rule.onInsert(addedNode);
5537 });
5538 }
5539 });
5540 });
5541 // Observer
5542 obs1.observe(document, {
5543 childList : true,
5544 subtree : true
5545 });
5546 }
5547 // Mutation Events (Alternative Solution)
5548 // doc: http://tinyurl.com/op95rfy
5549 else {
5550 Aak.onEvent(window, "DOMNodeInserted", function (e) {
5551 if (Aak.opts.logInsertedNodes) {
5552 Aak.log(e.target);
5553 }
5554 rule.onInsert(e.target);
5555 }, false);
5556 }
5557 }
5558 // When DOM Elements are Removed in Document
5559 if (rule.onRemove) {
5560
5561 // Mutation Observer
5562 // doc: http://tinyurl.com/mxxzee4
5563 // support: http://tinyurl.com/nepn7vy
5564 if (typeof window.MutationObserver != 'undefined' ||
5565 typeof WebKitMutationObserver != 'undefined') {
5566
5567 // Mutation Observer
5568 var MutationObserver2 = window.MutationObserver || window.WebKitMutationObserver;
5569
5570 // Create an observer instance
5571 var obs2 = new MutationObserver2(function (mutations) {
5572 // We can safely use `forEach` because we already use mutation
5573 // observers that are more recent than `forEach`. (source: MDN)
5574 mutations.forEach(function (mutation) {
5575 // we want only removed nodes
5576 if (mutation.removedNodes.length) {
5577 Array.prototype.forEach.call(mutation.removedNodes, function (removedNode) {
5578 if (Aak.opts.logRemovedNodes) {
5579 Aak.log(removedNode);
5580 }
5581 rule.onRemove(removedNode);
5582 });
5583 }
5584 });
5585 });
5586 // Observer
5587 obs2.observe(document, {
5588 childList : true,
5589 subtree : true
5590 });
5591 }
5592 // Mutation Events (Alternative Solution)
5593 // doc: http://tinyurl.com/op95rfy
5594 else {
5595 Aak.onEvent(window, "DOMNodeRemoved", function (e) {
5596 if (Aak.opts.logRemovedNodes) {
5597 Aak.log(e.target);
5598 }
5599 rule.onRemove(e.target);
5600 }, false);
5601 }
5602 }
5603
5604 // Aak Events
5605 Aak.onEvent(window, 'detected', function (e) {
5606 Aak.info(['AntiAdbKiller', Aak.isTopframe ? 'topframe' : 'subframe', location.host, e.detail]);
5607 });
5608
5609 }
5610 });
5611 };
5612
5613 // Apply rules
5614 for (var name in Aak.rules) {
5615 if (Aak.rules.hasOwnProperty(name)) {
5616 handlerEvents(Aak, name);
5617 }
5618 }
5619 }
5620 }
5621 };
5622
5623 Aak.initialize();
5624
5625})(window);