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