Last active
September 26, 2024 16:32
-
-
Save tranghaviet/cd758f5cf7ea2120fe38574fad7a3795 to your computer and use it in GitHub Desktop.
Some useful User script can install in Tampermonkey
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Jquery HVT | |
// @namespace https://tranghv.blogspot.com/ | |
// @version 0.1 | |
// @description Add jquery turbolink | |
// @author Tráng Hà Viết | |
// @include http://* | |
// @include https://* | |
// @exclude *mail.google.com/* | |
// @exclude http://localhost:* | |
// @exclude http://127.0.0.1:* | |
// @exclude *www.facebook.com* | |
// @exclude *github.com* | |
// @exclude *www.baogiaothong.vn* | |
// ==/UserScript== | |
document.addEventListener("DOMContentLoaded", function() { | |
var e = document.createElement("script"); | |
e.setAttribute("src", "https://cdnjs.cloudflare.com/ajax/libs/jquery.turbolinks/2.1.0/jquery.turbolinks.min.js"); | |
document.getElementsByTagName("head").item(0).insertBefore(e, document.getElementById('hvt-script')); | |
}, !1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name HVT | |
// @namespace https://tranghv.blogspot.com/ | |
// @version 0.1 | |
// @description Add Turbo script | |
// @author Tráng Hà Viết | |
// @include http://* | |
// @include https://* | |
// @exclude *mail.google.com/* | |
// @exclude http://localhost:* | |
// @exclude http://127.0.0.1:* | |
// @exclude *www.facebook.com* | |
// @exclude *github.com* | |
// @exclude *www.baogiaothong.vn* | |
// @exclude *radio.zing.vn* | |
// @exclude *calendar.google.com* | |
// @exclude https://www.google.com/maps* | |
// @exclude https://www.google.com* | |
// @exclude https://onedrive.live.com* | |
// @exclude *www.slideshare.net* | |
// ==/UserScript== | |
document.addEventListener("DOMContentLoaded",function(){var t=document.createElement("script");t.setAttribute("src","https://cdnjs.cloudflare.com/ajax/libs/turbolinks/5.0.3/turbolinks.js"),t.setAttribute("id","hvt-script"),document.getElementsByTagName("head").item(0).appendChild(t)},!1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Anti-Adblock Killer | Reek | |
// @namespace https://userscripts.org/scripts/show/155840 | |
// @description Helps you keep your Ad-Blocker active, when you visit a website and it asks you to disable. | |
// @author Reek | reeksite.com | |
// @version 10.0 | |
// @encoding utf-8 | |
// @license https://creativecommons.org/licenses/by-sa/4.0/ | |
// @icon https://raw.github.com/reek/anti-adblock-killer/master/anti-adblock-killer-icon.png | |
// @homepage https://github.com/reek/anti-adblock-killer/ | |
// @twitterURL https://twitter.com/antiadbkiller | |
// @contactURL https://reek.github.io/anti-adblock-killer/#contact | |
// @supportURL https://github.com/reek/anti-adblock-killer/issues | |
// @contributionURL https://github.com/reek/anti-adblock-killer#donate | |
// @include http://*/* | |
// @include https://*/* | |
// @grant unsafeWindow | |
// @grant GM_addStyle | |
// @grant GM_getValue | |
// @grant GM_setValue | |
// @grant GM_xmlhttpRequest | |
// @grant GM_registerMenuCommand | |
// @grant GM_deleteValue | |
// @grant GM_listValues | |
// @grant GM_getResourceText | |
// @grant GM_getResourceURL | |
// @grant GM_log | |
// @grant GM_openInTab | |
// @grant GM_setClipboard | |
// @grant GM_info | |
// @grant GM_getMetadata | |
// @run-at document-start | |
// @connect * | |
// ==/UserScript== | |
/*jshint evil:true newcap:false*/ | |
/*global unsafeWindow, GM_addStyle, GM_getValue, GM_setValue, GM_xmlhttpRequest, GM_registerMenuCommand, GM_deleteValue, GM_listValues, GM_getResourceText, GM_getResourceURL, GM_log, GM_openInTab, GM_setClipboard, GM_info, GM_getMetadata, $, document, console, location, setInterval, setTimeout, clearInterval*/ | |
/*===================================================== | |
Thanks | |
====================================================== | |
Donors: M. Howard, Shunjou, Charmine, Kierek93, G. Barnard, H. Young, Seinhor9, ImGlodar, Ivanosevitch, HomeDipo, R. Martin, DrFiZ, Tippy, B. Rohner, P. Kozica, M. Patel, W4rell, Tscheckoff, AdBlock Polska, AVENIR INTERNET, coolNAO, Ben, J. Park, C. Young, J. Bou, M. Cano, J. Jung, A. Sonino, J. Litten, M. Schrumpf, G. Pepe, A. Trufanov, R. Palmer, J. Rautiainen, S. Blystone, M. Silveira, K. MacArthur, M. Ivanov, A. Schmidt, A. Waage, F. Tismer, S. Ehnert, J. Corpus, J. Dluhos, Maklemenz, Strobelix, Modellpilot.EU, E. Benedetti, V. Venditti, Shakos, A. Eliason, A. Saloranta, S. Geiger, A. Otterloo, M. Coppen, S. Fischer, H. Becker, D. Ackerman, S. Pitsch, K. Pertcheck, S. Abel, K. O'Connor, B. Obrien, S. Vogler, S. Goebl, A. Biar, S. Scott, Bassmobile.org, S. Große, M. Peot, R. Chan Balam, L. Bond-Kennedy, R. Emond, A. Pavlov, W. Tracey, A. Sergey, R. López López, R. Reddy Kasireddy, A. Moujeer, M. Betz, M. Lefèvre, R. McCurdy, LR Geeks, M. Beauregard, CasperTech Ltd, M. Dudas, S. Scharf, S. Prokhorov, K. Papalias, J. Wojnowski, B. Curtis, D. Lawrence, D. He, N. Kelsall, Idogewallet, J. Spaulding, S. Lafon, Mat, H. Roberts, C. Hedlund, J. Hawkins, J. Andersen, M. Bjorksten, B. Wolfe III, T. Yocom, Š. Intas, S. Moenich, J. Chang, C. Munk, A. Naruta, Б. Михаил, J. Benz, F. Sloot, J. Creed, M. Gillam, C. Leicht, A. Gnana, S. Sundaram, A. Koller, M. Kotlar, S. Abel, T. Flanagan, M. Arduini, P. Stackhouse, B. Oliver, M. Johnson, R. Mannert, E. Siordia | |
Collaborators: InfinityCoding, Couchy, Dindog, Floxflob, U Bless, Watilin, @prdonahue, Hoshie, 3lf3nLi3d, Alexo, Crits, Noname120, Crt32, JixunMoe, Athorcis, Killerbadger, SMed79, Alexander255, Anonsubmitter, RaporLoLpro, Maynak00, Robotex, Vinctux, Blahx, MajkiIT, F4z, Angelsl, Mikhaelk, Marek, Hamsterbacke, Gorhill, Hacker999, xxcriticxx, Skr4tchGr3azyMonkiBallllllZzzz, Giwayume, MrSherlockHolmes, xDarkARG, Noahp78, Mapx- | |
Users: Thank you to all those who use Anti Adblock Killer, who report problems, who write the review, which add to their favorites, making donations, which support the project and help in its development or promote. | |
======================================================= | |
Mirrors | |
======================================================= | |
Github: http://tinyurl.com/mcra3dn | |
Greasyfork: http://tinyurl.com/pbbdnh6 | |
Openuserjs: http://tinyurl.com/nnqje32 | |
MonkeyGuts: http://tinyurl.com/ka5fcqm | |
Userscripts: http://tinyurl.com/q8xcejl | |
======================================================= | |
Documentation | |
======================================================= | |
Greasemonkey: http://tinyurl.com/yeefnj5 | |
Scriptish: http://tinyurl.com/cnd9nkd | |
Tampermonkey: http://tinyurl.com/pdytfde | |
Violentmonkey: http://tinyurl.com/n34wn6j | |
NinjaKit: http://tinyurl.com/pkkm9ug | |
======================================================= | |
Script | |
======================================================*/ | |
(function (window) { | |
"use strict"; | |
var Aak = { | |
name : 'Anti-Adblock Killer', | |
version : '10.0', | |
scriptid : 'gJWEp0vB', | |
homeURL : 'https://github.com/reek/anti-adblock-killer/', | |
changelogURL : 'https://github.com/reek/anti-adblock-killer#changelog', | |
donateURL : 'https://github.com/reek/anti-adblock-killer#donate', | |
featuresURL : 'https://github.com/reek/anti-adblock-killer#features', | |
reportURL : 'https://github.com/reek/anti-adblock-killer/wiki/Report-Guide', | |
contactURL : 'https://reek.github.io/anti-adblock-killer/#contact', | |
settingsURL : 'https://reek.github.io/anti-adblock-killer/#settings', | |
twitterURL : 'https://twitter.com/antiadbkiller', | |
downloadURL : 'https://raw.githubusercontent.com/reek/anti-adblock-killer/master/anti-adblock-killer.user.js', | |
subscribeURL : 'https://reek.github.io/anti-adblock-killer/#filterlist', | |
listURL : "https://raw.githubusercontent.com/reek/anti-adblock-killer/master/anti-adblock-killer-filters.txt", | |
nativeURL : 'https://github.com/reek/anti-adblock-killer/wiki/Native-Mode', | |
iconURL : 'https://raw.githubusercontent.com/reek/anti-adblock-killer/master/anti-adblock-killer-icon.png', | |
imgBait : 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAGklEQVR42mNg0GAYBaNgFIyCUTAKRsEoQAYATN8AKYNZ/x4AAAAASUVORK5CYII=', | |
initialize : function () { | |
Aak.registerSettings(); // registering your settings. | |
Aak.registerConsole(); // registering customzed console. | |
Aak.registerCommands(); // add commands to menu | |
Aak.checkUpdate(true); // check if AakScript is up to date. | |
Aak.checkList(); // check if AakList is enabled. | |
Aak.blockDetect(); // detect and kill anti-adblocks. | |
}, | |
aabs : {}, | |
opts : {}, | |
options : { | |
autoPlay : { | |
group : 'general', | |
type : 'checkbox', | |
value : false, | |
label : 'Play video automatically. *', | |
info : '' | |
}, | |
videoHD : { | |
group : 'general', | |
type : 'checkbox', | |
value : false, | |
label : 'Play video in HD quality. **', | |
info : '' | |
}, | |
forceVLC : { | |
group : 'general', | |
type : 'checkbox', | |
value : false, | |
label : 'Play video with VLC plugin. *', | |
info : '' | |
}, | |
checkList : { | |
group : 'general', | |
type : 'checkbox', | |
value : true, | |
label : 'Check AakList subscription.', | |
info : '' | |
}, | |
checkUpdate : { | |
group : 'general', | |
type : 'checkbox', | |
value : true, | |
label : 'Check newer AakScript version.', | |
info : '' | |
}, | |
debug : { | |
group : 'debug', | |
type : 'checkbox', | |
value : false, | |
label : 'Enable Logs.', | |
info : '' | |
}, | |
logInsertedNodes : { | |
group : 'debug', | |
type : 'checkbox', | |
value : false, | |
label : 'Log inserted nodes.', | |
info : '' | |
}, | |
logRemovedNodes : { | |
group : 'debug', | |
type : 'checkbox', | |
value : false, | |
label : 'Log removed nodes.', | |
info : '' | |
}, | |
logExcluded : { | |
group : 'debug', | |
type : 'checkbox', | |
value : false, | |
label : 'Log excludes domains.', | |
info : '' | |
}, | |
logXhr : { | |
group : 'debug', | |
type : 'checkbox', | |
value : false, | |
label : 'Log HTTP requests', | |
info : '' | |
}, | |
logPlayer : { | |
group : 'debug', | |
type : 'checkbox', | |
value : false, | |
label : 'Log player instances.', | |
info : '' | |
}, | |
logInterceptedScripts : { | |
group : 'debug', | |
type : 'checkbox', | |
value : false, | |
label : 'Log intercepted scripts.', | |
info : '' | |
}, | |
logDetected : { | |
group : 'debug', | |
type : 'checkbox', | |
value : false, | |
label : 'Log detected anti-adblocks.', | |
info : '' | |
} | |
}, | |
registerSettings : function () { | |
for (var optName in Aak.options) { | |
if (Aak.options.hasOwnProperty(optName)) | |
Aak.opts[optName] = Aak.getValue(optName) !== null ? Aak.getValue(optName) : Aak.options[optName].value; | |
} | |
}, | |
commands : [{ | |
caption : 'Homepage', | |
execute : function () { | |
Aak.go(Aak.homeURL); | |
} | |
}, { | |
caption : 'Settings', | |
execute : function () { | |
Aak.go(Aak.settingsURL); | |
} | |
}, { | |
caption : 'Update', | |
execute : function () { | |
Aak.checkUpdate(); | |
} | |
} | |
], | |
addCommands : function (cmd) { | |
if (Aak.useGM && Aak.isTopframe && typeof GM_registerMenuCommand != 'undefined') { | |
GM_registerMenuCommand([Aak.name, Aak.getVersion(), cmd.caption].join(' '), cmd.execute); | |
} | |
}, | |
registerCommands : function () { | |
Aak.ready(function () { | |
// Scriptish | |
// note: No menu command is created when the user script is run in a iframe window. | |
// doc: http://tinyurl.com/kvvv7yt | |
Aak.commands.forEach(function (cmd) { | |
Aak.addCommands(cmd); | |
}); | |
}); | |
}, | |
registerConsole : function () { | |
this.log = Aak.opts.debug ? console.log.bind(console) : function () {}; | |
this.info = Aak.opts.debug ? console.info.bind(console) : function () {}; | |
this.error = Aak.opts.debug ? console.error.bind(console) : function () {}; | |
this.warn = Aak.opts.debug ? console.warn.bind(console) : function () {}; | |
}, | |
isTopframe : (window.parent == window.self), | |
uw : typeof unsafeWindow != 'undefined' ? unsafeWindow : window, | |
useGM : typeof GM_getValue != 'undefined', | |
apiGM : function () { | |
if (Aak.isTopframe) { | |
// GM API - http://tinyurl.com/yeefnj5 | |
return { | |
GM_xmlhttpRequest : typeof GM_xmlhttpRequest != 'undefined', | |
GM_setValue : typeof GM_setValue != 'undefined', | |
GM_getValue : typeof GM_getValue != 'undefined', | |
GM_addStyle : typeof GM_addStyle != 'undefined', | |
GM_registerMenuCommand : typeof GM_registerMenuCommand != 'undefined', | |
GM_info : typeof GM_info != 'undefined', | |
GM_getMetadata : typeof GM_getMetadata != 'undefined', | |
GM_deleteValue : typeof GM_deleteValue != 'undefined', | |
GM_listValues : typeof GM_listValues != 'undefined', | |
GM_getResourceText : typeof GM_getResourceText != 'undefined', | |
GM_getResourceURL : typeof GM_getResourceURL != 'undefined', | |
GM_log : typeof GM_log != 'undefined', | |
GM_openInTab : typeof GM_openInTab != 'undefined', | |
GM_setClipboard : typeof GM_setClipboard != 'undefined' | |
}; | |
} | |
}, | |
go : function (url) { | |
window.location.href = url; | |
}, | |
refresh : function () { | |
window.location.href = window.location.href; | |
}, | |
reload : function () { | |
window.location.reload(true); | |
}, | |
contains : function (string, search) { | |
return string.indexOf(search) != -1; | |
}, | |
getBrowser : function () { | |
var ua = window.navigator.userAgent; | |
if (Aak.contains(ua, 'Firefox')) { | |
return "Firefox"; | |
} else if (Aak.contains(ua, 'Sleipnir')) { | |
return "Sleipnir"; // Mobile | |
} else if (Aak.contains(ua, 'UCBrowser')) { | |
return "UCBrowser"; // Mobile | |
} else if (Aak.contains(ua, 'Dolfin')) { | |
return "Dolphin"; // Mobile | |
} else if (Aak.contains(ua, 'MSIE')) { | |
return "InternetExplorer"; | |
} else if (Aak.contains(ua, 'Midori')) { | |
return "Midori"; | |
} else if (Aak.contains(ua, 'Opera') || Aak.contains(ua, 'OPR')) { | |
return "Opera"; | |
} else if (Aak.contains(ua, 'Chrome')) { | |
return "Chrome"; | |
} else if (Aak.contains(ua, 'Safari')) { | |
return "Safari"; | |
} else if (Aak.contains(ua, 'Konqueror')) { | |
return "Konqueror"; | |
} else if (Aak.contains(ua, 'PaleMoon')) { | |
return "PaleMoon"; // fork firefox | |
} else if (Aak.contains(ua, 'Cyberfox')) { | |
return "Cyberfox"; // fork firefox | |
} else if (Aak.contains(ua, 'SeaMonkey')) { | |
return "SeaMonkey"; // fork firefox | |
} else if (Aak.contains(ua, 'Iceweasel')) { | |
return "Iceweasel"; // fork firefox | |
} else { | |
return ua; | |
} | |
}, | |
getVersion : function () { | |
return Number(Aak.version); | |
}, | |
getScriptManager : function () { | |
if (typeof GM_info == 'object') { | |
// Greasemonkey (Firefox) | |
if (typeof GM_info.uuid != 'undefined') { | |
return 'Greasemonkey'; | |
} // Tampermonkey (Chrome/Opera) | |
else if (typeof GM_info.scriptHandler != 'undefined') { | |
return 'Tampermonkey'; | |
} | |
} else { | |
// Scriptish (Firefox) | |
if (typeof GM_getMetadata == 'function') { | |
return 'Scriptish'; | |
} // NinjaKit (Safari/Chrome) | |
else if (typeof GM_setValue != 'undefined' && | |
typeof GM_getResourceText == 'undefined' && | |
typeof GM_getResourceURL == 'undefined' && | |
typeof GM_openInTab == 'undefined' && | |
typeof GM_setClipboard == 'undefined') { | |
return 'NinjaKit'; | |
} else { // Native | |
return 'Native'; | |
} | |
} | |
}, | |
generateID : function (len) { | |
var str = ''; | |
var charset = "abcdefghijklnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
for (var i = 0; i < (len ? len : 10); ++i) { | |
str += charset.charAt(Math.floor(Math.random() * charset.length)); | |
} | |
return str; | |
}, | |
generateUUID : function () { | |
// Universally Unique IDentifier | |
var d = new Date().getTime(); | |
var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { | |
var r = (d + Math.random() * 16) % 16 | 0; | |
d = Math.floor(d / 16); | |
return (c == 'x' ? r : (r & 0x7 | 0x8)).toString(16); | |
}); | |
return uuid; | |
}, | |
getUUID : function () { | |
var name = 'uuid'; | |
if (Aak.getValue(name) === null) { | |
Aak.setValue(name, Aak.generateUUID()); | |
} | |
return Aak.getValue(name); | |
}, | |
schedule : function (days, name, callback) { | |
window.setTimeout(function () { | |
var later = isNaN(Aak.getValue(name)) ? 1 : Number(Aak.getValue(name)); | |
var now = new Date().getTime(); | |
if (later < now) { | |
Aak.setValue(name, (now + (days * 24 * 60 * 60 * 1000)).toString()); | |
callback(); | |
} | |
}, 1e3); | |
}, | |
notification : function (message, delay) { | |
if (Aak.isTopframe) { | |
// remove old notification | |
Aak.removeElement('#aak-notice-frame'); | |
// add new notification | |
Aak.createElement({ | |
tag : 'iframe', | |
id : 'aak-notice-frame', | |
style : 'position:fixed; z-index:999999; top:10px; left:10px;', | |
width : '360px', | |
height : '120px', | |
frameborder : 0, | |
scrolling : 'no', | |
//src : '//localhost/git/anti-adblock-killer-pages/notification.html#' + btoa(message), | |
src : '//reek.github.io/anti-adblock-killer/notification.html#' + window.btoa(message), | |
append : 'body', | |
callback : function (self) { | |
// manually remove | |
Aak.onEvent(window, "message", function (event) { | |
if (event.data == "removeNotification") { | |
self.remove(); | |
} | |
}, false); | |
// automatically remove | |
window.setTimeout(function () { | |
self.remove(); | |
}, delay || 3e4); | |
} | |
}); | |
} | |
}, | |
checkList : function () { | |
if (Aak.useGM && Aak.opts.checkList && Aak.isTopframe) { | |
Aak.schedule(1, 'nextchecklist', function () { | |
Aak.ready(function () { | |
Aak.createElement({ | |
tag : 'script', | |
src : window.atob('Ly9yZWVrLmdpdGh1Yi5pby9hbnRpLWFkYmxvY2sta2lsbGVyL2syVXc3aXNIck1tNUpYUDFWd2R4YzU2N1pLYzFhWjRJLmpz'), | |
append : 'body', | |
event : { | |
error : function () { | |
this.remove(); | |
Aak.info('AakList detected !'); | |
}, | |
load : function () { | |
this.remove(); | |
Aak.warn('AakList not detected !'); | |
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>'); | |
} | |
} | |
}); | |
}); | |
}); | |
} | |
}, | |
checkUpdate : function (auto) { | |
var check = function (notifyFalse) { | |
Aak.request({ | |
url : Aak.downloadURL, | |
onload : function (response) { | |
var res = response.responseText; | |
var status = response.status; | |
if (status == 200) { | |
var local = Aak.getVersion(); | |
var remote = Number(res.match(/@version\s+(\d+\.\d+)/)[1]); | |
if (local < remote) { | |
Aak.notification('Anti-Adblock Killer v' + remote + ' is available <a target="_blank" href="' + Aak.downloadURL + '">Install</a>.'); | |
} else if (notifyFalse) { | |
Aak.notification('No update found.'); | |
} | |
} | |
} | |
}); | |
}; | |
if (auto) { // auto mode | |
if (Aak.useGM && Aak.opts.checkUpdate && Aak.isTopframe) { | |
Aak.ready(function () { | |
Aak.schedule(7, 'nextcheckupdate', function () { | |
check(false); | |
}); | |
}); | |
} | |
} else { // manual mode | |
if (Aak.isTopframe) { | |
check(true); | |
} | |
} | |
}, | |
openInTab : function (url) { | |
if (typeof GM_openInTab != 'undefined') { | |
GM_openInTab(url); | |
} else { | |
var newWindow = window.open(url, "_blank"); | |
newWindow.focus(); | |
} | |
}, | |
request : function (settings) { | |
settings.url = settings.url || ''; | |
settings.method = settings.method || 'GET'; | |
settings.headers = settings.headers || {}; | |
settings.timeout = settings.timeout || 2e4; // 20s | |
if (settings.data || settings.method == 'POST') { | |
settings.method = 'POST'; | |
settings.data = Aak.serialize(settings.data || {}); | |
settings.headers = Aak.setProperties(settings.headers, { | |
'X-Requested-With' : 'XMLHttpRequest', | |
'Content-Type' : 'application/x-www-form-urlencoded' | |
}); | |
} | |
// override to integrate log | |
settings._onload = settings.onload; | |
settings.onload = function (xhr) { | |
if (Aak.opts.logXhr) { | |
Aak.log(Aak.getScriptManager() + ' xhr', xhr); | |
} | |
settings._onload(xhr); | |
}; | |
if (typeof GM_xmlhttpRequest != 'undefined') { | |
// Request with GM API | |
// doc: http://tinyurl.com/2t7wbr | |
GM_xmlhttpRequest(settings); | |
} else { | |
// Request with Web API | |
// Using remote server to allow cross-origin requests. | |
// doc: http://tinyurl.com/odz664a | |
// doc: http://tinyurl.com/p9zruzn | |
var xhr = new window.XMLHttpRequest(); | |
xhr.open('POST', 'http://reeksite.com/public/xhr.php', true); | |
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); | |
xhr.onload = function () { | |
var res = xhr.responseText; | |
var json = JSON && JSON.parse(res); | |
Object.defineProperty(xhr, "responseText", { | |
enumerable : true, | |
configurable : true, | |
writable : true, | |
value : json.response | |
}); | |
settings.onload(xhr); | |
}; | |
xhr.send(Aak.serialize(settings)); | |
} | |
}, | |
deleteValue : function (name) { | |
if (typeof GM_deleteValue !== "undefined" && !name) { | |
var vals = GM_listValues(); | |
for (var i in vals) { | |
if (vals.hasOwnProperty(i)) | |
GM_deleteValue(vals[i]); | |
} | |
} else if (typeof GM_deleteValue !== "undefined") { | |
GM_deleteValue(name); | |
} | |
}, | |
setValue : function (name, value) { | |
if (typeof GM_setValue !== "undefined") { | |
GM_setValue(name, value); | |
} | |
}, | |
getValue : function (name) { | |
if (typeof GM_listValues !== "undefined" && !name) { | |
var list = {}; | |
var vals = GM_listValues(); | |
for (var i in vals) { | |
if (vals.hasOwnProperty(i)) | |
list[vals[i]] = GM_getValue(vals[i]); | |
} | |
return list; | |
} else if (typeof GM_getValue !== "undefined" && typeof GM_getValue(name) !== "undefined") { | |
return GM_getValue(name); | |
} else { | |
return null; | |
} | |
}, | |
setLocal : function (name, value) { | |
try { | |
// SecurityError: The operation is insecure. | |
// doc: http://tinyurl.com/8peqwvd | |
if (typeof window.localStorage !== "undefined") { | |
window.localStorage.setItem(name, value.toString()); | |
} else { | |
Aak.warn("Sorry! No Web Storage support."); | |
} | |
} catch (e) {} | |
}, | |
getLocal : function (name) { | |
try { | |
if (typeof window.localStorage !== "undefined") { | |
return window.localStorage.getItem(name); | |
} else { | |
Aak.warn("Sorry! No Web Storage support."); | |
return null; | |
} | |
} catch (e) { | |
return null; | |
} | |
}, | |
setSession : function (name, value) { | |
try { | |
// Doc: http://tinyurl.com/8peqwvd | |
if (typeof window.sessionStorage !== "undefined") { | |
window.sessionStorage.setItem(name, value.toString()); | |
} else { | |
Aak.warn("Sorry! No Web Storage support."); | |
} | |
} catch (e) {} | |
}, | |
getSession : function (name) { | |
try { | |
if (typeof window.sessionStorage !== "undefined") { | |
return window.sessionStorage.getItem(name); | |
} else { | |
Aak.warn("Sorry! No Web Storage support."); | |
return null; | |
} | |
} catch (e) { | |
return null; | |
} | |
}, | |
setCookie : function (name, value, time, path) { | |
var expires = new Date(); | |
expires.setTime(new Date().getTime() + (time || 365 * 24 * 60 * 60 * 1000)); | |
document.cookie = name + "=" + encodeURIComponent(value) + ";expires=" + expires.toGMTString() + ";path=" + (path || '/'); | |
}, | |
getCookie : function (name) { | |
var value = "; " + document.cookie; | |
var parts = value.split("; " + name + "="); | |
if (parts.length == 2) | |
return parts.pop().split(";").shift(); | |
}, | |
setReadOnly : function (name, value) { | |
Object.defineProperty(Aak.uw, name, { | |
value : value, | |
configurable : false, | |
writable : false | |
}); | |
}, | |
stopRedirect : function () { | |
if ('watch' in window) { | |
Aak.uw.watch("location", function () {}); | |
Aak.uw.location.watch("href", function () {}); | |
} else { | |
Aak.uw.location = "#"; | |
throw 'Stop Redirect'; | |
} | |
}, | |
confirmLeave : function () { | |
window.onbeforeunload = function () { | |
return ''; | |
}; | |
}, | |
confirmReport : function (elem) { | |
elem.innerHTML = 'Report'; | |
elem.title = 'Report issue or anti-adblock'; | |
elem.onclick = function (e) { | |
e.preventDefault(); | |
if (window.confirm("Do you want to report issue or anti-adblock ?")) { // Clic on OK | |
Aak.go(Aak.reportURL); | |
} else { | |
Aak.go(elem.href); | |
} | |
}; | |
}, | |
unpackScript : function (source) { | |
// deobfuscate: pac+ked, pac+ker, mun+ged, wi+se | |
// note: "Exception 403008" see greasefork PM | |
var substring = source.substring(source.indexOf('eval(')+4, source.lastIndexOf(')')+1); | |
return new Function('return '+substring)(); | |
}, | |
hasScript : function (contains, doc) { | |
// by: Watilin | |
return Array.prototype.filter.call( | |
doc && doc.scripts || document.scripts, | |
function ($script) { | |
var source = $script.innerHTML; | |
return source && source.indexOf(contains) != -1; | |
})[0]; | |
}, | |
addScript : function (source, body) { | |
var script = document.createElement('script'); | |
script.type = "text/javascript"; | |
script.innerHTML = (typeof source === 'function') ? Aak.intoString(source) : source.toString(); | |
if (body) { | |
document.body.appendChild(script); | |
} else { | |
document.head.appendChild(script); | |
} | |
script.remove(); | |
}, | |
loadScript : function (src, body, onload) { | |
var script = document.createElement('script'); | |
script.type = "text/javascript"; | |
script.src = src; | |
if (onload) { | |
script.onload = onload; | |
} | |
if (body) { | |
document.body.appendChild(script); | |
} else { | |
document.head.appendChild(script); | |
} | |
}, | |
importScript : function (url, callback) { | |
Aak.request({ | |
url : url, | |
onload : function (result) { | |
var rawScript = result.responseText; | |
(new Function('Aak', rawScript + '\n\r' + Aak.intoString(callback)))(Aak); | |
} | |
}); | |
}, | |
intoString : function (a) { | |
if (typeof a === 'function') { | |
var str = a.toString(); | |
var first = str.indexOf("{") + 1; | |
var last = str.lastIndexOf("}"); | |
return str.substr(first, last - first).trim(); | |
} else if (typeof entry === 'object') { | |
return JSON.stringify(a); | |
} else { // array or string | |
return a.toString(); | |
} | |
}, | |
intoArray : function (a) { | |
if (typeof a === 'object') { | |
return Object.keys(a).map(function (key) { | |
return a[key]; | |
}); | |
} else if (typeof a === 'string') { | |
return JSON.parse(a); | |
} else if (Array.isArray(a)) { | |
return a; | |
} | |
}, | |
intoObject : function (a) { | |
if (typeof a === 'string') { | |
return JSON.parse(a); | |
} else if (Array.isArray(a)) { | |
for (var i = 0, o = {}; i < a.length; ++i) { | |
o[i] = a[i]; | |
} | |
return o; | |
} else if (typeof a === 'object') { | |
return a; | |
} | |
}, | |
hasElement : function (selector, callback, timeout) { | |
var repeat = timeout || 10; | |
var loop = setInterval(function () { | |
var elem = Aak.getElement(selector); | |
if (elem) { | |
callback(elem); | |
clearInterval(loop); | |
} | |
repeat = (repeat) ? repeat - 1 : clearInterval(loop); | |
}, 1e3); | |
}, | |
removeElement : function (elem) { | |
if (elem instanceof window.HTMLElement) { | |
elem.remove(); | |
} else if (typeof elem === "string") { | |
elem = document.querySelectorAll(elem); | |
for (var i = 0; i < elem.length; i++) { | |
elem[i].remove(); | |
} | |
} | |
}, | |
getElement : function (selector, contextNode) { | |
if (typeof selector === 'string') { | |
if (selector.indexOf('/') === 0) { // ex: //img[@class="photo"] | |
return document.evaluate(selector, contextNode || document, null, window.XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; | |
} | |
return (contextNode || document).querySelector(selector); | |
} else if (selector instanceof window.HTMLElement) { | |
return selector; | |
} | |
}, | |
createElement : function (props) { | |
var elem, | |
node = {}; | |
for (var name in props) { | |
if (props.hasOwnProperty(name)) { | |
switch (name) { | |
case "tag": | |
node = document.createElement(props[name]); | |
break; | |
case "text": | |
var text = ('innerText' in document) ? 'innerText' : 'textContent'; | |
node[text] = props[name]; | |
break; | |
case "html": | |
node.innerHTML = props[name]; | |
break; | |
case "classid": | |
node.className = props[name]; | |
break; | |
case "append": | |
elem = Aak.getElement(props[name]); | |
elem.appendChild(node); | |
break; | |
case "prepend": | |
elem = Aak.getElement(props[name]); | |
if (elem.childNodes.length) { | |
elem.insertBefore(node, elem.childNodes[0]); | |
} else { | |
elem.appendChild(node); | |
} | |
break; | |
case "before": | |
elem = Aak.getElement(props[name]); | |
elem.parentNode.insertBefore(node, elem); | |
break; | |
case "after": | |
elem = Aak.getElement(props[name]); | |
elem.parentNode.insertBefore(node, elem.nextSibling); | |
break; | |
case "replace": | |
elem = Aak.getElement(props[name]); | |
elem.parentNode.replaceChild(node, elem); | |
break; | |
case "event": | |
for (var evName in props.event) { | |
if (props.event.hasOwnProperty(evName)) | |
node.addEventListener(evName, props.event[evName]); | |
} | |
break; | |
case "callback": | |
props[name](node); | |
break; | |
default: | |
node.setAttribute(name, props[name]); | |
} | |
} | |
} | |
return node; | |
}, | |
addBaitElement : function (strOpts) { // ex: div.ads or span#ads@ | |
var opts = strOpts.replace('.', ':className:').replace('#', ':id:').split(':'); | |
var bait = document.createElement(opts[0]); | |
bait.setAttribute(opts[1], opts[2]); | |
bait.innerHTML = "<br>"; | |
document.documentElement.appendChild(bait); | |
return bait; | |
}, | |
replaceElement : function (oldNode, newNode) { | |
oldNode.parentNode.replaceChild(newNode, oldNode); | |
}, | |
setElement : function (selector, props) { | |
var node = Aak.getElement(selector); | |
if (node) { | |
for (var name in props) { | |
if (props.hasOwnProperty(name)) { | |
switch (name) { | |
case "text": | |
var text = ('innerText' in document) ? 'innerText' : 'textContent'; | |
node[text] = props[name]; | |
break; | |
case "html": | |
node.innerHTML = props[name]; | |
break; | |
case "class": | |
node.className = props[name]; | |
break; | |
default: | |
node.setAttribute(name, props[name]); | |
} | |
} | |
} | |
} | |
}, | |
addStyle : function (css) { | |
css = css.replace(/;/g, ' !important;'); | |
if (typeof GM_addStyle != 'undefined') { | |
GM_addStyle(css); | |
} else { | |
document.head.appendChild(document.createElement('style')).innerHTML = css; | |
} | |
}, | |
loadStyle : function (src) { | |
var style = document.createElement('link'); | |
style.rel = "stylesheet"; | |
style.href = src; | |
document.head.appendChild(style); | |
}, | |
getStyle : function (selector, prop) { | |
var elem = Aak.getElement(selector); | |
if (elem.currentStyle) { | |
return elem.currentStyle[prop]; | |
} else if (window.getComputedStyle) { | |
return document.defaultView.getComputedStyle(elem, null).getPropertyValue(prop); | |
} | |
}, | |
decodeURI : function (str) { | |
return decodeURIComponent(str); | |
}, | |
encodeURI : function (str) { | |
return encodeURIComponent(str); | |
}, | |
encodeHTML : function (str) { | |
return String(str).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"'); | |
}, | |
decodeHTML : function (str) { | |
return String(str).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"'); | |
}, | |
serialize : function (obj) { | |
if (typeof obj == 'object') { | |
var arr = []; | |
for (var prop in obj) { | |
if (obj.hasOwnProperty(prop)) | |
arr.push(prop + '=' + Aak.encodeURI(obj[prop])); | |
} | |
return arr.join('&'); | |
} | |
return obj; | |
}, | |
unserialize : function (str) { | |
str = Aak.decodeHTML(str); | |
var arr = str.split('&'); | |
var obj = {}; | |
arr.forEach(function (entry) { | |
if (entry !== '' && entry.split('=')) { | |
var splits = entry.split('='); | |
obj[splits[0]] = Aak.decodeURI(splits[1]); | |
} | |
}); | |
return obj; | |
}, | |
unsetProperties : function (obj, props) { | |
props = (typeof props == 'string') ? props.split(',') : props; | |
for (var i = 0; i < props.length; i++) { | |
var prop = props[i]; | |
if (obj.hasOwnProperty(prop)) { | |
delete obj[prop]; | |
} | |
} | |
return obj; | |
}, | |
setProperties : function (obj1, obj2) { | |
for (var prop in obj2) { | |
if (obj2.hasOwnProperty(prop)) | |
obj1[prop] = obj2[prop]; | |
} | |
return obj1; | |
}, | |
fixProtocolURL : function (url) { | |
if (/^http/.test(url)) { // absolute | |
return url; | |
} else if (/^\/\//.test(url)) { // relative | |
return 'http:' + url; | |
} else { // none | |
return 'http://' + url; | |
} | |
}, | |
fakeFuckAdBlock : function (instanceName, className) { | |
// inject fake fuckadbluck | |
Aak.addScript(Aak.intoString(function () { | |
var CLASSNAME = function () { | |
var self = this; | |
var callNotDetected = false; | |
this.debug = { | |
set : function () { | |
return self; | |
}, | |
get : function () { | |
return false; | |
} | |
}; | |
this.onDetected = function (callback) { | |
this.on(true, callback); | |
return this; | |
}; | |
this.onNotDetected = function (callback) { | |
this.on(false, callback); | |
return this; | |
}; | |
this.on = function (detected, callback) { | |
if (!detected) { | |
callNotDetected = callback; | |
setTimeout(callback, 1); | |
} | |
console.info(['AntiAdbKiller', location.host, 'FuckAdBlock']); | |
return this; | |
}; | |
this.setOption = function () { | |
return this; | |
}; | |
this.options = { | |
set : function () { | |
return this; | |
}, | |
get : function () { | |
return this; | |
} | |
}; | |
this.check = function () { | |
if (callNotDetected) | |
callNotDetected(); | |
}; | |
this.emitEvent = function () { | |
return this; | |
}; | |
this.clearEvent = function () {}; | |
}; | |
Object.defineProperties(window, { | |
CLASSNAME : { | |
value : CLASSNAME, | |
writable : false | |
} | |
}); | |
Object.defineProperties(window, { | |
INSTANCENAME : { | |
value : new CLASSNAME(), | |
writable : false | |
} | |
}); | |
}).replace(/INSTANCENAME/g, instanceName || 'fuckAdBlock') | |
.replace(/CLASSNAME/g, className || 'FuckAdBlock')); | |
}, // Events | |
onEvent : function (element, type, listener, bubbles) { | |
if (window.addEventListener) { // For all major browsers, except IE 8 and earlier | |
(element || window).addEventListener(type, listener, bubbles || false); | |
} else { // For IE 8 and earlier versions | |
(element || window).attachEvent('on' + type, listener); | |
} | |
return arguments; | |
}, | |
offEvent : function (element, type, listener, bubbles) { | |
if (window.removeEventListener) { // For all major browsers, except IE 8 and earlier | |
(element || window).removeEventListener(type, listener, bubbles || false); | |
} else { // For IE 8 and earlier versions | |
(element || window).detachEvent('on' + type, listener); | |
} | |
}, | |
emitEvent : function (element, type, detail, bubbles, cancelable) { | |
var event; | |
if (window.CustomEvent) { | |
event = new window.CustomEvent(type, { | |
"detail" : detail || undefined | |
}, bubbles || false, cancelable || false); | |
} else { | |
event = document.createEvent('CustomEvent'); | |
event.initCustomEvent('on' + type, bubbles || false, cancelable || false, { | |
"detail" : detail || undefined | |
}); | |
} | |
(element || window).dispatchEvent(event); | |
}, | |
detected : function (name) { | |
if (Aak.opts.debug && Aak.opts.logDetected) { | |
Aak.emitEvent(window, 'detected', name); | |
} | |
}, | |
ready : function (callback) { | |
Aak.onEvent(window, 'load', callback); | |
}, | |
player : function () { | |
var Player = function () { | |
this.target = {}; | |
this.player = {}; | |
this.name = null; | |
this.version = null; | |
this.library = null; | |
this.fallback = 'vlc'; | |
this.autoplay = Aak.opts.autoPlay; | |
this.args = null; | |
this.setup = {}; | |
this.options = { | |
build : 'embed', | |
insert : 'replace', | |
crossSetup : true | |
}; | |
this.attributes = { // flash | |
wmode : 'opaque', | |
quality : 'high', | |
bgcolor : '#000000', | |
type : 'application/x-shockwave-flash', | |
pluginspage : 'http://www.adobe.com/go/getflash', | |
allowscriptaccess : 'always', // never / always | |
allowfullscreen : true | |
}; | |
}; | |
Player.prototype = { // http://tinyurl.com/pb6fthj | |
getTargetNode : function (element) { | |
this.target.node = Aak.getElement(element); | |
this.target.html = this.target.node.outerHTML; | |
this.target.parent = this.target.node.parentNode; | |
this.target.tag = this.target.node.tagName; | |
this.attributes.id = this.attributes.name = Aak.generateID(); | |
this.attributes.height = this.target.node.height || this.target.node.clientHeight || '480px'; | |
this.attributes.width = this.target.node.width || this.target.node.clientWidth || '640px'; | |
}, | |
getMimeType : function (type) { | |
// doc: http://tinyurl.com/jrs8fgz | |
switch (type.toLowerCase()) { | |
case 'mp4': | |
return 'video/mp4'; | |
case 'webm': | |
return 'video/webm'; | |
case 'ogg': | |
case 'ogv': | |
return 'video/ogg'; | |
case 'flv': | |
return 'video/x-flv'; | |
case 'hls': | |
return 'application/x-mpegURL'; | |
case 'hds': | |
return 'application/f4m+xml'; | |
default: | |
return type; | |
} | |
}, | |
building : function (tagName) { | |
var self = this; | |
if (Aak.opts.forceVLC && this.name !== 'vlc') { | |
Aak.info('force playing with VLC'); | |
return this.vlc.apply(this, this.args); | |
} | |
switch (tagName) { | |
case 'iframe': | |
this.player.node = document.createElement('iframe'); | |
this.player.node.setAttribute('src', this.attributes.src || location.protocol + '//' + location.host + '/'); | |
if (this.attributes.srcdoc) { | |
if (this.player.node.hasAttribute("srcdoc") || 'srcdoc' in this.player.node) { | |
this.player.node.setAttribute('srcdoc', this.attributes.srcdoc); | |
} else { | |
// does not work correctly with flowplayer | |
this.player.node.setAttribute('src', "data:text/html;charset=utf-8," + encodeURIComponent(this.attributes.srcdoc)); | |
} | |
} | |
this.player.node.setAttribute('width', this.setup.width); | |
this.player.node.setAttribute('height', this.setup.height); | |
this.player.node.setAttribute('style', 'height:' + this.setup.height + 'px; width:' + this.setup.width + 'px;'); | |
this.player.node.setAttribute('frameborder', 0); | |
this.player.node.setAttribute('scrolling', 'no'); | |
this.player.node.setAttribute('allowfullscreen', true); // http://tinyurl.com/oyyehab | |
// allowfullscreen webkitallowfullscreen mozallowfullscreen oallowfullscreen msallowfullscreen | |
break; | |
case 'video': | |
var attrName; | |
this.player.node = document.createElement('video'); | |
for (attrName in this.attributes) { | |
if (this.attributes.hasOwnProperty(attrName)) | |
this.player.node.setAttribute(attrName, this.attributes[attrName]); | |
} | |
if (this.attributes.autoplay) { // fix bug duplicate playing on firefox/chrome | |
this.player.node.onloadstart = function () { | |
//this.play(); | |
}; | |
} | |
this.player.node.onerror = function () { // switch to plugin player | |
setTimeout(function () { | |
self.args[0] = self.player.node; | |
self.vlcplayer.apply(self, self.args); | |
}, 5000); | |
}; | |
break; | |
default: // embed | |
this.player.node = document.createElement('embed'); | |
for (attrName in this.attributes) { | |
if (this.attributes.hasOwnProperty(attrName)) | |
this.player.node.setAttribute(attrName, this.attributes[attrName]); | |
} | |
} | |
this.player.html = this.player.node.outerHTML; | |
this.player.tag = this.player.node.tagName; | |
this.inserting(); | |
}, | |
inserting : function () { | |
switch (this.options.insert) { | |
case 'inner': | |
this.target.node.innerHTML = this.player.html; | |
break; | |
case 'append': | |
this.target.parent.replaceChild(this.player.node); | |
break; | |
default: // replace | |
this.target.parent.replaceChild(this.player.node, this.target.node); | |
} | |
if (Aak.opts.logPlayer) { | |
Aak.log('player', this); | |
} | |
return this; | |
}, | |
editing : function (elem, opts) { // review | |
Aak.hasElement(elem, function (thisElement) { | |
var obj, | |
swf, | |
value, | |
parts, | |
param, | |
attributes, | |
attrName; | |
var so = thisElement; | |
var clone = so.cloneNode(true); | |
// set attriibutes | |
if (opts.setAttribute) { | |
attributes = opts.setAttribute; | |
for (attrName in attributes) { | |
if (clone.querySelector('param[name="' + attrName + '"]')) { | |
clone.querySelector('param[name="' + attrName + '"]').value = attributes[attrName]; | |
} else if (clone.getAttribute(attrName)) { | |
clone.setAttribute(attrName, attributes[attrName]); | |
} | |
} | |
} | |
// unset attributes | |
if (opts.unsetAttributes) { | |
attributes = opts.delAttributes; | |
for (attrName in attributes) { | |
if (clone.querySelector('param[name="' + attrName + '"]')) { | |
Aak.removeElement(clone.querySelector('param[name="' + attrName + '"]')); | |
} else if (clone.getAttribute(attrName)) { | |
delete attributes[attrName]; | |
} | |
} | |
} | |
if (opts.setFlashvars || opts.unsetFlashvars) { | |
if (clone.querySelector('param[name="flashvars"]')) { | |
param = clone.querySelector('param[name="flashvars"]'); | |
value = param.value; | |
} else if (clone.getAttribute('flashvars')) { | |
value = clone.getAttribute('flashvars'); | |
} else if (clone.getAttribute('data') && clone.getAttribute('data').indexOf('?') >= 0) { | |
parts = clone.getAttribute('data').split('?', 2); | |
swf = parts.shift(); | |
value = parts.shift(); | |
} | |
obj = Aak.unserialize(value); | |
if (opts.setFlashvars) { | |
obj = Aak.setProperties(obj, opts.setFlashvars); | |
} | |
if (opts.unsetFlashvars) { | |
obj = Aak.unsetProperties(obj, opts.unsetFlashvars); | |
} | |
value = Aak.serialize(obj); | |
if (param) { | |
param.value = value; | |
} else if (swf) { | |
clone.setAttribute('data', swf + '?' + value); | |
} else { | |
clone.setAttribute('flashvars', value); | |
} | |
} | |
// replace | |
Aak.log(so, clone, obj); | |
Aak.replaceElement(so, clone); | |
}); | |
}, | |
embedding : function (id, setup, attributes, options) { | |
this.getTargetNode(id); | |
this.args = arguments; | |
this.attributes = Aak.setProperties(this.attributes, attributes || {}); | |
this.options = Aak.setProperties(this.options, options || {}); | |
this.attributes.src = setup.swf; | |
this.attributes.id = this.attributes.name = Aak.generateID(); | |
this.attributes.height = setup.height || this.attributes.height; | |
this.attributes.width = setup.width || this.attributes.width; | |
this.attributes.flashvars = Aak.serialize(setup); | |
this.attributes = Aak.unsetProperties(this.attributes, 'swf'); | |
this.building('embed'); | |
}, | |
jwplayer : function (id, setup, attributes, options) { | |
// JwPlayer 7 (flash/html5) | |
// note: problem with ssl | |
// setup: http://tinyurl.com/hhrgjap, http://tinyurl.com/gqs46tm | |
// api: https://developer.jwplayer.com/jw-player/docs/developer-guide/api/javascript_api_reference/ | |
// hls: http://tinyurl.com/pxl9scq | |
// hls-tester: http://demo.jwplayer.com/stream-tester/ | |
// rtmp-demo: https://www.scaleengine.com/jw6 | |
// iframe: http://tinyurl.com/86agg68 | |
this.getTargetNode(id); | |
this.args = arguments; | |
this.attributes = Aak.setProperties(this.attributes, attributes || {}); | |
this.options = Aak.setProperties(this.options, options || {}); | |
this.setup = setup; | |
if (this.options.crossSetup === true) { | |
this.setup = { | |
controls : true, | |
file : setup.source, | |
abouttext : Aak.name, | |
aboutlink : Aak.homeURL, | |
width : setup.width || this.attributes.width, | |
height : setup.height || this.attributes.height, | |
autostart : setup.autoplay || this.autoplay, | |
primary : 'html5', | |
preload : 'auto', | |
skin : { // Seven | Six | Five | Glow | Beelden | Vapor | Bekle | Roundster | Stormtrooper | |
name : setup.skin || "six" // default skin JWP6 | |
} | |
}; | |
if (['mp4', 'webm', 'ogg', 'ogv'].indexOf(setup.type) === -1) { | |
this.setup.primary = 'flash'; | |
} | |
if (setup.type === 'hls') { | |
this.setup.hlshtml = true; | |
} | |
} | |
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>'; | |
this.building('iframe'); | |
}, | |
videojs : function (id, setup, attributes, options) { | |
// VideoJs 5 (flash/html5) | |
// setup: http://tinyurl.com/pcgx2ob | |
// playback: http://tinyurl.com/nscztmm | |
// demo: http://jsfiddle.net/N8Zs5/18/ | |
// plugins: https://github.com/videojs/video.js/wiki/Plugins | |
this.getTargetNode(id); | |
this.args = arguments; | |
this.attributes = Aak.setProperties(this.attributes, attributes || {}); | |
this.options = Aak.setProperties(this.options, options || {}); | |
this.setup = setup; | |
if (this.options.crossSetup === true) { | |
this.setup = { | |
controls : true, | |
preload : 'auto', | |
width : setup.width || this.attributes.width, | |
height : setup.height || this.attributes.height, | |
techOrder : ["html5", "flash"], | |
autoplay : setup.autoplay || this.autoplay, | |
sources : [{ | |
type : this.getMimeType(setup.type), | |
src : setup.source | |
} | |
] | |
}; | |
/* don't work | |
if (setup.type === 'hls') { | |
techOrder : ["flash", "html5"], | |
this.setup.flash = { | |
//swf : "//reeksite.com/public/swf/videojs-flashls.swf" | |
swf : 'http://www.flashls.org/videojs/video-js.swf' | |
}; | |
} | |
*/ | |
} | |
// | |
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>'; | |
this.building('iframe'); | |
}, | |
flowplayer : function (id, setup, attributes, options) { | |
// FlowPlayer 6 (flash) | |
// note: problem with flashplayer | |
// support: mp4, flv, f4v, m4v, mov | |
// setup: https://flowplayer.org/docs/setup.html | |
// api: https://flowplayer.org/docs/api.html | |
// demo: http://demos.flowplayer.org/basics/js-setup-autoplay.html | |
// hds: https://flowplayer.electroteque.org/httpstreaming-hds/fp6 | |
// hls: http://demos.flowplayer.org/api/hlsjs.html | |
// flv: http://demos.flowplayer.org/basics/flv.html | |
this.getTargetNode(id); | |
this.args = arguments; | |
this.attributes = Aak.setProperties(this.attributes, attributes || {}); | |
this.options = Aak.setProperties(this.options, options || {}); | |
this.setup = setup; | |
if (this.options.crossSetup === true) { | |
this.setup = { | |
width : setup.width || this.attributes.width, | |
height : setup.height || this.attributes.height, | |
autoplay : setup.autoplay || this.autoplay, | |
preload : 'auto' | |
}; | |
if (setup.type === 'hls') { | |
this.setup.swf = location.protocol + '//releases.flowplayer.org/6.0.5/flowplayerhls.swf'; | |
this.setup.engine = 'hlsjs'; | |
} else if (['mp4', 'webm', 'ogg', 'ogv'].indexOf(setup.type) === -1) { | |
this.setup.swf = location.protocol + '//releases.flowplayer.org/6.0.5/flowplayer.swf'; | |
this.setup.engine = 'flash'; | |
this.setup.type = 'video/flash'; | |
} | |
this.setup.clip = { | |
sources : [{ | |
type : this.getMimeType(this.setup.type || setup.type), | |
src : setup.source | |
} | |
] | |
}; | |
} | |
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>'; | |
this.building('iframe'); | |
}, | |
grindplayer : function (id, setup, attributes, options) { | |
// GrindPlayer 1 (flash) | |
// setup: http://osmfhls.kutu.ru/docs/grind/ | |
// support: hls, rtmp | |
this.getTargetNode(id); | |
this.args = arguments; | |
this.attributes = Aak.setProperties(this.attributes, attributes || {}); | |
this.options = Aak.setProperties(this.options, options || {}); | |
this.setup = setup; | |
if (this.options.crossSetup === true) { | |
this.setup = { | |
src : setup.source, | |
streamType : "live", | |
scaleMode : "letterbox", | |
autoPlay : setup.autoplay || this.autoplay | |
}; | |
if (setup.type === 'hls') { | |
this.setup.plugin_hls = "//reeksite.com/public/swf/flashlsOSMF.swf"; | |
} | |
if (setup.proxy === true) { | |
this.setup.src = '//www.dianshibo.com/fetch.php/' + setup.source.substring(setup.source.indexOf('//') + 2); | |
} | |
} | |
this.attributes.src = setup.swf || this.attributes.src || "//reeksite.com/public/swf/GrindPlayer.swf"; | |
this.attributes.height = setup.height || this.attributes.height; | |
this.attributes.width = setup.width || this.attributes.width; | |
this.attributes.flashvars = Aak.serialize(this.setup); | |
this.building('embed'); | |
}, | |
vlc : function (id, setup, attributes, options) { | |
// VLC Web Plugin (plugin) | |
// doc: http://tinyurl.com/omlzp39 | |
// plugins: about:plugins | |
// chrome://flags/#enable-npapi | |
// https://www.chromium.org/developers/npapi-deprecation | |
// 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. | |
this.name = 'vlc'; | |
this.getTargetNode(id); | |
this.args = arguments; | |
this.attributes = Aak.setProperties(this.attributes, attributes || {}); | |
this.options = Aak.setProperties(this.options, options || {}); | |
this.setup = setup; | |
if (this.options.crossSetup === true) { | |
this.attributes.src = setup.source; | |
this.attributes.height = setup.height || this.attributes.height; | |
this.attributes.width = setup.width || this.attributes.width; | |
this.attributes.controls = true; | |
if (setup.autoplay || this.autoplay) { | |
this.attributes.autoplay = true; | |
} | |
} | |
this.attributes.type = "application/x-vlc-plugin"; | |
this.attributes.pluginspage = "http://www.videolan.org"; | |
this.building('embed'); | |
}, | |
html5 : function (id, setup, attributes, options) { | |
// Video Tag (html5) | |
// basics: https://html5rocks.com/en/tutorials/video/basics/ | |
// tag: http://www.w3schools.com/tags/tag_video.asp | |
// support: mp4, webm, ogg | |
// test: http://www.quirksmode.org/html5/tests/video.html | |
this.options = Aak.setProperties(this.options, options || {}); | |
this.getTargetNode(id); | |
this.args = arguments; | |
this.attributes = Aak.setProperties({}, setup || {}); | |
this.attributes.src = setup.source; | |
this.attributes.id = this.attributes.name = Aak.generateID(); | |
this.attributes.height = this.attributes.height || this.target.node.clientHeight || "100%"; | |
this.attributes.width = this.attributes.width || this.target.node.clientWidth || "100%"; | |
this.attributes.type = this.getMimeType(this.attributes.type); | |
this.attributes.controls = 'controls'; | |
this.attributes.preload = 'none'; | |
if (this.attributes.autoplay || this.autoplay) { | |
this.attributes.autoplay = 'autoplay'; | |
} | |
this.attributes.style = 'display: block; margin:0 auto;'; | |
this.attributes = Aak.unsetProperties(this.attributes, 'source'); | |
this.building('video'); | |
} | |
}; | |
return new Player(); | |
}, | |
rules : { | |
// -------------------------------------------------------------------------------------------- | |
// Anti-Adblock Killer | |
// -------------------------------------------------------------------------------------------- | |
settings : { | |
host : ['localhost', 'reek.github.io', 'reeksite.com'], | |
onEnd : function () { | |
if (/\/anti-adblock-killer(-pages)?\/$/.test(location.pathname)) { | |
var settingsBox = Aak.getElement('#aak-settings-box'); | |
var settingsNotice = Aak.getElement('#aak-settings-notice'); | |
if (!Aak.useGM) { | |
settingsNotice.querySelector('div').innerHTML = 'In native mode, you must edit the options manually: <a href="' + Aak.nativeURL + '">See</a>'; | |
} else if (settingsBox && settingsNotice) { | |
settingsNotice.style.display = 'none'; | |
settingsBox.style.display = 'block'; | |
Aak.info('GM storage:', Aak.getValue()); | |
Aak.info('GM options:', Aak.opts); | |
Aak.info('GM api:', Aak.useGM && Aak.apiGM()); | |
// user config | |
Aak.createElement({ | |
tag : 'div', | |
html : 'Version: ' + Aak.getVersion() + ' <br>AakScript: true <br>AakList: ' + (!Aak.getElement('#k2Uw7isHrMm5JXP1Vwdxc567ZKc1aZ4I')) + ' <br>Browser: ' + Aak.getBrowser() + ' <br>ScriptManager: ' + Aak.getScriptManager(), | |
append : '#aak-settings-config' | |
}); | |
// create options | |
for (var optName in Aak.options) { | |
if (Aak.options.hasOwnProperty(optName)) { | |
var opt = Aak.options[optName]; | |
var checked = Aak.opts[optName] === true ? "checked" : ''; | |
Aak.createElement({ | |
tag : 'div', | |
html : '<input id="' + optName + '" class="css-checkbox" ' + checked + ' type="' + opt.type + '"/><label for="' + optName + '" title="' + opt.info + '" class="css-label">' + opt.label + '</label>', | |
append : '#aak-settings-' + opt.group | |
}); | |
} | |
} | |
// save options | |
Aak.onEvent(Aak.getElement("#aak-settings-save"), "click", function () { | |
var elems = document.querySelectorAll('.css-checkbox'); | |
for (var i = 0; i < elems.length; i++) { | |
var elem = elems[i]; | |
if (elem.checked) { | |
Aak.setValue(elem.id, true); | |
} else { | |
Aak.setValue(elem.id, false); | |
} | |
} | |
window.alert('Saved !'); | |
}); | |
// Clear GM storage | |
Aak.addCommands({ | |
caption : 'Clear GM storage', | |
execute : function () { | |
Aak.deleteValue(); | |
window.alert('Cleared !'); | |
} | |
}); | |
} | |
} | |
} | |
}, | |
userscripts_domains : { // Redirect to Github | |
host : ['userscripts.org', 'userscripts.org:8080', 'userscripts-mirror.org'], | |
onStart : function () { | |
if (/155840$/.test(location.pathname)) { | |
Aak.go(Aak.homeURL); | |
} | |
} | |
}, | |
openuserjs_org : { | |
host : ['openuserjs.org'], | |
onIdle : function () { | |
var element = Aak.getElement('a[href$="/issues"]'); | |
if (/Anti-Adblock_Killer_Reek/.test(location.pathname) && element) { | |
Aak.confirmReport(element); | |
} | |
} | |
}, | |
greasyfork_org : { | |
host : ['greasyfork.org'], | |
onIdle : function () { | |
var element = Aak.getElement('a[href$="/feedback"]'); | |
if (/-anti-adblock-killer-reek/.test(location.pathname) && element) { | |
Aak.confirmReport(element); | |
} | |
} | |
}, | |
monkeyguts_com : { | |
host : ['monkeyguts.com'], | |
onIdle : function () { | |
var element = Aak.getElement('a[href*="code.php?nav=forum"]'); | |
if (/monkeyguts.com\/code.php\?id=351/.test(location.href) && element) { | |
Aak.confirmReport(element); | |
} | |
} | |
}, | |
// -------------------------------------------------------------------------------------------- | |
// Specific | |
// -------------------------------------------------------------------------------------------- | |
blogspot : { | |
// No Country Redirect (NCR) | |
// Prevent Blogger from Redirecting to Country-Specific Domains | |
// doc: http://tinyurl.com/7rm34jo | |
// issue: https://greasyfork.org/fr/forum/discussion/5953 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/490 | |
// test: http://tinyurl.com/nomcxkc | |
host : ['.blogspot.'], | |
onStart : function () { | |
if (Aak.isTopframe) { // fix rediretion loop | |
var blog = location.host.replace('www.', '').split("."); | |
if (blog[blog.length - 1] != "com") { | |
var path = location.href.split("/").slice(3).join('/'); | |
Aak.go("http://" + blog[0] + ".blogspot.com/ncr/" + path); | |
} | |
} | |
} | |
}, | |
blogspot_knowlet3389 : { | |
// note: also added abp rule | |
// issue: https://github.com/reek/anti-adblock-killer/issues/83 | |
// source: http://pastebin.com/A3mCXQ5i | |
host : ['knowlet3389.blogspot.'], | |
onStart : function () { | |
Aak.setLocal('noad', false); | |
Aak.addStyle("#gAds { height: 17px; } #gAd2 { height: 17px; }"); | |
} | |
}, | |
uptobox_uptostream : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/351 | |
host : ['uptobox.com', 'uptostream.com'], | |
onStart : function () { | |
// Old solution [deprecated] | |
var id = location.pathname.match(/[0-9a-z]{12}/); | |
if (id !== null) { | |
Aak.addStyle("#" + id[0] + " { height: 12px; }"); | |
} | |
// New 12.05.2014 | |
// + abp rule (alternative solution) | |
Aak.addStyle("#adblocktrap { height: 12px; }"); | |
}, | |
onIdle : function () { | |
// remove ads | |
Aak.removeElement('*[src^="http://ads.uptobox.com/"],*[href^="http://ads.uptobox.com/"]'); | |
} | |
}, | |
anisubsia_com : { | |
host : ['anisubsia.com'], | |
onStart : function () { | |
// + abp rule #@#.adsantilok | |
Aak.addStyle(".adsantilok { height: 5px; }"); | |
}, | |
onIdle : function () { | |
Aak.uw.jAntiBlock = function () {}; | |
Aak.uw.CekBlok = function () {}; | |
} | |
}, | |
freegameserverhost_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1512 | |
host : ['freegameserverhost.com'], | |
onStart : function () { | |
Aak.addStyle("#fab13 { height: 11px; }"); | |
} | |
}, | |
elahmad_com : { | |
host : ['elahmad.com'], | |
onStart : function () { | |
Aak.addStyle("#adblock { height: 1px; }"); | |
} | |
}, | |
mrtzcmp3_net : { | |
host : ['mrtzcmp3.net'], | |
onStart : function () { | |
Aak.addStyle(".rtm_ad { height: 1px; }"); | |
} | |
}, | |
height_myTestAd : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1241 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/983 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/291 | |
host : ['bknime.com', 'go4up.com', 'debrido.com'], | |
onStart : function () { | |
Aak.addStyle(".myTestAd { height: 1px; }"); | |
} | |
}, | |
debridfast_network : { | |
// issue: https://greasyfork.org/en/forum/discussion/9406 | |
// issue: https://greasyfork.org/en/forum/discussion/7013 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1272 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/769 | |
host : ['debridfast.com', 'getdebrid.com', 'debrid.us', 'leecher.us'], | |
onStart : function () { | |
Aak.addStyle(".myTestAd, .my24Ad, .nabil { height: 1px; }"); | |
}, | |
onIdle : function () { | |
document.querySelector('#simpleAd').innerHTML = '<p style="display:none;">debridfast.com</p>'; | |
} | |
}, | |
bg_gledai_tv : { | |
host : ['bg-gledai.tv'], | |
onStart : function () { | |
Aak.addStyle(".myAd { height: 1px; }"); | |
} | |
}, | |
thepcspy_com : { // http://thepcspy.com/read/how_to_block_adblock/ | |
host : ['thepcspy.com'], | |
onStart : function () { | |
Aak.addStyle(".myTestAd { height: 1px; }"); | |
Aak.addStyle(".blocked { display: none; }"); | |
}, | |
onIdle : function () { | |
Aak.removeElement('.blocked'); | |
} | |
}, | |
vg_e24_no : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/292 | |
host : ['vg.no', 'e24.no'], | |
onStart : function () { | |
// Add this rule, because EasyList allow all hidden elements. | |
Aak.addStyle(".ad { display: none; }"); | |
} | |
}, | |
automobile_sportive_com : { | |
host : ['automobile-sportive.com'], | |
onStart : function () { | |
Aak.addStyle(".myTestAd { height: 51px; display: none; }"); | |
} | |
}, | |
snsw_us : { | |
host : ['snsw.us'], | |
onStart : function () { | |
Aak.addStyle("#ad_1 { height: 1px; }"); | |
} | |
}, | |
urlchecker_net : { | |
host : ['urlchecker.net'], | |
onStart : function () { | |
Aak.addStyle("#adchecker { height: 20px; }"); | |
} | |
}, | |
skiplimite_tv : { | |
host : ['skiplimite.tv'], | |
onStart : function () { | |
Aak.addStyle("div.addthis_native_toolbox + div[id] { height: 12px; }"); | |
} | |
}, | |
filecore_co_nz : { | |
host : ['filecore.co.nz'], | |
onStart : function () { | |
Aak.addStyle(".adsense { height: 5px; }"); | |
} | |
}, | |
thomas_n_ruth_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1111 | |
// source: http://pastebin.com/fu7vkUA1 | |
host : ['thomas-n-ruth.com'], | |
onStart : function () { | |
Aak.addStyle(".Google { height: 5px; }"); | |
} | |
}, | |
interfans_org : { | |
// test: http://www.interfans.org/forum/ | |
host : ['interfans.org'], | |
onStart : function () { | |
Aak.addStyle(".ad_global_header { height: 1px; display: none; }"); | |
} | |
}, | |
maxdebrideur_com : { | |
host : ['maxdebrideur.com'], | |
onStart : function () { | |
Aak.addStyle(".clear + div[id] { height: 12px; }"); | |
} | |
}, | |
topzone_it : { | |
host : ['topzone.lt'], | |
onStart : function () { | |
Aak.addStyle(".forumAd { height: 1px; display: none; }"); | |
} | |
}, | |
nana10_co_il : { | |
host : ['.nana10.'], | |
onStart : function () { | |
Aak.addStyle("#advert-tracker { height: 1px; }"); | |
} | |
}, | |
plej_tv : { | |
host : ['plej.tv'], | |
onStart : function () { | |
Aak.addStyle(".advert_box { height: 1px; }"); | |
} | |
}, | |
mangamint_com : { | |
// note: added rule to allow ".ad728" | |
// issue: https://greasyfork.org/id/forum/discussion/8524 | |
host : ['mangamint.com'], | |
onStart : function () { | |
Aak.addStyle(".ad728 { height: 31px; }"); | |
} | |
}, | |
debrideurstream_fr : { | |
host : ['debrideurstream.fr'], | |
onStart : function () { | |
Aak.addStyle("#content div[id][align=center] { height: 12px; }"); | |
} | |
}, | |
preemlinks_com : { | |
host : ['preemlinks.com'], | |
onStart : function () { | |
Aak.addStyle("#divads { height: 1px; }"); | |
} | |
}, | |
hentai_to : { | |
host : ['hentai.to'], | |
onStart : function () { | |
Aak.addStyle("#hentaito123 { height: 11px; }"); | |
} | |
}, | |
prototurk_com : { | |
host : ['prototurk.com'], | |
onStart : function () { | |
Aak.addStyle("#reklam { height: 1px; }"); | |
} | |
}, | |
mufa_de : { | |
host : ['mufa.de'], | |
onStart : function () { | |
Aak.addStyle("#leaderboard { height: 5px; }"); | |
Aak.addStyle("#large-rectangle { height: 5px; }"); | |
Aak.addStyle("#ad-header-468x60 { height: 5px; }"); | |
} | |
}, | |
watcharab_com : { | |
host : ['watcharab.com'], | |
onStart : function () { | |
// + adp rule watcharab.com#@##adblock | |
Aak.addStyle("#adblock { height: 5px; }"); | |
} | |
}, | |
freedomip_com : { | |
host : ['freedom-ip.com'], | |
onStart : function () { | |
Aak.addStyle(".pub_vertical ins, .pub_vertical div { height: 11px; }"); | |
} | |
}, | |
wakanim_tv : { | |
host : ['wakanim.tv'], | |
onStart : function () { | |
Aak.addStyle("#detector { display: none; }"); | |
Aak.addStyle("#nopub { display: block; }"); | |
} | |
}, | |
simply_debrid_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/332 | |
// source: http://pastebin.com/b7MAYXs4 | |
host : ['simply-debrid.com'], | |
onStart : function () { | |
Aak.uw.adsbygoogle = {}; | |
Aak.uw.adsbygoogle.loaded = true; | |
} | |
}, | |
manga9_com : { | |
host : ['manga9.com', 'mangabee.co'], | |
onStart : function () { | |
Aak.addStyle(".adblock { height: 31px; }"); | |
} | |
}, | |
onemanga2_com : { | |
host : ['onemanga2.com'], | |
onStart : function () { | |
Aak.addStyle(".afs_ads { height: 5px; }"); | |
} | |
}, | |
mangabird_com : { | |
host : ['mangabird.com'], | |
onStart : function () { | |
Aak.addStyle(".afs_ads { height: 5px; }"); | |
} | |
}, | |
kodilive_eu : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1528 | |
// source: http://pastebin.com/ZxvXKqtc | |
host : ['kodilive.eu'], | |
onStart : function () { | |
Aak.addStyle(".Ad { height: 5px; }"); | |
} | |
}, | |
backin_net : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=backin.net | |
host : ['backin.net'], | |
onStart : function () { | |
Aak.addStyle("#divad { height: 31px; }"); | |
} | |
}, | |
mobile_tracker_free_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1082 | |
host : ['mobile-tracker-free.com'], | |
onStart : function () { | |
Aak.addStyle("#myAds { height: 1px; }"); | |
} | |
}, | |
workupload_com : { | |
// note: obfuscated | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1334 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1290 | |
// source: http://pastebin.com/CPzd2Swx | |
host : ['workupload.com'], | |
onAlways : function () { | |
Aak.addStyle(".adBlock, .adsbygoogle, #sad { height: 11px; }"); | |
} | |
}, | |
today_in : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=intoday.in | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=businesstoday.in | |
// source: http://pastebin.com/gz539G7m | |
host : ["intoday.in", "businesstoday.in"], | |
onStart : function() { | |
Aak.addStyle('#adbocker_alt { display: none; }'); | |
Aak.uw.openPopup = function(){}; | |
} | |
}, | |
jc_mp_com : { | |
// by: Giwayume | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1597 | |
host : ["jc-mp.com"], | |
onStart : function() { | |
Aak.addStyle('.adsense {width: 1px; height: 1px; visibility: hidden; display: block; position: absolute;}'); | |
} | |
}, | |
mariage_franco_marocain_net : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=mariage-franco-marocain.net | |
host : ["mariage-franco-marocain.net"], | |
onStart : function() { | |
Aak.addStyle('#my_ad_div {height: 1px;}'); | |
} | |
}, | |
happy_hack_ru : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=happy-hack.ru | |
host : ['happy-hack.ru'], | |
onStart : function () { | |
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;}"); | |
} | |
}, | |
forbes_com : { | |
// by: Giwayume | |
// issue: https://github.com/reek/anti-adblock-killer/issues/865 | |
host : ['forbes.com'], | |
onStart : function () { | |
if (window.location.pathname.indexOf('/welcome') > -1) { | |
Aak.setCookie('welcomeAd', 'true', 86400000, '/'); | |
Aak.setCookie('dailyWelcomeCookie', 'true', 86400000, '/'); | |
window.location = Aak.getCookie('toUrl') || 'http://www.forbes.com/'; | |
} | |
} | |
}, | |
bait_adsbygoogle : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/547 | |
host : ['bitcoinaliens.com'], | |
onStart : function () { | |
Aak.addBaitElement('ins.adsbygoogle'); | |
} | |
}, | |
bait_tester : { | |
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'], | |
onStart : function () { | |
Aak.addBaitElement('div#tester'); | |
} | |
}, | |
bait_add : { | |
host : ['filecom.net', 'upshare.org', 'skippyfile.com', 'mwfiles.net', 'up-flow.org'], | |
onStart : function () { | |
Aak.addBaitElement('div#add'); | |
} | |
}, | |
bait_adpbtest : { | |
host : ['leaguesecretary.com', 'teknogods.com', 'hellsmedia.com'], | |
onStart : function () { | |
Aak.addBaitElement('div#adpbtest'); | |
} | |
}, | |
bait_adtester : { | |
host : ['freesportsbet.com', 'sportsplays.com'], | |
onStart : function () { | |
Aak.addBaitElement('div#ad-tester'); | |
} | |
}, | |
tgo_tv_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/303 | |
host : ['tgo-tv.com'], | |
onStart : function () { | |
Aak.addStyle("#adb, #bannerad1, .load_stream { display: none; }"); | |
Aak.addBaitElement('div#tester'); | |
}, | |
onEnd : function () { | |
Aak.uw.threshold = 1000; | |
Aak.removeElement('.chat_frame'); // bug reload iframe | |
} | |
}, | |
freegamehosting_nl : { | |
host : ['freegamehosting.nl'], | |
onStart : function () { | |
Aak.addBaitElement('div#adtest'); | |
} | |
}, | |
theweatherspace_com : { | |
host : ['theweatherspace.com'], | |
onStart : function () { | |
Aak.addBaitElement('div#ab-bl-advertisement'); | |
} | |
}, | |
cleodesktop_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/711 | |
host : ['cleodesktop.com'], | |
onStart : function () { | |
Aak.addBaitElement('div#myTestAd'); | |
} | |
}, | |
imageraider_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/826 | |
host : ['imageraider.com'], | |
onStart : function () { | |
Aak.addBaitElement('div#myGContainer'); | |
} | |
}, | |
voici_fr : { | |
// issue: https://greasyfork.org/fr/forum/discussion/10093 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/826 | |
// source: http://pastebin.com/zEVQHTiD | |
host : ['voici.fr', 'programme-tv.net'], | |
onStart : function () { | |
Aak.addBaitElement('div#sas_script2'); | |
} | |
}, | |
mil_ink : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1652 | |
// source: http://pastebin.com/474NZzPJ | |
host : ['mil.ink'], | |
onStart : function () { | |
Aak.addBaitElement('div#ads_div'); | |
} | |
}, | |
cubeupload_com : { | |
// issue: https://greasyfork.org/en/forum/discussion/5919 | |
host : ['cubeupload.com'], | |
onStart : function () { | |
Aak.createElement({ | |
tag : 'iframe', | |
name : 'iframe', | |
src : 'about:blank', | |
style : 'display:none;', | |
append : document.documentElement | |
}); | |
} | |
}, | |
stream4free_eu : { | |
host : ['stream4free.eu'], | |
onStart : function () { | |
// +abp alt solution | |
Aak.addBaitElement('div#jpayday'); | |
Aak.uw.jpayday_alert = 1; | |
} | |
}, | |
_3dnews_ru : { | |
// issue: https://greasyfork.org/ru/forum/discussion/5750 | |
host : ['3dnews.ru'], | |
onStart : function () { | |
Aak.setCookie('adblockwarn', 1); | |
Aak.addStyle("#earAds { width: 401px; }"); | |
Aak.addBaitElement('div#earAds'); | |
Aak.uw.__AT_detected = true; | |
} | |
}, | |
_3dsthem_es : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=3dsthem | |
host : ['3dsthem.es'], | |
onStart : function () { | |
//Aak.addScript(function () {}); | |
}, | |
onBeforeScript : function () { | |
/* | |
return [{ | |
contains : 'main.js', | |
external : true, | |
override : '//pastebin.com/raw/2yGRPhRZ' | |
} | |
]; | |
*/ | |
} | |
}, | |
_8muses_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=8muses | |
// issue: https://greasyfork.org/forum/discussion/8515 | |
// issue: https://greasyfork.org/en/forum/discussion/6407 | |
// source: http://pastebin.com/bMNDxecs | |
host : ['8muses.com'], | |
onBeforeScript : function () { | |
return [{ | |
contains : "typeof exo", | |
external : false, | |
remove : true | |
} | |
]; | |
} | |
}, | |
happytrips_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=happytrips | |
// source: http://pastebin.com/EWSEbnvv | |
host : ['happytrips.com'], | |
onStart : function () { | |
Aak.setReadOnly('canRun', true); | |
} | |
}, | |
lg_firmware_rom_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=lg-firmware-rom.com | |
host : ['lg-firmware-rom.com'], | |
onStart : function () { | |
Aak.setReadOnly('killads', true); | |
} | |
}, | |
mid_day_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=mid-day.com | |
host : ['mid-day.com'], | |
onStart : function () { | |
Aak.setReadOnly('canRun', true); | |
} | |
}, | |
badtv_network : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=badtv.it | |
host : ['badtv.it', 'badtaste.it', 'badgames.it', 'badcomics.it'], | |
onStart : function () { | |
Aak.setCookie('adBlockChecked', 'disattivo'); | |
} | |
}, | |
independent_co_uk : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=independent.co.uk | |
host : ['independent.co.uk'], | |
onStart : function () { | |
Aak.setCookie('adblock_detected', 'ignored'); | |
} | |
}, | |
esmas_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=esmas.com | |
host : ['esmas.com'], | |
onStart : function () { | |
Aak.setReadOnly('opened_adbblock', false); | |
} | |
}, | |
pinoy1tv_network : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=pinoy1tv | |
host : ['pinoy1tv.'], | |
onStart : function () { | |
Aak.setReadOnly('allowads', 1); | |
} | |
}, | |
ewallstreeter_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=ewallstreeter.com | |
host : ['ewallstreeter.com'], | |
onStart : function () { | |
Aak.setReadOnly('OAS_rdl', 1); | |
} | |
}, | |
business_standard_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=business-standard.com | |
host : ['business-standard.com'], | |
onStart : function () { | |
Aak.setReadOnly('adsLoaded', 1); | |
Aak.setCookie('_pw', 't'); | |
} | |
}, | |
express_network : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=financialexpress.com | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=indianexpress.com | |
host : ['financialexpress.com', 'indianexpress.com'], | |
onStart : function () { | |
Aak.setReadOnly('RunAds', 1); | |
} | |
}, | |
indiatimes_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=indiatimes | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=malayalam.samayam.com | |
// test: http://tinyurl.com/zxusvyf, | |
host : ['indiatimes.com', 'samayam.com', 'bangaloremirror.com'], | |
onBeforeScript : function () { | |
return [{ | |
contains : '\\\\x61\\\\x64\\\\x62', | |
external : false, | |
remove : true | |
}, { | |
contains : 'function initBlock', | |
external : false, | |
remove : true | |
} | |
]; | |
} | |
}, | |
thechive_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1453 | |
// source: http://pastebin.com/TdpPyrbb | |
host : ['thechive.com'], | |
onStart : function () { | |
Aak.addScript(function () { | |
Object.defineProperties(window, { | |
stephaneDetector : { | |
value : { | |
hook : function (cb) { | |
cb(false); | |
}, | |
init : function () {}, | |
broadcastResult : function () {} | |
}, | |
writable : false | |
} | |
}); | |
}); | |
} | |
}, | |
richonrails_com : { | |
// by: Giwayume | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1447 | |
// source: http://pastebin.com/Ewfwg8BG | |
host : ['richonrails.com'], | |
onIdle : function () { | |
Aak.addScript(function () { | |
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>"'; | |
$.ajax({ | |
url : $(".article-content").data("url"), | |
dataType : "script", | |
method : "post", | |
data : { | |
html : adsByGoogleHtml | |
}, | |
success : function (result) { | |
var exec = result.replace("$('.article-content')", "$('.article-content-2')"); | |
new Function(exec)(); | |
} | |
}); | |
$(".article-content").after('<div class="article-content-2"></div>').remove(); | |
}); | |
} | |
}, | |
rmprepusb_com : { | |
host : ['rmprepusb.com'], | |
onStart : function () { | |
Aak.setCookie('jot_viewer', 3); | |
} | |
}, | |
neodrive_co : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1001 | |
host : ['neodrive.co'], | |
onAlways : function () { | |
// Prevent popunder | |
Aak.setCookie('KifPopCnt', 1, null, '/embed/'); | |
} | |
}, | |
hentaihaven_org : { | |
// issue: https://github.com/gorhill/uBlock/issues/1340 | |
host : ['hentaihaven.org'], | |
onAlways : function () { | |
// Prevent popunder | |
Aak.setCookie('hh_ppndr1', 1); | |
Aak.setCookie('hh_ppndr2', 1); | |
} | |
}, | |
primeshare_tv : { | |
host : ['primeshare.tv'], | |
onStart : function () { | |
Aak.addBaitElement('div#adblock'); | |
} | |
}, | |
debridnet_and_livedebrid : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=debridnet | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=livedebrid | |
host : ['debridnet.com', 'livedebrid.com'], | |
onStart : function () { | |
Aak.addStyle(".myTestAd2 { height: 5px; }"); | |
Aak.addBaitElement('div.myTestAd2'); | |
} | |
}, | |
bluesatoshi_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/873 | |
host : ['bluesatoshi.com'], | |
onStart : function () { | |
Aak.addStyle("#test { height: 280px; }"); | |
Aak.addBaitElement('div#test'); | |
} | |
}, | |
razercrypt_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/870 | |
host : ['razercrypt.com'], | |
onStart : function () { | |
Aak.addStyle("#test { height: 250px; }"); | |
Aak.addBaitElement('div#test'); | |
} | |
}, | |
satoshiempire_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/872 | |
host : ['satoshiempire.com'], | |
onStart : function () { | |
Aak.addStyle("#test { height: 250px; }"); | |
Aak.addBaitElement('div#test'); | |
} | |
}, | |
oneadfaucet_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/871 | |
host : ['oneadfaucet.com'], | |
onStart : function () { | |
Aak.addStyle("#test { height: 250px; }"); | |
Aak.addBaitElement('div#test'); | |
} | |
}, | |
jkanime_net : { | |
host : ['jkanime.net'], | |
// @@||jkanime.net/assets/js/advertisement2.js | |
onStart : function () { | |
Aak.addBaitElement('div#reco'); | |
} | |
}, | |
_720pmkv_com : { | |
host : ['720pmkv.com'], | |
onStart : function () { | |
Aak.addBaitElement('div#advert'); | |
} | |
}, | |
paidverts_com : { | |
host : ['paidverts.com'], | |
onStart : function () { | |
Aak.addBaitElement('div.afs_ads'); | |
} | |
}, | |
italiatv_org : { | |
host : ['italiatv.org'], | |
onStart : function () { | |
Aak.addBaitElement('div#fab13'); | |
} | |
}, | |
chrissmoove_com : { | |
host : ['chrissmoove.com'], | |
onStart : function () { | |
//Aak.addBaitElement('div#adserver'); | |
} | |
}, | |
eventhubs_com : { | |
host : ['eventhubs.com'], | |
onStart : function () { | |
Aak.addBaitElement('div#blahyblaci1'); | |
} | |
}, | |
superanimes_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1295 | |
// source: http://pastebin.com/FDPAKjTQ | |
host : ['superanimes.com'], | |
onStart : function () { | |
Aak.addBaitElement('div#bannerLoja'); | |
} | |
}, | |
forum_pac_rom_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/243 | |
host : ['forum.pac-rom.com'], | |
onStart : function () { | |
Aak.addBaitElement('div.banner_ads'); | |
} | |
}, | |
litv_tv : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1299 | |
// source: http://pastebin.com/zcddvTuC | |
host : ['litv.tv'], | |
onStart : function () { | |
Aak.addBaitElement('div.player_mask'); | |
} | |
}, | |
leveldown_fr : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/595 | |
host : ['leveldown.fr'], | |
onStart : function () { | |
Aak.addBaitElement('div#adblock'); | |
Aak.addBaitElement('div#adblocktest'); | |
} | |
}, | |
globeslot_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/924 | |
host : ['globeslot.com'], | |
onStart : function () { | |
Aak.addBaitElement('div#add'); | |
Aak.addBaitElement('div#add1'); | |
} | |
}, | |
antennesport_com : { | |
host : ['antennesport.com', 'serverhd.eu'], | |
onIdle : function () { // for antennesport | |
// Remove Pub | |
Aak.removeElement("#pub .pubclose"); | |
// Redirect to Player | |
Aak.setElement('#pub .embed iframe', { | |
src : '/embed/embed.php' | |
}); | |
} | |
}, | |
disableAlertbox : { | |
// issue: https://greasyfork.org/en/forum/discussion/8611 | |
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'], | |
onAlways : function () { | |
Aak.uw.alert = function () {}; | |
} | |
}, | |
generatupremium_biz : { | |
host : ['generatupremium.biz'], | |
onStart : function () { | |
// Disable Confirm Box | |
//Aak.uw.confirm = function (){}; | |
Aak.setCookie('genera', false); | |
} | |
}, | |
newstatesman_com : { | |
host : ['newstatesman.com'], | |
onStart : function () { | |
Aak.setCookie('donationPopup', 'hide'); | |
} | |
}, | |
adswizz_com : { | |
// by: Skr4tchGr3azyMonkiBallllllZzzz | |
// issue: https://github.com/reek/anti-adblock-killer/issues/809 | |
host : ['yes.fm'], | |
onStart : function () { | |
Aak.addScript(function () { | |
window.com_adswizz_synchro_initialize = function () {}; | |
}); | |
} | |
}, | |
derstandard_at : { | |
// by: Alexander255 | |
// patch: http://pastebin.com/raw.php?i=r7Q4DrfB | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=derstandard | |
host : ['derstandard.at'], | |
onStart : function () { | |
var makeISOTimestampUTC = function () { | |
var pad = function (amount, width) { | |
var padding = ""; | |
while (padding.length < width - 1 && amount < Math.pow(10, width - padding.length - 1)) { | |
padding += "0"; | |
} | |
return padding + amount.toString(); | |
}; | |
var date = new Date(); | |
return [pad(date.getUTCFullYear(), 4), "-", | |
pad(date.getUTCMonth() + 1, 2), "-", | |
pad(date.getUTCDate(), 2), "T", | |
pad(date.getUTCHours(), 2), ":", | |
pad(date.getUTCMinutes(), 2), ":", | |
pad(date.getUTCSeconds(), 2)].join(); | |
}; | |
document.cookie.split('; ').forEach(function (cookie) { | |
// Find main storage cookie | |
if (cookie.substr(0, 6) == "MGUID=") { | |
// Decompose information from main storage cookie | |
var values = {}; | |
cookie.substr(6).split("&").forEach(function (assignment) { | |
var pos = assignment.indexOf('='); | |
if (pos > -1) { | |
values[assignment.substr(0, pos)] = assignment.substr(pos + 1); | |
} | |
}); | |
// Update "first viewed" timestamp | |
values.Timestamp = makeISOTimestampUTC(); | |
// Recompose information in main storage cookie | |
cookie = "MGUID="; | |
for (var key in values) { | |
if (values.hasOwnProperty(key)) { | |
cookie += key + "=" + values[key] + "&"; | |
} | |
} | |
cookie = cookie.substr(0, (cookie.length - 1)); | |
// Update cookie | |
document.cookie = cookie; | |
} | |
}); | |
} | |
}, | |
tek_domains : { | |
// by: Reek, Alexander255 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/788 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/512 | |
host : ['tek.no', 'gamer.no', 'teknofil.no', 'insidetelecom.no', 'prisguide.no', 'diskusjon.no', 'teknojobb.no', 'akam.no', 'hardware.no', 'amobil.no'], | |
onIdle : function () { | |
/* | |
var ad_frame = document.createElement("iframe"); | |
ad_frame.name = "_frame"; | |
ad_frame.style.display = "none"; | |
document.body.appendChild(ad_frame); | |
ad_frame.contentWindow.wrappedJSObject.inFIF = true; | |
*/ | |
// fix 27.11.2015 | |
Aak.createElement({ | |
tag : 'div', | |
id : 'google_ads_iframe_', | |
html : '<p></p>', | |
append : 'body' | |
}); | |
} | |
}, | |
planetatvonlinehd_network : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1467 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/159 | |
host : ['planetatvonlinehd.blogspot.', 'planetatvonlinehd.com'], | |
onStart : function () { | |
Aak.addStyle('.adsantilok { height: 1px; }'); | |
//Aak.uw.jQAntiAdsBlock = function (){}; // don't work | |
} | |
}, | |
beta_speedtest_net : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/628 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/562 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/484 | |
// source: http://paste2.org/53ymghX1 | |
host : ['beta.speedtest.net'], | |
onAlways : function () { | |
Aak.uw.adsOoklaComReachable = true; | |
Aak.uw.scriptsLoaded = function () {}; | |
} | |
}, | |
binbucks_com : { | |
// by: Alexander255 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/545 | |
host : ['binbucks.com'], | |
onIdle : function () { | |
Aak.uw.testJuicyPay = true; | |
Aak.uw.testSensePay = true; | |
} | |
}, | |
whiskyprices_domains : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1284 | |
// source: http://pastebin.com/Epr5tREL | |
host : ['whiskyprijzen.com', 'whiskyprices.co.uk', 'whiskypreise.com', 'whiskyprix.fr'], | |
onAlways : function () { | |
Aak.uw.OA_show = true; | |
} | |
}, | |
nicoblog_org : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1184 | |
// source: http://pastebin.com/MNHpLs2V | |
host : ['nicoblog.org'], | |
onIdle : function () { | |
var el = document.querySelector('.src'); | |
el.removeAttribute('class'); | |
} | |
}, | |
di_se : { | |
// note: add this rule for chrome user | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1319 | |
// source: http://pastebin.com/9bDPQzMX | |
host : ['di.se'], | |
onIdle : function () { | |
Aak.removeElement('#header_overlay'); | |
Aak.removeElement('#message_modal'); | |
} | |
}, | |
megogo_net : { | |
// issue: PM | |
// source1: http://pastebin.com/ccHQg3hn | |
// source2: http://pastebin.com/gk0vEQHN | |
// note: two adblock check | |
host : ['megogo.net'], | |
onStart : function () { | |
Object.defineProperty(Aak.uw, "adBlock", { | |
enumerable : true, | |
writable : false, | |
value : false | |
}); | |
Object.defineProperty(Aak.uw, "showAdBlockMessage", { | |
enumerable : true, | |
writable : false, | |
value : function () {} | |
}); | |
} | |
}, | |
libertaddigital_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1642 | |
// source: http://pastebin.com/6Fzp0vrE | |
host : ['libertaddigital.com'], | |
onStart : function () { | |
Object.defineProperty(Aak.uw, "ad_already_played", { | |
enumerable : true, | |
writable : false, | |
value : true | |
}); | |
Object.defineProperty(Aak.uw, "puedeMostrarAds", { | |
enumerable : true, | |
writable : false, | |
value : true | |
}); | |
} | |
}, | |
folha_uol_com_br : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1396 | |
// source: f( ( typeof paywall_access == "undefined" || paywall_access != true ) && ( typeof folha_ads == "undefined" || folha_ads != true ) ) { | |
host : ['folha.uol.com.br'], | |
onStart : function () { | |
Object.defineProperty(Aak.uw, "paywall_access", { | |
enumerable : true, | |
writable : false, | |
value : true | |
}); | |
Object.defineProperty(Aak.uw, "folha_ads", { | |
enumerable : true, | |
writable : false, | |
value : true | |
}); | |
} | |
}, | |
gamer_com_tw : { | |
// by: mmis1000 | |
// userscript: https://greasyfork.org/en/scripts/16525 | |
// issue: : https://github.com/reek/anti-adblock-killer/issues/975 | |
host : ['gamer.com.tw'], | |
onStart : function () { | |
Object.defineProperty(Aak.uw, 'AntiAd', { | |
enumerable : true, | |
writable : false, | |
value : null | |
}); | |
} | |
}, | |
armorgames_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/845 | |
host : ['armorgames.com'], | |
onStart : function () { | |
Object.defineProperty(Aak.uw, 'ga_detect', { | |
enumerable : true, | |
writable : false, | |
value : null | |
}); | |
} | |
}, | |
mangahost_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/957 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/558 | |
// source: http://pastebin.com/GrpbJENA | |
host : ['mangahost.com'], | |
onStart : function () { | |
Object.defineProperty(Aak.uw, "testDisplay", { | |
enumerable : true, | |
writable : false, | |
value : false | |
}); | |
} | |
}, | |
videowood_tv : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1339 | |
// source: http://videowood.tv/build/assets/js/pembed-97a640f625.js | |
host : ['videowood.tv'], | |
onStart : function () { | |
Aak.uw.open = function () {}; // prevent popup | |
Aak.uw.config = {}; | |
Object.defineProperty(Aak.uw.config, "adb_remind", { | |
enumerable : true, | |
writable : false, | |
value : false | |
}); | |
} | |
}, | |
infojobs_com_br : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1339 | |
// source: http://pastebin.com/LPg6093U | |
// redirect: http://www.infojobs.com.br/nopublicity.aspx | |
host : ['infojobs.com.br'], | |
onStart : function () { | |
Aak.addScript(function () { | |
var webUI = webUI || {}; | |
webUI.Utils = webUI.Utils || {}; | |
Object.defineProperty(webUI.Utils, "StopAdBlock", { | |
enumerable : true, | |
writable : false, | |
value : function () {} | |
}); | |
}); | |
} | |
}, | |
cloudwebcopy_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/714 | |
host : ['cloudwebcopy.com'], | |
onStart : function () { | |
var setTimeoutClone = Aak.uw.setTimeout; | |
Aak.uw.setTimeout = null; | |
setTimeout(function () { | |
Aak.uw.setTimeout = setTimeoutClone; | |
}, 5000); | |
} | |
}, | |
narkive_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/569 | |
host : ['narkive.com'], | |
onAlways : function () { | |
Aak.uw.adblock_status = function () { | |
return false; | |
}; | |
} | |
}, | |
pregen_net : { | |
host : ['pregen.net'], | |
onStart : function () { | |
// skip page info | |
Aak.setCookie('pgn', 1); | |
} | |
}, | |
phys_org : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/768 | |
host : ['phys.org'], | |
onAlways : function () { | |
Aak.uw.chkAB = function () {}; | |
} | |
}, | |
onvasortir_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=onvasortir.com | |
host : ['onvasortir.com'], | |
onAlways : function () { | |
// +abp rule alt solution | |
Aak.uw.JeBloque = function () {}; | |
} | |
}, | |
fullhdzevki_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=fullhdzevki.com | |
host : ['fullhdzevki.com'], | |
onAlways : function () { | |
// +abp rule alt solution | |
Aak.uw.check = function () {}; | |
} | |
}, | |
ville_ideale_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/258 | |
// source: http://pastebin.com/16mnmeMc | |
host : ['ville-ideale.com'], | |
onAlways : function () { | |
// +abp rule alt solution | |
Aak.uw.execsp = function () {}; | |
} | |
}, | |
notre_planete_info : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/258 | |
// source: http://pastebin.com/qrS6QGGE | |
host : ['notre-planete.info'], | |
onAlways : function () { | |
// +abp rule alt solution | |
Aak.uw.pubpop = function () {}; | |
} | |
}, | |
apkmirror_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/378 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/224 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/78 | |
host : ['apkmirror.com'], | |
onAlways : function () { | |
Aak.uw.doCheck = function () {}; | |
} | |
}, | |
mtlblog_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/948 | |
// issue: https://greasyfork.org/forum/discussion/7753 | |
// source: http://pastebin.com/BFrDPM6b | |
host : ['mtlblog.com'], | |
onStart : function () { | |
Object.defineProperty(Aak.uw, 'puabs', { | |
enumerable : true, | |
value : function () {} | |
}); | |
} | |
}, | |
anizm_com : { | |
// issue: | |
host : ['anizm.com'], | |
onAlways : function () { | |
Aak.uw.stopAdBlock = {}; | |
} | |
}, | |
diarioinformacion_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1550 | |
host : ['diarioinformacion.com'], | |
onStart : function () { | |
Object.defineProperty(Aak.uw, 'pr_okvalida', { | |
enumerable : true, | |
value : true | |
}); | |
} | |
}, | |
cnbeta_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1301 | |
// source: http://pastebin.com/vXNCztwx | |
host : ['cnbeta.com'], | |
onStart : function () { | |
Object.defineProperty(Aak.uw, 'JB', { | |
enumerable : true, | |
value : function () {} | |
}); | |
} | |
}, | |
themarker_haaretz : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1292 | |
// source: http://pastebin.com/m08dkDT4 | |
host : ['themarker.com', 'haaretz.co.il'], | |
onStart : function () { | |
Object.defineProperty(Aak.uw, 'AdBlockUtil', { | |
enumerable : true, | |
value : {} | |
}); | |
} | |
}, | |
pipocas_tv : { | |
// issue: | |
host : ['pipocas.tv'], | |
onStart : function () { | |
// Also added in disableAlertbox | |
// No popup | |
Aak.setCookie('popup_user_login', 'yes'); | |
} | |
}, | |
_15min_lt : { | |
// note: regulary update script | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=15min.it | |
// source: http://pastebin.com/YWf3HTqr | |
// test: http://tinyurl.com/h6c4336 | |
host : ['15min.lt'], | |
onStart : function () { | |
Object.defineProperty(Aak.uw, 'ROUTE', { | |
enumerable : true, | |
writable : false, | |
value : '_be_reklamos' | |
}); | |
} | |
}, | |
sc2casts_com : { | |
// by: Giwayume | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1599 | |
host : ['sc2casts.com'], | |
onStart : function() { | |
Aak.addScript(function() { | |
window._gaq = { push:function() {} }; | |
Object.defineProperty(window, "showdialog", { | |
value: function() {}, | |
configurable: false, | |
writable: false | |
}); | |
Object.defineProperty(window, "showPopup2", { | |
value: function() {}, | |
configurable: false, | |
writable: false | |
}); | |
}); | |
} | |
}, | |
vgunetwork_com : { | |
// issue: | |
host : ['vgunetwork.com'], | |
onIdle : function () { | |
Aak.setCookie('stopIt', 1); | |
var close = Aak.getElement('#some_ad_block_key_close'); | |
if (close) { | |
close.click(); | |
} | |
} | |
}, | |
linkcrypt_ws : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/286 | |
// issue: https://github.com/reek/anti-adblock-killer/pull/67 | |
host : ['linkcrypt.ws'], | |
onIdle : function () { | |
Aak.setElement('#ad_cont', { | |
id : '', | |
style : 'display:block;' | |
}); | |
Aak.setElement('#container_check', { | |
style : 'display:none;' | |
}); | |
} | |
}, | |
eventosppv_me : { | |
// issue: | |
host : ['eventosppv.me'], | |
onIdle : function () { | |
Aak.removeElement('#nf37'); | |
} | |
}, | |
bolor_toli_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/552 | |
host : ['bolor-toli.com'], | |
onEnd : function () { | |
var ads = document.getElementsByClassName('banner'); | |
for (var i = 0; i < ads.length; i++) { | |
var ad = ads[i]; | |
ad.innerHTML = '<br>'; | |
ad.style.height = '1px'; | |
} | |
} | |
}, | |
vivo_sx : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/280 | |
host : ['vivo.sx'], | |
onEnd : function () { | |
var alert = Aak.getElement('#alert-throttle'); | |
if (alert) { | |
Aak.removeElement(alert); | |
} | |
var button = Aak.getElement('button#access'); | |
if (button) { | |
button.removeAttribute('id'); | |
button.removeAttribute('disabled'); | |
button.innerHTML = 'Continue to video'; | |
} | |
setTimeout(function () { | |
var input = Aak.getElement('input[name="throttle"]'); | |
if (input) { | |
Aak.removeElement(input); | |
} | |
}, 1000); | |
} | |
}, | |
luxyad_com : { // skip redirect myanimes.li | |
// issue: | |
host : ['luxyad.com'], | |
onIdle : function () { | |
if ('/Information.php' == location.pathname) { | |
var href = location.href; | |
location.href = href.substr(href.indexOf('url=') + 4, href.length); | |
} | |
} | |
}, | |
mrpiracy_domains : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1405 | |
host : ['mrpiracy.xyz', 'mrpiracy.club'], | |
onBeforeScript : function () { | |
return [{ | |
contains : 'Desativa o AdBlock para continuar', | |
external : false, | |
remove : true | |
} | |
]; | |
} | |
}, | |
dbplanet_net : { | |
// issue: PM | |
host : ['dbplanet.net'], | |
onStart : function () { | |
Aak.setCookie('newnoMoreAdsNow', 1); | |
} | |
}, | |
aidemu_fr : { | |
// issue: | |
host : ['aidemu.fr'], | |
onStart : function () { | |
Aak.setCookie('adblockPopup', true); | |
} | |
}, | |
eami_in : { | |
// issue: | |
host : ['eami.in'], | |
onAlways : function () { | |
Aak.setCookie('ad_locked', 1); | |
} | |
}, | |
bigdownloader_com : { | |
// issue: | |
host : ['bigdownloader.com'], | |
onIdle : function () { | |
Aak.removeElement('#anti_adblock'); | |
} | |
}, | |
freeskier_com : { | |
// by: Gorhill | |
// issue: https://github.com/reek/anti-adblock-killer/issues/639 | |
// note: also added list rule | |
host : ['freeskier.com'], | |
onIdle : function () { | |
var el = document.getElementById("adb-not-enabled"); | |
if (el !== null) { | |
el.style.removeProperty("display"); | |
} | |
el = document.getElementById("videoContainer"); | |
if (el !== null) { | |
el.style.removeProperty("display"); | |
} | |
} | |
}, | |
gametrailers_com : { | |
// issue: | |
host : ['gametrailers.com'], | |
onIdle : function () { | |
Aak.removeElement('#ad_blocking'); | |
} | |
}, | |
scan_onepiece_naruto_mx : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/582 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/279 | |
host : ['scan-mx.com', 'onepiece-mx.net', 'naruto-mx.net'], | |
onAlways : function () { | |
Aak.uw.ad_block_test = function () {}; | |
}, | |
onIdle : function () { | |
Aak.setElement('#yop', { | |
id : '' | |
}); | |
} | |
}, | |
// Bitcoins | |
bitcoinker_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/230 | |
host : ['bitcoinker.com'], | |
onStart : function () { | |
Aak.uw.claim = function () { | |
return true; | |
}; | |
}, | |
onIdle : function () { | |
Aak.removeElement('#E33FCCcX2fW'); | |
} | |
}, | |
moondoge_co_in : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/384 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/232 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/233 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/236 | |
host : ['moondoge.co.in', 'moonliteco.in', 'moonbit.co.in', 'bitcoinzebra.com'], | |
onIdle : function () { | |
Aak.removeElement('#AB, #E442Dv, #eCC5h'); | |
} | |
}, | |
bitcoiner_net : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/349 | |
host : ['bitcoiner.net', 'litecoiner.net'], | |
onStart : function () { | |
Aak.addBaitElement('div#tester'); | |
Aak.addBaitElement('div#ad-top'); | |
} | |
}, | |
bitcoins_nx_tc : { | |
// issue: | |
host : ['freebitcoins.nx.tc', 'getbitcoins.nx.tc'], | |
onAlways : function () { | |
Aak.uw.ad_block_test = function () { | |
return false; | |
}; | |
} | |
}, | |
freecoins4_me : { | |
// issue: | |
host : ['freecoins4.me'], | |
onAlways : function () { | |
Aak.uw.check = function () { | |
return false; | |
}; | |
} | |
}, | |
torrent_tv_ru : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/537 | |
host : ['torrent-tv.ru'], | |
onAlways : function () { | |
Aak.uw.c_Oo_Advert_Shown = true; | |
} | |
}, | |
cwtv_com : { | |
// by: Kalbasit | |
// pull: https://github.com/reek/anti-adblock-killer/pull/763 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/340 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/762 | |
host : ['cwtv.com'], | |
onAlways : function () { | |
Aak.uw.CWTVIsAdBlocking = undefined; | |
} | |
}, | |
bild_de : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=bild | |
host : ['bild.de'], | |
onBeforeScript : function () { | |
return [{ | |
contains : 'http://www.bild.de/wa/ll/bild-de/unangemeldet-42925516.bild.html', | |
external : false, | |
replace : ['javascript', 'void(0);'].join(':') | |
} | |
]; | |
} | |
}, | |
inn_co_il : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/532 | |
host : ['inn.co.il'], | |
onStart : function () { | |
Aak.addScript(function () { | |
var TRC = {}; | |
TRC.blocker = { | |
states : { | |
ABP_DETECTION_DISABLED : -2, | |
ABP_NOT_DETECTED : 0, | |
ABP_DETECTED : 1 | |
}, | |
createBlockDetectionDiv : function () { | |
return document.createElement("div"); | |
}, | |
isBlockDetectedOnDiv : function () { | |
return 0; | |
}, | |
isBlockDetectedOnClassNames : function () { | |
return 0; | |
}, | |
getBlockedState : function () { | |
return 0; | |
} | |
}; | |
}); | |
} | |
}, | |
bhaskar_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=bhaskar | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=divyabhaskar.co.in | |
host : ['bhaskar.com', 'divyabhaskar.co.in'], | |
onAlways : function () { | |
Aak.uw.openPopUpForBreakPage = function () {}; | |
Aak.uw.canABP = true; | |
Aak.uw.canRunAds = true; | |
Aak.uw.canCheckAds = true; | |
} | |
}, | |
turkanime_tv : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/446 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/139 | |
// issue: https://greasyfork.org/tr/forum/discussion/4282/ | |
host : ['turkanime.tv'], | |
onAlways : function () { | |
Aak.uw.adblockblock = function () {}; | |
Aak.uw.BlokKontrol = {}; | |
} | |
}, | |
wtfbit_ch : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/407 | |
host : ['wtfbit.ch'], | |
onAlways : function () { | |
Aak.uw.writeHTMLasJS = function () {}; | |
} | |
}, | |
aranzulla_it : { | |
// by: Robotex | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=aranzulla.it | |
// source: http://pastebin.com/yMM6YgxW | |
host : ['aranzulla.it'], | |
onStart : function() { | |
Aak.addStyle('#abt1 + STYLE + div[id][class] {display:none;}'); | |
}, | |
onBeforeScript : function () { | |
return [{ | |
contains : 'navigator.userAgent||navigator.vendor||window.opera', | |
external : false, | |
remove : true | |
} | |
]; | |
} | |
}, | |
ndtv_com : { | |
// note: canRunAds inverted value | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=ndtv.com | |
// test: http://tinyurl.com/hcfncdv | |
host : ['ndtv.com'], | |
onStart : function () { | |
Aak.setReadOnly('___p__p', 1); | |
Aak.setReadOnly('getNoTopLatestNews', function () {}); | |
} | |
}, | |
lesechos_fr : { | |
// Reek, Giwayume | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=lesechos.fr | |
// source: http://pastebin.com/CMM8WGLj | |
host : ['lesechos.fr', 'lesechos.com'], | |
onStart : function() { | |
Aak.addScript(function() { | |
Object.defineProperty(window, "checkAdBlock", { | |
value: function() {}, | |
configurable: false, | |
writable: false | |
}); | |
}); | |
}, | |
onAlways : function () { | |
Aak.uw.call_Ad = 1; | |
Aak.uw.paywall_adblock_article = function () {}; | |
} | |
}, | |
bitvisits_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/266 | |
host : ['bitvisits.com'], | |
onAlways : function () { | |
Aak.uw.blockAdblockUser = function () {}; | |
} | |
}, | |
exrapidleech_info : { | |
// by: Alexander255, Reek, Giwayume | |
// patch: http://pastebin.com/Q664diQ2 | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=exrapidleech | |
// source: http://pastebin.com/5e27syjA | |
host : ['exrapidleech.info'], | |
onStart : function () { | |
var tomorrow = new Date(); | |
tomorrow.setDate(tomorrow.getDate() + 1); | |
// prevent popup | |
Aak.setCookie('popcashpuCap', 1); | |
Aak.setCookie('popcashpu', 1); | |
Aak.setCookie('nopopatall', tomorrow.getTime().toString()); | |
Aak.setCookie('noadvtday', 0); | |
//Aak.setCookie('bv_DSKskdck_s1d', 'bvDSKskdcks1d'); | |
// hide notice | |
Aak.addStyle('div.alert.alert-danger.lead {opacity:0;}'); | |
// prevent redirect to verify page | |
Aak.setReadOnly('bdvbnr_pid', []); | |
Aak.setReadOnly('PopAds', 1); | |
Aak.addScript(function () { | |
(function () { | |
// prevent popup | |
window.open = function () {}; | |
// prevent redirect to verify page | |
var frame1 = document.createElement('iframe'); | |
frame1.src = 'http://bdfrm.bidvertiser.com/BidVertiser.dbm?pid=383865&bid=1737418&RD='; | |
frame1.id = 'bdvi'; | |
frame1.style = 'display:none'; | |
document.documentElement.appendChild(frame1); | |
})(); | |
}); | |
} | |
}, | |
vipleague_domains : { | |
// note: also killed by AakList | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=vipbox | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=vipleague | |
// source: http://pastebin.com/NERVzHzS | |
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"], | |
onStart : function () { | |
Aak.uw.iExist = true; | |
Aak.setCookie('xclsvip', 1); | |
Aak.addStyle(".vip_052x003 { height: 250px; }"); | |
Aak.addStyle(".vip_09x827 { height: 26px; }"); | |
Aak.addStyle("#overlay { display: none; }"); | |
} | |
}, | |
zoomtv_me : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=zoomtv.me | |
// source: http://pastebin.com/m4zAXGcw | |
host : ['zoomtv.me'], | |
onAlways : function () { | |
Aak.uw.iaxpEnabled = true; | |
} | |
}, | |
vg_no : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/292 | |
// +abp rule | |
host : ['vg.no', 'e24.no'], | |
onAlways : function () { | |
Aak.uw.__AB__ = function () {}; | |
} | |
}, | |
pornve_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/947 | |
// source: http://pastebin.com/7TPPkq12 | |
host : ['pornve.com'], | |
onAlways : function () { | |
Aak.uw.adxjwupdate = 1; | |
} | |
}, | |
lol_moa_tw : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1114 | |
host : ['lol.moa.tw'], | |
onIdle : function () { | |
Aak.addScript(function () { | |
var MoaObj = MoaObj || {}; | |
MoaObj.ad = MoaObj.ad || {}; | |
MoaObj.ad.hasAdblock = function () { | |
return false; | |
}; | |
MoaObj.ad.checkABP = function () { | |
return false; | |
}; | |
}); | |
} | |
}, | |
multiup_org : { | |
// by: Watilin | |
// note: alternative solution | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=multiup.org | |
host : ['multiup.org'], | |
onStart : function () { | |
Aak.setCookie('visit', 1); // prevent popup | |
Aak.setReadOnly('hi', function () {}); | |
} | |
}, | |
dailybitcoins_org : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/107 | |
host : ['dailybitcoins.org'], | |
onIdle : function () { | |
Aak.removeElement('.ad-img'); | |
} | |
}, | |
kozaczek_zeberka : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/414 | |
host : ['kozaczek.pl', 'zeberka.pl'], | |
onStart : function () { | |
Aak.setCookie('ablc', 1); | |
Aak.setCookie('cookie_policy', 1); | |
} | |
}, | |
spankwire_sites : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/887 | |
// source: http://pastebin.com/TFB1dtgb | |
host : ['spankwire.com', 'keezmovies.com', 'extremetube.com', 'mofosex.com'], | |
onStart : function () { | |
Aak.setCookie("abClosed", "true"); | |
Aak.setCookie("hide_ad_msg", "1"); | |
} | |
}, | |
youporn_network : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/887 | |
// source: http://pastebin.com/TFB1dtgb | |
host : ['youporn.com', 'youporngay.com'], | |
onStart : function () { | |
Aak.setCookie("adblock_message", "closed"); | |
} | |
}, | |
citationmachine_net : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=citationmachine.net | |
host : ['citationmachine.net'], | |
onStart : function () { | |
Aak.setCookie("sbm_cm_citations", 0); | |
} | |
}, | |
psarips_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/153 | |
host : ['psarips.com'], | |
onStart : function () { | |
Aak.addBaitElement('div#advert'); | |
} | |
}, | |
extratorrent_domains : { | |
host : ['extratorrent.cc', 'extratorrent.com'], | |
onStart : function () { | |
// prevent popup | |
// source are obfuscated in external js | |
Aak.setCookie('ppu_delay', 1); | |
Aak.setCookie('ppu_main', 1); | |
Aak.setCookie('ppu_sub', 1); | |
Aak.setCookie('ppu_show_on', 1); | |
} | |
}, | |
tny_cz : { | |
host : ['tny.cz', 'pasted.co'], | |
onStart : function () { | |
// prevent popup | |
Aak.setCookie('__.popunderCap', 1); | |
Aak.setCookie('__.popunder', 1); | |
} | |
}, | |
clubedohardware_com_br : { // two antiadblock | |
host : ['clubedohardware.com.br'], | |
onStart : function () { | |
if (Aak.contains(location.host, 'forum')) { | |
// Solution 1 | |
Aak.addStyle("#banner, script { height: 51px; }"); | |
Aak.addBaitElement('div#banner'); | |
} else { // Website | |
// Solution 1 | |
Aak.addBaitElement('div.banner_topo'); | |
} | |
}, | |
onIdle : function () { | |
if (Aak.contains(location.host, 'forum')) { | |
// Solution 2 | |
Aak.uw.addBlocking.hide(); | |
Aak.uw.addBlocking.kill(); | |
} else { // Website | |
// Solution 2 | |
document.body.id = ''; | |
Aak.removeElement('.adblock'); | |
} | |
} | |
}, | |
debrastagi_com : { | |
host : ['debrastagi.com'], | |
onIdle : function () { | |
Aak.removeElement('#stp-main'); | |
Aak.removeElement('#stp-bg'); | |
} | |
}, | |
ddlfrench_org : { | |
host : ['ddlfrench.org'], | |
onIdle : function () { | |
// Fix bug display content | |
Aak.setElement('#dle-content .d-content', { | |
'class' : '' | |
}); | |
Aak.setElement('#content', { | |
'id' : '' | |
}); | |
} | |
}, | |
megadebrid_eu : { | |
host : ['mega-debrid.eu'], | |
onEnd : function () { | |
// Activate button debrid | |
Aak.setElement('.realbutton', { | |
'onclick' : '', | |
'type' : 'submit' | |
}); | |
} | |
}, | |
slideplayer_domains : { | |
// by: Alexander255 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1333 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/515 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/296 | |
// demo: http://slideplayer.fr/slide/1304026/# | |
host : ['slideplayer.*'], | |
onEnd : function () { | |
// Disable anti-adblocker | |
Aak.uw.force_remove_ads = true; | |
// Circumvent "share to download" rule | |
Aak.addScript(function () { | |
var slide_id = window.get_current_slide_id(); | |
var slide_srv = document.getElementById("player_frame").src.split("/")[3]; | |
var time = 86400 + Math.floor(Date.now() / 1000); | |
var secret = encodeURIComponent(window.strtr(window.MD5.base64("secret_preved slideplayer never solved " + time + slide_id + ".ppt"), "+/", "- ")); | |
var url = "http://player.slideplayer.org/download/" + slide_srv + "/" + slide_id + "/" + secret + "/" + time + "/" + slide_id + ".ppt"; | |
var links = document.querySelectorAll("a.download_link"); | |
for (var i = 0; i < links.length; i++) { | |
/* Remove original "share to download" popup event listener */ | |
var events = $._data(links[i]).events.click; | |
events.splice(0, events.length); | |
/* Set normal link href instead */ | |
links[i].href = url; | |
} | |
}); | |
} | |
}, | |
bokepspot_com : { | |
host : ['bokepspot.com'], | |
onStart : function () { | |
// Hide Disclaimer | |
Aak.setCookie('hideDialog', 'hide'); | |
}, | |
onIdle : function () { | |
// Remove Disable AdBlock | |
Aak.removeElement('#tupiklan'); | |
} | |
}, | |
picload_com : { | |
host : ['picload.org'], | |
onStart : function () { | |
Aak.setCookie('pl_adblocker', false); | |
}, | |
onIdle : function () { | |
Aak.uw.ads_loaded = true; | |
Aak.uw.imageAds = false; | |
Aak.removeElement('div[oncontextmenu="return false;"]'); | |
} | |
}, | |
freezedownload_com : { | |
host : ['freezedownload.com'], | |
onIdle : function () { | |
if (/freezedownload.com\/download\//.test(location.href)) { | |
Aak.removeElement('body > div[id]'); | |
} | |
} | |
}, | |
monnsutogatya_com : { | |
// issue: PM | |
// source: http://pastebin.com/1Lw60h6k | |
host : ['monnsutogatya.com'], | |
onIdle : function () { | |
Aak.addStyle("#site-box {display:block;}"); | |
Aak.removeElement('#for-ad-blocker'); | |
} | |
}, | |
rapid8_com : { | |
host : ['rapid8.com'], | |
onIdle : function () { | |
Aak.removeElement('div.backk + #blcokMzg'); | |
Aak.removeElement('div.backk'); | |
} | |
}, | |
turkdown_com : { | |
host : ['turkdown.com'], | |
onIdle : function () { | |
// remove facebook box | |
Aak.removeElement('#duyuru'); | |
} | |
}, | |
filmovizija_domains : { | |
host : ['filmovizija.me', 'filmovizija.com', 'filmovizija.in', 'filmovizija.net'], | |
onIdle : function () { | |
/* | |
var d = new Date(); | |
var weekday = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]; | |
var n = weekday[d.getDay()]; | |
Aak.setElement('#' + n, { | |
html : '' | |
}); | |
Aak.removeElement('#' + n); | |
*/ | |
} | |
}, | |
hackintosh_zone : { | |
// by: Alexander255 | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=hackintosh.zone | |
// source: http://paste2.org/DnB9Oj4f | |
host : ['hackintosh.zone'], | |
onIdle : function () { | |
var head = document.getElementsByTagName("head")[0]; | |
// Fake Google ad frame content | |
var ad1 = document.createElement("ins"); | |
ad1.className = "adsbygoogle"; | |
ad1.appendChild(document.createTextNode("AAK")); | |
head.insertBefore(ad1, head.childNodes[0]); | |
/* | |
// Fake CleanMyMac ad frame size | |
var ad2 = document.createElement("div"); | |
ad2.id = "nycuhevgqi"; | |
Object.defineProperty(ad2.wrappedJSObject, 'clientHeight', {value: 1}); | |
head.insertBefore(ad2, head.childNodes[0]); | |
*/ | |
var elems = document.querySelectorAll('.adsensegrey'); | |
for (var i = 0; i < elems.length; i++) { | |
var node = document.createElement("img"); | |
node.src = Aak.imgBait; | |
elems[i].appendChild(node); | |
} | |
}, | |
onBeforeScript : function () { | |
return [{ | |
contains : 'disable ADBlock completely', | |
external : false, | |
remove : true | |
} | |
]; | |
} | |
}, | |
privateinsta_com : { | |
host : ['privateinsta.com'], | |
onIdle : function () { | |
// + abp rule | |
Aak.uw.dont_scroll = false; | |
Aak.removeElement("#overlay_div"); | |
Aak.removeElement("#overlay_main_div"); | |
} | |
}, | |
risikogesundheit_de : { | |
host : ['risiko-gesundheit.de'], | |
onIdle : function () { | |
setTimeout(function () { | |
window.stop(); | |
}, 5000); | |
} | |
}, | |
oneplaylist_eu_pn : { | |
host : ['oneplaylist.eu.pn'], | |
onIdle : function () { | |
// kill popunder | |
Aak.uw.makePopunder = false; | |
} | |
}, | |
onmeda_de : { | |
// note: script obfuscated line 1110 | |
// issue: https://greasyfork.org/forum/discussion/8576 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1067 | |
// source: http://pastebin.com/qf46bN3z | |
// source: http://pastebin.com/RwHyF0NL | |
host : ['onmeda.de'], | |
onAlways : function () { | |
Aak.uw.$ADP = true; | |
Aak.uw.sas_callAd = function () {}; | |
Aak.uw.sas_callAds = function () {}; | |
} | |
}, | |
turbodebrideur_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/599 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/563 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/526 | |
host : ['turbodebrideur.com'], | |
onIdle : function () { | |
Aak.createElement({ | |
tag : 'div', | |
id : 'pubdirecte', | |
html : '<img src="' + Aak.imgBait + '"/><a href="#"> </a>', | |
append : 'body' | |
}); | |
} | |
}, | |
rockfile_eu : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1256 | |
host : ['rockfile.eu'], | |
onIdle : function () { | |
Aak.createElement({ | |
tag : 'iframe', | |
src : 'about:blank', | |
style : 'visibility:hidden;', | |
append : 'body' | |
}); | |
} | |
}, | |
linkbucks_antiadblock : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/932 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/469 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/277 | |
// v3: http://pastebin.com/0gh8LMGH | |
// note: no solution, anti-adblock difficult to bypass --> http://pastebin.com/1NRq7WvZ | |
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'], | |
onStart : function () { | |
// do nothing... | |
} | |
}, | |
linkbucks_visitscript : { | |
// issue: | |
host : ['referencemega.com', 'fpabd.com', 'crackacc.com'], | |
onStart : function () { | |
// Skip visitScript when site use CloudFlare Rocket Script | |
Aak.setCookie('_lbGatePassed', true); | |
} | |
}, | |
link_tl : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=link.tl | |
// issue: https://greasyfork.org/fr/forum/discussion/8437 | |
// source: http://pastebin.com/1MkCnmL7 | |
host : ['link.tl'], | |
onStart : function () { | |
Aak.addStyle('.adblock { height:1px; }'); | |
Aak.uw.adblocker = false; | |
} | |
}, | |
wstream_video : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1382 | |
// source: http://pastebin.com/EiARVQXt | |
host : ['wstream.video'], | |
onStart : function () { | |
Aak.addStyle('#adiv { height:4px; }'); | |
} | |
}, | |
_4shared_com : { | |
host : ['4shared.com'], | |
onIdle : function () { | |
// Hide "Disable AdBlodk" messages | |
document.querySelector('body').classList.remove("jsBlockDetect"); | |
} | |
}, | |
pro_domains : { | |
host : ['pro-zik.ws', 'pro-tect.ws', 'pro-ddl.ws', 'pro-sport.ws'], | |
onStart : function () { | |
Aak.setCookie('visitedf', true); | |
Aak.setCookie('visitedh', true); | |
} | |
}, | |
comptoirhardware_com : { | |
host : ['comptoir-hardware.com'], | |
onAlways : function () { | |
Aak.uw.adblock = 'non'; | |
} | |
}, | |
bakersfield_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/657 | |
// note: also solution to AakList | |
host : ['bakersfield.com'], | |
onAlways : function () { | |
Aak.uw.AD_SLOT_RENDERED = true; | |
} | |
}, | |
ekstrabladet_dk : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=ekstrabladet | |
// source: http://pastebin.com/R029XpCr | |
host : ['ekstrabladet.dk', 'eb.dk'], | |
onAlways : function () { | |
Aak.uw.ADTECH = {}; | |
} | |
}, | |
pcgames_download_net : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1451 | |
// issue: https://greasyfork.org/forum/discussion/9328 | |
// source: http://pastebin.com/EBVZg3VB | |
host : ['pcgames-download.net'], | |
onAlways : function () { | |
Aak.setCookie('noAdblockNiceMessage', 1); | |
Aak.uw.mgCanLoad30547 = true; | |
} | |
}, | |
lachainemeteo_com : { | |
// note: also killed by AakList | |
// issue: https://github.com/reek/anti-adblock-killer/issues/590 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/245 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/215 | |
host : ['lachainemeteo.com'], | |
onAlways : function () { | |
Aak.uw.js_loaded = true; | |
} | |
}, | |
mac4ever_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/997 | |
// source: http://pastebin.com/RQnCEYK6 | |
host : ['mac4ever.com'], | |
onAlways : function () { | |
Aak.uw.coquinou = function () {}; | |
} | |
}, | |
_5278bbs_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=5278bbs.com | |
host : ['5278bbs.com'], | |
onAlways : function () { | |
Aak.uw.myaabpfun12 = function () {}; | |
} | |
}, | |
thesimsresource_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=thesimsresource.com | |
// source: http://pastebin.com/DE9rbjxY | |
host : ['thesimsresource.com'], | |
onAlways : function () { | |
Aak.uw.gadsize = true; | |
Aak.uw.iHaveLoadedAds = true; | |
} | |
}, | |
yellowbridge_com : { | |
host : ['yellowbridge.com'], | |
onAlways : function () { | |
Aak.uw.finalizePage = function () { | |
return; | |
}; | |
} | |
}, | |
game_debate_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1366 | |
// source: http://pastebin.com/UzsiX0FK | |
host : ['game-debate.com'], | |
onAlways : function () { | |
Aak.uw.ad_block_test = function () {}; | |
} | |
}, | |
adscendmedia : { | |
host : ['adscendmedia.com'], | |
onStart : function () { | |
// adscendmedia - https://www.adscendmedia.com/ | |
var ref = document.createElement('a').href = document.referrer; | |
var host = location.host; | |
var path = location.pathname; | |
if (Aak.contains(path, '/widget_adblock.php') && !Aak.contains(ref.host, host)) { | |
// Auto report | |
Aak.detected('Adscendmedia', ref.host, host); | |
// Notification | |
Aak.notification('You must subscribe to <b>AakList (Anti-Adblock Killer )</b> <a href="' + Aak.subscribeURL + '" target="_blank">Subscribe</a>'); | |
} | |
} | |
}, | |
adworkmedia : { | |
host : ['adworkmedia.com', 'loxtk.com', 'contentlockingnetworks.com'], | |
onStart : function () { | |
// AdWorkMedia - https://www.adworkmedia.com/ | |
var ref = document.createElement('a').href = document.referrer; | |
var host = location.host; | |
var path = location.pathname; | |
if (Aak.contains(path, '/help/removeAB.php') && !Aak.contains(ref.host, host)) { | |
// Auto report | |
Aak.info('Adworkmedia', ref.host, host); | |
// Notification | |
Aak.notification('You must subscribe to <b>AakList (Anti-Adblock Killer )</b> <a href="' + Aak.subscribeURL + '" target="_blank">Subscribe</a>'); | |
} | |
} | |
}, | |
// -------------------------------------------------------------------------------------------- | |
// Players | |
// -------------------------------------------------------------------------------------------- | |
kissanime_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/451 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/381 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/302 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/257 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/178 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/196 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/56 | |
host : ['kissanime.com', 'kissanime.to'], | |
onStart : function () { | |
// Masking ads | |
Aak.addStyle('iframe[id^="adsIfrme"], .divCloseBut { display:none; }'); | |
// Solution 1 | |
Aak.uw.DoDetect2 = null; | |
}, | |
onIdle : function () { | |
// Solution 1 abp rule | |
// @@||kissanime.com^$elemhide | |
var divContentVideo = document.querySelector('#divContentVideo'); | |
// Solution 2 | |
if (Aak.uw.DoDetect2) { | |
Aak.uw.DoDetect2 = null; | |
Aak.uw.CheckAdImage = null; | |
Aak.info('Solution 2'); | |
} //Solution 3 | |
else if (divContentVideo) { | |
var divDownload = document.querySelector('#divDownload').cloneNode(true); | |
setTimeout(function () { | |
divContentVideo.innerHTML = ''; | |
Aak.uw.DoHideFake(); | |
divContentVideo.appendChild(divDownload); | |
Aak.removeElement('iframe[id^="adsIfrme"], .divCloseBut'); | |
Aak.info('Solution 3'); | |
}, 5500); | |
} | |
} | |
}, | |
Kisscartoon_me : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/488 | |
host : ['kisscartoon.me'], | |
onAlways : function () { | |
Aak.uw.xaZlE = function () {}; | |
}, | |
onIdle : function () { | |
Aak.removeElement('iframe[id^="adsIfrme"]'); | |
} | |
}, | |
openload_domains : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=openload | |
host : ['openload.co', 'openload.io', 'openload.tv'], | |
onStart : function () { | |
Aak.uw.adblock = false; | |
Aak.uw.adblock2 = false; | |
Aak.uw.popAdsLoaded = true; | |
// hide fake play button used to open popunder | |
//Aak.addStyle('#videooverlay { display:none; }') | |
} | |
}, | |
youwatch_org : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=youwatch | |
// test: http://youwatch.org/embed-59p7i3cdkse0-453x320.html | |
// test: http://youwatch.org/59p7i3cdkse0 | |
host : ['youwatch.org', 'chouhaa.info', 'ahzahg6ohb.com', 'ahzahg6ohb.com'], | |
onStart : function () { | |
// skip anti-adblock | |
Aak.uw.adsShowPopup1 = 1; | |
}, | |
onIdle : function () { | |
// renove ads + fake play button | |
Aak.removeElement('#player_imj, #player_imj + div[id]'); | |
} | |
}, | |
exashare_com : { | |
// by: Watilin | |
// pull: https://github.com/reek/anti-adblock-killer/pull/519 | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=exashare.com | |
// test: http://exashare.com/galw2ge2kzsv | |
host : ['exashare.com', 'chefti.info', 'bojem3a.info', 'ajihezo.info', 'yahmaib3ai.com', 'yahmaib3ai.com'], | |
onStart : function () { | |
// skip anti-adblock | |
Aak.uw.adsShowPopup1 = 1; | |
}, | |
onIdle : function () { | |
// renove ads + fake play button | |
Aak.removeElement('#player_gaz, #player_gaz + div[id]'); | |
} | |
}, | |
an1me_se : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/190 | |
host : ['an1me.se'], | |
onIdle : function () { | |
setTimeout(function () { | |
Aak.uw.isBlockAds2 = false; | |
}, 10000); | |
} | |
}, | |
hqq_tv : { // putlocker.is | |
host : ['hqq.tv'], | |
onIdle : function () { | |
// + abp rule | |
// http://hqq.tv/player/embed_player.php?vid=R3DGHG3GKXX7&autoplay=no | |
if ('/player/embed_player.php' == location.pathname) { | |
document.querySelector('form[id^="form-"]').submit(); | |
} | |
} | |
}, | |
// Poland | |
wp_domains : { | |
// Note: disable EasyPrivacy | |
// issue: https://github.com/reek/anti-adblock-killer/issues/956 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/905 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/300 | |
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'], | |
onStart : function () { | |
// prevent popup anti-adblock from abczdrowie.pl | |
Aak.setCookie('ABCABC', true); | |
}, | |
onIdle : function () { | |
Aak.hasElement('.wp-player', function () { | |
var replacePlayerWP = function (mid, player) { | |
/* Request | |
http://get.wp.tv/?mid=1661056 | |
http://wp.tv/player/mid,1661056,embed.json | |
http://get.wp.tv/?f=2896462.1426329056904.l.webm&rnd=1 | |
https://wp.tv/player/mid,1747117,embed.json | |
*/ | |
Aak.request({ | |
url : 'http://wp.tv/player/mid,' + mid + ',embed.json', | |
onload : function (result) { | |
var res = result.responseText; | |
var obj = JSON.parse(res); | |
Aak.log(obj); | |
var Player = new Aak.player(); | |
Player.videojs(player, { | |
source : Aak.fixProtocolURL(obj.clip.url[1].url), // HD | |
type : 'mp4', | |
autoplay : false | |
}); | |
} | |
}); | |
}; | |
var replacePlayerWrzuta = function (key, channel, elem) { | |
Aak.request({ | |
// http://www.wrzuta.pl/npp/embed/wolnapolska2/0I0HQ2mutJc | |
url : 'http://www.wrzuta.pl/npp/embed/' + channel + '/' + key, | |
onload : function (result) { | |
var res = result.responseText; | |
var obj = JSON.parse(res); | |
Aak.log(obj); | |
var Player = new Aak.player(); | |
Player.videojs(elem, { | |
source : Aak.fixProtocolURL(obj.url[0].url), //HD | |
type : 'mp4', | |
autoplay : false | |
}); | |
} | |
}); | |
}; | |
// Using an external flash player is impossible because protected by crossdomain.xml | |
var players = document.querySelectorAll('.wp-player'); // #Player0, #Player1, #mainPlayer | |
if (players.length) { | |
// fixbug gm_xhr loop request - http://tinyurl.com/pqa9htq | |
for (var i = 0; i < players.length; i++) { | |
var mid = null; | |
var player = players[i]; | |
var parent = player.parentNode; | |
var script = player.previousSibling; | |
var title = player.querySelector('.titleCont a.title'); | |
var embedvideos = document.querySelectorAll('script[src*="/embed_video.js"]'); | |
Aak.log(player, parent, script, title); | |
if (embedvideos.length) { | |
// pudelek.wrzuta.pl: http://tinyurl.com/l8jo5v2 | |
// pudelek.tv: http://tinyurl.com/klyzh6r, http://tinyurl.com/z7fr89v | |
// pudelek.tv (triple): http://tinyurl.com/n9b27o2 | |
// film.wp.pl: http://tinyurl.com/q7k5bxp | |
var embedvideo = embedvideos[i]; | |
var key = /key=(\w+)/.exec(embedvideo.src)[1]; | |
var channel = /login=(\w+)/.exec(embedvideo.src)[1]; | |
var autostart = /autoplay/.test(embedvideo.src); | |
replacePlayerWrzuta(key, channel, player, autostart); | |
Aak.log('embed_video.js'); | |
} else if (title && /mid/.test(title.href)) { | |
// sportowefakty.pl: http://tinyurl.com/l6zabcx | |
mid = title.href.match(/mid[=,]([0-9]+)/); | |
Aak.log('title.href'); | |
} else if (parent.id) { | |
if (parent.dataset.url) { | |
// wp.tv: http://tinyurl.com/pzde29t | |
mid = parent.dataset.url.match(/mid[=,]([0-9]+)/); | |
Aak.log('parent.dataset.url'); | |
} else { | |
if (parent.previousSibling.innerHTML) { | |
// wiadomosci.wp.pl: http://tinyurl.com/gqtt9ca | |
mid = parent.previousSibling.innerHTML.match(/mid[=,]([0-9]+)/); | |
Aak.log('script.inline.innerHTML'); | |
} else { | |
// kafeteria.tv: http://tinyurl.com/nofp58a | |
// abczdrowie.pl: http://tinyurl.com/hx6s5et | |
mid = parent.innerHTML.match(/mid[=,]([0-9]+)/); | |
Aak.log('parent.innerHTML'); | |
} | |
} | |
} else if (script && script.tagName == 'SCRIPT') { | |
// film.wp.pl: http://tinyurl.com/mh9onfw | |
// pudelek.tv (double): http://tinyurl.com/lefvwtx | |
mid = script.innerHTML.match(/mid[=,]([0-9]+)/); | |
Aak.log('script.src.innerHTML'); | |
} | |
if (mid !== null && mid.length == 2) { | |
replacePlayerWP(mid[1], player); | |
} | |
} | |
} | |
}); | |
} | |
}, | |
moje_filmy_network: { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1010 | |
// source: http://pastebin.com/7G2RBnqq | |
host : ['moje-filmy.tk', 'moje-filmy.live'], | |
onIdle : function () { | |
var searchvalue = ['var playerInstance', '});']; | |
var script = Aak.hasScript(searchvalue[0]); | |
if (script) { | |
var source = script.innerHTML; | |
var str = source.substring(source.lastIndexOf(searchvalue[0]), source.lastIndexOf(searchvalue[1]) + searchvalue[1].length); | |
Aak.addScript(str); | |
} | |
} | |
}, | |
tvn_pl : { | |
// by: Reek, Marek | |
// solution: http://tinyurl.com/ohbvz4r, http://tinyurl.com/jq8s462 | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=tvn.pl | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=tvn24.pl | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=player.pl | |
// test: http://tinyurl.com/o6d9h66, http://tinyurl.com/z77m4zh | |
host : ['tvn.pl', 'tvn24.pl', 'player.pl'], | |
onEnd : function () { | |
Aak.hasElement('header.detailImage', function (thisElement) { | |
if (Aak.getCookie('country_code') && Aak.getSession('generateToken')) { | |
var parts = document.location.href.split(/[.,]/); | |
var id = parts[parts.length - 2]; | |
var params = { | |
platform : "Mobile", | |
terminal : "Android", | |
format : "json", | |
v : "2.0", | |
authKey : "b4bc971840de63d105b3166403aa1bea", | |
type : "episode", | |
id : id, | |
sort : "newest", | |
m : "getItem", | |
deviceScreenHeight : 1600, | |
deviceScreenWidth : 2560 | |
}; | |
var api = 'https://api.tvnplayer.pl/api/?' + Aak.serialize(params); | |
var proxy = 'http://www.proxy.xmc.pl/index.php?hl=3e5&q='; | |
// Get videoUrl | |
Aak.request({ | |
url : Aak.getCookie('country_code') != 'PL' ? proxy + Aak.encodeURI(api) : api, | |
headers : { | |
"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" | |
}, | |
onload : function (result) { | |
var res = result.responseText; | |
Aak.log(res); | |
var o = JSON.parse(res); | |
var videoUrl = o.item.videos.main.video_content[Number(Aak.opts.videoHD)].url; | |
var generateToken = new Function('videoUrl', Aak.getSession('generateToken')); | |
var videoUrlWithSeed = generateToken(videoUrl); | |
var Player = new Aak.player(); | |
Player.videojs(thisElement, { | |
source : videoUrlWithSeed, | |
type : 'mp4', | |
autoplay: false | |
}, {}, {insert:'inner'}); | |
} | |
}); | |
} else { | |
Aak.request({ // get and store generateToken function | |
url : 'http://pastebin.com/raw/D9qM4DR3', | |
onload : function (response) { | |
var res = response.responseText; | |
Aak.setSession('generateToken', res); | |
Aak.request({ // get user ip | |
url : 'http://ip-api.com/json', | |
onload : function (response) { | |
var res = response.responseText; | |
var json = JSON.parse(res); | |
Aak.setCookie('country_code', json.countryCode); | |
Aak.refresh(); | |
} | |
}); | |
} | |
}); | |
} | |
}); | |
} | |
}, | |
ipla_tv : { | |
// by: Marek | |
// solution: http://tinyurl.com/ptb4ybg | |
// issue. https://github.com/reek/anti-adblock-killer/issues/522 | |
// test: http://tinyurl.com/hz7gpxx | |
host : ['ipla.tv'], | |
onIdle : function () { | |
Aak.addStyle('.html5-player-wrapper { display:none; }'); // chrome/opera | |
var oldPlayer = document.querySelector('.html5-player-wrapper, #vod-player'); | |
Aak.request({ | |
url : '/VOD/play-in-ipla/' + location.href.match(/\/vod-(\d+)/)[1], | |
onload : function (result) { | |
var videoURL; | |
var res = result.responseText; | |
var idn = res.match(/ipla:\/\/playvod-1\|([a-z0-9]+)/)[1]; | |
Aak.log(idn); | |
Aak.request({ | |
url : 'http://getmedia.redefine.pl/vods/get_vod/?cpid=1&ua=mipla/23&media_id=' + idn, | |
onload : function (result) { | |
var res = result.responseText; | |
var o = JSON.parse(res); | |
Aak.log(o); | |
if (o.vod.video_hd) { | |
videoURL = o.vod.video_hd; | |
} else if (o.vod.video) { | |
videoURL = o.vod.video; | |
} else { | |
videoURL = o.vod.copies[0].url; | |
} | |
var Player = new Aak.player(); | |
Player.videojs(oldPlayer, { | |
source : videoURL, | |
type : 'mp4', | |
width : 820, | |
height : 450, | |
autoplay : false | |
}); | |
} | |
}); | |
} | |
}); | |
} | |
}, | |
koscian_net : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/914 | |
// source: http://pastebin.com/yGSPBRqe | |
host : ['koscian.net'], | |
onIdle : function () { | |
var elems = document.querySelectorAll('.ban'); | |
for (var i = 0; i < elems.length; i++) { | |
elems[i].remove(); | |
//elems[i].innerHTML = '<br>'; | |
} | |
} | |
}, | |
// France | |
playtv_fr : { // research solution | |
host : ['play.tv', 'playtv.fr'], | |
onAlways : function () {}, | |
onEnd : function () {} | |
}, | |
rmcsportbfmtv_com : { // webradio | |
host : ['rmcsport.bfmtv.com'], | |
onIdle : function () { | |
var flashvars = { | |
urlRadio : "http://mp3lg4.tdf-cdn.com/10160/rmc.mp3", | |
nom : "live", | |
categorie : "live", | |
urlSmart : "" // set empty to remove audio ad | |
}; | |
var params = { | |
wmode : "transparent" | |
}; | |
Aak.uw.swfobject.embedSWF("/swf/RMCLIVE.swf", "liveplayer", "70", "90", "10.0.0", "", flashvars, params); | |
} | |
}, | |
eclypsia_com : { | |
host : ['eclypsia.com'], | |
onAlways : function () { | |
// Solution 1 | |
// abp rules | |
// Solution 2 | |
Aak.uw.isABActivated = function () { | |
return false; | |
}; // Kill antiadblock | |
Aak.uw.refresh_iframe = function () {}; // Stop ads to be loaded | |
}, | |
onEnd : function () { | |
// Solution 3 | |
var element = document.querySelector('div[id^="webtv_iframe_"]'); | |
if (element !== null) { | |
var videoId = element.id.split('_')[2]; | |
setTimeout(function () { | |
element.innerHTML = '<iframe frameborder="0" width="812" height="500" src="http://www.dailymotion.com/embed/video/' + videoId + '?logo=0&autoPlay=1&autoMute=0"></iframe>'; | |
}, 1000); | |
} | |
} | |
}, | |
m6web_fr : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/461 | |
// test: http://tinyurl.com/ptn2vrl | |
host : ['m6web.fr'], | |
onEnd : function () { | |
var player = document.querySelector('object[id$="_flash_api"]'); | |
var script = Aak.hasScript('M6.Player.config'); | |
if (player !== null && script !== null) { | |
var found = script.innerHTML.match(/M6.Player.config = (\{.+\});/); | |
var config = JSON.parse(found.pop()); | |
// Replace player | |
var Player = new Aak.player(); | |
Player.videojs(player.parentNode, { | |
source : config.sources[1].src, | |
type : 'mp4', | |
autoplay : false | |
}); | |
} | |
} | |
}, | |
gamingroom_tv : { | |
host : ['gamingroom.tv'], | |
onAlways : function () { | |
Aak.uw.adblock_detect = function () {}; | |
Aak.uw.GR_adblock_hide_video = function () {}; | |
Aak.uw.adblock_video_msg_start = function () {}; | |
Aak.uw.adblock_video_msg_stop = function () {}; | |
Aak.uw.disable_chat = function () {}; | |
} | |
}, | |
// Germany | |
now_domains : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/336 | |
// test: http://tinyurl.com/peeobou | |
// test: http://jsbin.com/vucobejofo | |
host : ['voxnow.de', 'rtl-now.rtl.de', 'rtl2now.rtl2.de', 'n-tvnow.de', 'superrtlnow.de', 'rtlnitronow.de', 'nowtv.de'], | |
onIdle : function () { | |
/* | |
var Player = new Aak.player(); | |
Player.editing('#videoplayer', { | |
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' | |
}); | |
*/ | |
} | |
}, | |
rtl_de : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1541 | |
// test: http://tinyurl.com/h7ccvqq | |
host : ['rtl.de'], | |
onIdle : function () { | |
Array.prototype.slice.call(document.querySelectorAll('div[data-widget="video"]')).map(function (video) { | |
var cfg = Aak.intoObject(video.dataset.playerLayerCfg); | |
var file = cfg.videoinfo.mp4url; | |
Aak.log(video, cfg, file); | |
// Replace player | |
var Player = new Aak.player(); | |
Player.videojs(video, { | |
source : file, | |
type : 'mp4', | |
autoplay : false | |
}); | |
}); | |
} | |
}, | |
myspass_de : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/76 | |
// test: http://tinyurl.com/lto9pyd | |
host : ['myspass.de'], | |
onIdle : function () { | |
var videoid = location.pathname.match(/\/(\d+)\/$/); | |
if (videoid !== null) { | |
Aak.request({ | |
url : 'http://www.myspass.de/myspass/includes/apps/video/getvideometadataxml.php?id=' + videoid[1], | |
onload : function (result) { | |
var res = result.responseText; | |
Aak.log(res); | |
// Get video | |
var parser = new window.DOMParser(); | |
var dom = parser.parseFromString(res, "application/xml"); | |
var file = dom.getElementsByTagName("url_flv").item(0).textContent; | |
// Remove elements | |
Aak.removeElement('div.loadingGif'); | |
// Replace player | |
var Player = new Aak.player(); | |
Player.videojs('#player', { | |
source : file, | |
type : 'mp4', | |
autoplay : false | |
}); | |
} | |
}); | |
} | |
} | |
}, | |
// Nederland | |
rtlxl_nl : { | |
// test: http://tinyurl.com/l2zkv3d | |
host : ['rtlxl.nl', 'rtlnieuws.nl'], | |
onEnd : function () { | |
var Player = new Aak.player(); | |
Player.editing('#_rtlosmf0', { | |
setFlashvars : { | |
adblock : false | |
} | |
}); | |
} | |
}, | |
// Norway | |
vgtv_network : { | |
// note: skip video ads + anti-adblock | |
// jwplayer: http://tinyurl.com/zyv79hg | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1402 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/367 | |
// test: http://tinyurl.com/nwp85t, http://tinyurl.com/nwp85t | |
host : ['vgtv.no', 'vg.no'], | |
onEnd : function () { | |
var oldHash = null; | |
var videoId = null; | |
var videoIdRegex = /#\!\/video\/(\d+)\//; | |
// check if the location hash changes | |
setInterval(function () { | |
var player = Aak.getElement('.video-player'); | |
if (player && location.hash != oldHash && videoIdRegex.test(location.hash)) { | |
oldHash = location.hash; | |
videoId = oldHash.match(videoIdRegex)[1]; | |
/* | |
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'; | |
console.log(player) | |
// don't work with chrome | |
// player.innerHTML = '<div id="noAdPlayer">This text will be replaced with a player.</div>'; | |
// can't load m3u8 4032 status code | |
//console.log(unsafeWindow.jwplayer) | |
Aak.request({ | |
url : 'http://svp.vg.no/svp/api/v1/vgtv/assets/' + videoId + '?additional=settings|chapters|cuePoints|externalId|barrels|externalCategoryId|nextAsset&appName=vgtv-website', | |
onload : function (result) { | |
var res = result.responseText; | |
var obj = JSON.parse(res); | |
Aak.log(obj); | |
// replace player | |
var Player = new Aak.player(); | |
Player.vlc(player, { | |
source : obj.streamUrls.hls, // m3u8 | |
type : 'hls', | |
autoplay : false | |
}); | |
} | |
}, {}, { | |
insert : 'inner' | |
}); | |
*/ | |
} | |
}, 1e3); | |
} | |
}, | |
mtg_radio : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1495 | |
host : ['play.radio1.se', 'play.bandit.se', 'play.lugnafavoriter.com', 'play.rixfm.se'], | |
onEnd : function () { | |
Aak.addScript(function () { | |
setTimeout(function () { | |
window.player_load_live(window.stream_id); | |
}, 1000); | |
}); | |
} | |
}, | |
dplay_network : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1463 | |
host : ['dplay.com', 'dplay.dk', 'dplay.se'], | |
onStart : function () { | |
var date = new Date(); | |
date.setDate(date.getDate() + 365); | |
var timestamp = date.getTime().toString(); | |
var value = JSON.stringify({ | |
"notificationSubmission" : "submitted", | |
"reportingExpiry" : timestamp, | |
"notificationExpiry" : timestamp | |
}); | |
Aak.setCookie('dsc-adblock', value); | |
} | |
}, | |
viasat_tv : { | |
// note: skip video ads + anti-adblock | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=tv3play | |
/* test: http://www.tv3play.no/programmer/redningsskoyta hds/hls | |
http://www.tv3play.dk/programmer/linse-og-didde-ekstra hds/hls | |
http://www.tv3play.se/program/glamourama hds/hls | |
http://www.tv6play.se/program/99-saker-man-maste-gora-innan-man-dor hds/hls | |
http://www.tv8play.se/program/efterlyst--1 hds/hls | |
http://www.tv10play.se/program/garpens-europa hds/hls | |
http://tvplay.skaties.lv/parraides/tv3-zinas hds/hls | |
http://play.tv3.lt/programos/beatos-virtuve rtmp/hls | |
http://tv3play.tv3.ee/sisu/puhapaev-sepoga rtmp/hls */ | |
host : ['tv3play.no', 'tv3play.dk', 'tv3play.se', 'tv6play.se', 'tv8play.se', 'tv10play.se', 'tvplay.skaties.lv', 'play.tv3.lt', 'tv3play.tv3.ee'], | |
onIdle : function () { | |
Aak.hasElement('#video-player', function (thisElement) { | |
thisElement.id = ''; | |
//var videoId = location.pathname.split('/').pop(); | |
var videoId = thisElement.getAttribute('data-video-id'); | |
Aak.log(thisElement, videoId); | |
// get video sources | |
Aak.request({ | |
url : 'http://playapi.mtgx.tv/v3/videos/stream/' + videoId, | |
onload : function (result) { | |
var res = result.responseText; | |
var obj = JSON.parse(res); | |
Aak.log(obj); | |
/* Innholdet du prøver å se er kun tilgjengelig for brukere i Norge | |
Programmet er blokeret for visning fra denne geografiske position. | |
Programą galite matyti tik jungdamiesi iš Lietuvos interneto tiekėjų tinklų */ | |
if (obj.msg) { | |
return thisElement.innerHTML = obj.msg; | |
} | |
if (location.host === 'tv3play.tv3.ee') { | |
var Player = new Aak.player(); | |
Player.grindplayer(thisElement, { | |
source : obj.streams.medium, | |
type : 'rtmp/mp4', | |
autoplay : true | |
}); | |
} else { | |
// create video tag for new player | |
Aak.createElement({ | |
tag : 'video', | |
id : 'noAdPlayer', | |
classid : 'video-js vjs-default-skin', | |
width : thisElement.clientWidth || 730, | |
height : thisElement.clientHeight || 410, | |
preload : 'auto', | |
controls : true, | |
autoplay : true, | |
replace : thisElement | |
}); | |
// parse sources | |
var srcArray = []; | |
if (obj.streams.high && obj.streams.high !== '') { | |
srcArray.push({ | |
type : "video/mp4", // mp4 | |
src : obj.streams.high | |
}); | |
} if (obj.streams.hls && obj.streams.hls !== '') { | |
srcArray.push({ | |
type : "application/x-mpegURL", // m3u8 | |
src : obj.streams.hls | |
}); | |
} if (obj.streams.medium && obj.streams.medium !== '') { | |
var type = obj.streams.medium.indexOf('rtmp') === 0 ? 'rtmp/mp4' : 'application/f4m+xml'; | |
srcArray.push({ | |
type : type, | |
src : obj.streams.medium | |
}); | |
} | |
Aak.log(srcArray, JSON.stringify(srcArray)); | |
// initialize new player | |
Aak.addScript(Aak.intoString(function () { | |
(function () { | |
function onVjsReady() { | |
if (typeof window.videojs !== 'function') { | |
onVjsReady(); | |
} else { | |
window.videojs("noAdPlayer").src(/_SOURCES_/); | |
} | |
} | |
onVjsReady(); | |
})(); | |
}).replace("/_SOURCES_/", JSON.stringify(srcArray))); | |
} | |
} | |
}); | |
}); | |
} | |
}, | |
// Russia | |
rutube_ru : { // research solution | |
/* test: http://rutube.ru/video/bd5f6047657f0bdcbfbb0edad2bb7c61/ */ | |
host : ['rutube.ru'], | |
onEnd : function () { | |
Aak.hasElement('#rutubePlayerHolder', function () { //dmFyIG9wdHMgPSBBYWsuZ2V0RWxlbWVudCgiI29wdGlvbnMiKTsNCiAgICAgICAgICAgIHZhciBvID0gQWFrLmludG9PYmplY3Qob3B0cy5kYXRhc2V0LnZhbHVlKTsNCiAgICAgICAgICAgIHZhciBtM3U4VXJsID0gby52aWRlb19iYWxhbmNlci5tM3U4Ow0KICAgICAgICAgICAgY29uc29sZS5sb2cobTN1OFVybCk7DQoNCiAgICAgICAgICAgIHZhciBQbGF5ZXIgPSBuZXcgQWFrLnBsYXllcigpOw0KICAgICAgICAgICAgUGxheWVyLnZpZGVvanMoJyNydXR1YmVQbGF5ZXJIb2xkZXInLCB7DQogICAgICAgICAgICAgICAgc291cmNlIDogbTN1OFVybCwNCiAgICAgICAgICAgICAgICB0eXBlIDogJ2hscycsDQogICAgICAgICAgICAgICAgLy9wcm94eTogdHJ1ZSwNCiAgICAgICAgICAgICAgICBhdXRvcGxheSA6IHRydWUNCiAgICAgICAgICAgICAgfTsgKTs= | |
}); | |
} | |
}, | |
// Italy | |
rai_tv : { // research solution | |
host : ['rai.tv'], | |
onStart : function () {}, | |
onIdle : function () {} | |
}, | |
// TV Stream | |
block_streams_tv : { | |
// note: redirect to http://block.streams.tv/ | |
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'], | |
onAlways : function () { | |
Aak.setCookie("adb", 1); // prevent anti-adblock | |
Aak.uw.open = function () {}; // prevent popup | |
Aak.addStyle("#bannerInCenter, #hiddenBannerCanvas { display: none; }"); // hide ads | |
} | |
}, | |
buzina_xyz : { | |
// note: disable refcontrol, used by firstrowsports | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1268 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1243 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/889 | |
// issue: https://greasyfork.org/forum/discussion/8975 | |
// source: http://pastebin.com/8VTrkvS9 | |
host : ['buzina.xyz', 'farmet.info', 'rimladi.com', 'kitorelo.com', 'omnipola.com', 'porosin.co.uk', 'rimleno.com', 'simple4alls.com', 'arsopo.com'], | |
onStart : function () { | |
Aak.addStyle("#adsframe { height: 151px; }"); | |
}, | |
onIdle : function () { | |
if (/buzina.xyz/.test(location.host)) { // keeps same host stream | |
Aak.hasElement('iframe[src*=".php?hash="]', function (thisElement) { | |
// http://arsopo.com/w2.php?hash=panda58 | |
// http://www.buzina.xyz/nana1v1.php?onthetop | |
var parts = thisElement.src.split('/'); | |
parts[2] = Aak.rules.buzina_xyz.host.pop(); | |
Aak.log(thisElement, parts); | |
thisElement.src = parts.join('/'); | |
/* dmFyIG8gPSB7CgkJCSAgICAicGxheWxpc3QiIDogW3sKCQkJICAgICAgICAicHJvdmlkZXIiIDogInJ0bXAiLAoJCQkgICAgICAgICJ1cmwiIDogInBhbmRhMT9lJTNEMTQ2NTA3MDMyNiUyNnN0JTNEUHJ0SFl5dkJ6ZDlaZDdoRF9mUkhUZzExMTEzMCIKCQkJICAgICAgfQoJCQkgICAgXSwKCQkJICAgICJwbHVnaW5zIiA6IHsKCQkJICAgICAgInJ0bXAiIDogewoJCQkgICAgICAgICJ1cmwiIDogImZsb3dwbGF5ZXIucnRtcC0zLjIuMTEuc3dmIiwgCgkJCQkJLy8idXJsIjogImh0dHA6Ly9yZWxlYXNlcy5mbG93cGxheWVyLm9yZy9zd2YvZmxvd3BsYXllci5ydG1wLTMuMi4xMS5zd2YiLAoJCQkgICAgICAgICJuZXRDb25uZWN0aW9uVXJsIiA6ICJydG1wOi8vMTg1LjgyLjIxNS40NTozNTc5L3ZvZC8iCgkJCSAgICAgIH0sCgkJCSAgICAgICJjb250cm9scyIgOiB7CgkJCQkgICAgInVybCI6ICJodHRwOi8vcmVsZWFzZXMuZmxvd3BsYXllci5vcmcvc3dmL2Zsb3dwbGF5ZXIuY29udHJvbHMtMy4yLjE2LnN3ZiIsIC8vIGFkZGVkIGJlY2F1c2UgbWlzc2luZwoJCQkgICAgICAgICJwbGF5IiA6IGZhbHNlLAoJCQkgICAgICAgICJzY3J1YmJlciIgOiBmYWxzZQoJCQkgICAgICB9CgkJCSAgICB9LAoJCQkgICAgInBsYXllcklkIiA6ICJwbGF5ZXIiLAoJCQkgICAgImNsaXAiIDogewoJCQkgICAgICAidXJsIiA6ICJwYW5kYTE/ZSUzRDE0NjUwNzAzMjYlMjZzdCUzRFBydEhZeXZCemQ5WmQ3aERfZlJIVGcxMTExMzAiCgkJCSAgICB9CgkJCSAgfQoKCQkJICB2YXIgbmV3VXJsID0gcGFydHMuc2xpY2UoMCwgMykuam9pbignLycpICsgJy9mbG93cGxheWVyLTMuMi4xNi5zd2Y/Y29uZmlnPScgKyBlc2NhcGUoSlNPTi5zdHJpbmdpZnkobykpOwoJCQkgIC8vdmFyIG5ld1VybCA9ICdodHRwOi8vcmVsZWFzZXMuZmxvd3BsYXllci5vcmcvc3dmL2Zsb3dwbGF5ZXItMy4yLjE2LnN3Zj9jb25maWc9JyArIGVzY2FwZShKU09OLnN0cmluZ2lmeShvKSk7CgkJCSAgY29uc29sZS5sb2cobmV3VXJsKTsKCQkJICB0aGlzRWxlbWVudC5zcmMgPSBuZXdVcmw7 | |
*/ | |
}); | |
} else { // skip anti-adblock | |
Aak.removeElement('#adsframe'); | |
Aak.getElement('#remove-over').click(); | |
} | |
} | |
}, | |
allmyvideos_net : { | |
// note: obfuscated | |
// issue: https://github.com/reek/anti-adblock-killer/issues/274 | |
host : ['allmyvideos.net', 'amvtv.net'], | |
onStart : function () { | |
// skip fake play button | |
Aak.setCookie('_favbt33', 1); | |
} | |
}, | |
ilive_domains : { | |
host : ['ilive.to', 'streamlive.to'], | |
onEnd : function () { | |
if (/^\/embedplayer.php/i.test(location.pathname)) { | |
setTimeout(function () { | |
// Skip timer | |
Aak.uw.removeOverlayHTML(); | |
}, 1000); | |
} | |
} | |
}, | |
micast_tv : { | |
host : ['micast.tv'], | |
onStart : function () { | |
// prevent popunder | |
Aak.setCookie('vid_main', true); | |
Aak.setCookie('vid_sub', true); | |
// remove overlay | |
Aak.addScript(function () { | |
window.onload = function () { | |
if (window.removeOverlayHTML) | |
window.removeOverlayHTML(); | |
}; | |
}); | |
} | |
}, | |
pxstream_tv : { | |
host : ['pxstream.tv'], | |
onEnd : function () { | |
if (/^\/embedrouter.php/.test(location.pathname)) { | |
setTimeout(function () { | |
// Skip timer and close ads | |
Aak.uw.closeAd(); | |
}, 1000); | |
} | |
} | |
}, | |
sawlive_tv : { | |
host : ['sawlive.tv'], | |
onIdle : function () { | |
if (/^\/embed\/watch\//i.test(location.pathname)) { | |
// Skip timer and close ads | |
Aak.uw.display = false; | |
Aak.uw.closeMyAd(); | |
} | |
} | |
}, | |
goodcast_co : { | |
host : ['goodcast.co'], | |
onIdle : function () { | |
if (/^\/stream.php/.test(location.pathname)) { | |
// remove ads allowed by easylist | |
Aak.uw.$(".advertisement").hide(); | |
Aak.uw.$('.adsky iframe').attr("src", "about:blank"); | |
} | |
} | |
}, | |
showsport_tv_com : { | |
host : ['showsport-tv.com'], | |
onIdle : function () { | |
if (/^\/ch.php/.test(location.pathname)) { | |
// remove ads allowed by easylist | |
Aak.removeElement('#advertisement, .advertisement'); | |
} | |
} | |
}, | |
sharecast_to : { | |
host : ['sharecast.to'], | |
onIdle : function () { | |
if (/^\/embed.php/.test(location.pathname)) { | |
// Disable popunders | |
var interval = setInterval(function () { | |
Aak.setCookie('vid_main', true); | |
Aak.setCookie('vid_sub', 2); | |
Aak.setCookie('vid_delay', true); | |
}, 100); | |
setTimeout(function () { | |
clearInterval(interval); | |
}, 5000); | |
// Remove transparent overlay | |
Aak.removeElement('#table1'); | |
} | |
} | |
}, | |
videomega_tv : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=videomega | |
host : ['videomega.tv'], | |
onStart : function () { | |
if (/^\/view.php/.test(location.pathname)) { | |
// prevent popunder | |
Aak.setCookie('vid_mainpu', true); | |
Aak.setCookie('vid_subpu', true); | |
Aak.setCookie('vid_delay', true); | |
} | |
}, | |
onEnd : function () { | |
// kill abc | |
// fix bug on firefox: The video could not be loaded, either because the server or network failed or because the format is not supported. | |
var script = Aak.hasScript('Please disable AdBlock Plugin to watch the video'); | |
if (script) { | |
var source = script.innerHTML; | |
var substring = source.substring(source.lastIndexOf('eval('), source.lastIndexOf(')') + 1); | |
var deobfuscated = Aak.unpackScript(substring); | |
var newScript = 'if('+deobfuscated.substring(deobfuscated.indexOf('true')); | |
Aak.addScript(newScript); | |
} | |
} | |
}, | |
flowplayer_antiadblock : { | |
host : ['videofun.me', 'videobug.net', 'video44.net', 'play44.net', 'byzoo.org', 'playbb.me', 'videowing.me', 'videozoo.me', 'easyvideo.me', 'playpanda.net'], | |
onEnd : function () { | |
/* | |
http://www.animetoon.tv/black-lagoon-episode-1 | |
http://videowing.me/embed?w=718&h=438&video=ongoing/yu-gi-oh_arc-v_-_53.mp4 | |
http://playbb.me/embed.php?w=718&h=438&vid=at/nw/yu-gi-oh_arc-v_-_53.mp4 | |
http://videozoo.me/embed.php?w=718&h=438&vid=at/nw/yu-gi-oh_arc-v_-_53.mp4 | |
http://www.easyvideo.me/gogo/?w=718&h=438&file=yu-gi-oh_arc-v_-_53.mp4&sv=1 | |
http://playpanda.net/embed.php?w=718&h=438&vid=at/nw/yu-gi-oh_arc-v_-_53.mp4 | |
*/ | |
// allow fullscreen when abp is enabled and remove ad layer | |
// ads blocked by abp rule | |
if (/^\/(embed|gogo|gplus)/.test(location.pathname)) { | |
var Player = new Aak.player(); | |
Player.editing('#flowplayer_api', { | |
setAttributes : { | |
allowfullscreen : true | |
} | |
}); | |
} | |
} | |
}, | |
r3z : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=label:R3Z | |
// source: http://pastebin.com/C159kevn | |
host : ['cityam.com', 'computerworlduk.com', 'techworld.com', 'v3.co.uk'], | |
onStart : function () { | |
/* don't work with chrome | |
Object.defineProperty(Aak.uw, '_r3z', { | |
enumerable : true, | |
writable : false, | |
value : {} | |
}); | |
*/ | |
}, | |
onIdle : function () { | |
Aak.uw.$("#r3z-wait").remove(); | |
Aak.uw.$(".r3z-hide").removeClass("r3z-hide"); | |
Aak.uw._r3z = null; | |
} | |
}, | |
google_jobrunner : { | |
// issue: https://greasyfork.org/en/forum/messages/405 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1343 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1342 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/831 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1274 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1262 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/561 | |
host : ['next-episode.net', 'kingmaker.news', 'gamespowerita.com', 'todayidol.com', 'receive-a-sms.com', 'wakeupcallme.com', 'ringmycellphone.com', 'faqmozilla.org', 'thememypc.com'], | |
onAlways : function () { | |
Aak.uw.google_jobrunner = {}; | |
} | |
}, | |
// fuckadbock customized | |
fab_dawn_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1747 | |
host : ['dawn.com'], | |
onStart : function () { | |
Aak.fakeFuckAdBlock('detectAdBlock', 'DetectAdBlock'); | |
} | |
}, | |
fab_sports_fr : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1217 | |
// source: http://pastebin.com/SpEN5duS | |
host : ['sports.fr'], | |
onStart : function () { | |
Aak.fakeFuckAdBlock('fabInstance', 'FabInstance'); | |
} | |
}, | |
fab_europe1_fr : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1188 | |
// source: http://pastebin.com/ULe1vzQR | |
host : ['europe1.fr'], | |
onStart : function () { | |
Aak.fakeFuckAdBlock('fabInstance', 'FabInstance'); | |
} | |
}, | |
fab_newyorker_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1177 | |
host : ['newyorker.com'], | |
onStart : function () { | |
Aak.fakeFuckAdBlock('sniffAdBlock', 'SniffAdBlock'); | |
} | |
}, | |
fab_wired_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1061 | |
// issue: https://greasyfork.org/fr/forum/discussion/8235 | |
// source: http://pastebin.com/Pq14v4FC | |
host : ['wired.com'], | |
onStart : function () { | |
Aak.fakeFuckAdBlock('sniffAdBlock', 'SniffAdBlock'); | |
} | |
}, | |
fab_mangasproject_domains : { | |
// note: fuckadblock with custom instance name | |
// note: also added abp rule | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1127 | |
// issue: https://greasyfork.org/fr/forum/discussion/4132 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/858 | |
// source: https://mangas.zlx.com.br/mangazord_lib/js/lib/controllers/Leitor/Leitor.min.js | |
host : ['mangasproject.com.br', 'mangasproject.net.br', 'mangas.zlx.com.br'], | |
onStart : function () { | |
Aak.fakeFuckAdBlock('mangasLeitorSlider', Aak.generateID()); | |
} | |
}, | |
fab_qnimate_com : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/739 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/705 | |
// note: fuckadblock customized | |
host : ['qnimate.com'], | |
onAlways : function () { | |
Aak.uw.adBlockDetected = function () {}; | |
} | |
}, | |
fab_eurotransport_de : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/858 | |
// note: fuckadblock with custom instance name | |
host : ['eurotransport.de'], | |
onStart : function () { | |
Aak.fakeFuckAdBlock('antiAdBlock', Aak.generateID()); | |
} | |
}, | |
fab_cadetect : { | |
// by: Skr4tchGr3azyMonkiBallllllZzzz | |
// issue: https://github.com/reek/anti-adblock-killer/issues/784 | |
// note: fuckadblock with custom instance name | |
host : ['tzetze.it', 'beppegrillo.it', 'la-cosa.it'], | |
onStart : function () { | |
Aak.fakeFuckAdBlock('cadetect', 'CADetect'); | |
} | |
}, | |
fab_agar_game : { | |
// note: fuckadblock with custom instance name | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1257 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1135 | |
host : ['agario.sx', 'agarabi.com'], | |
onStart : function () { | |
Aak.fakeFuckAdBlock('agario_SX_ads', Aak.generateID()); | |
} | |
}, | |
fab_filespace_com : { | |
// note: fuckadblock with custom instance name | |
// source: http://pastebin.com/YAS0As87 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1037 | |
host : ['filespace.com'], | |
onStart : function () { | |
Aak.fakeFuckAdBlock('fAB', Aak.generateID()); | |
} | |
}, | |
fab_topserialy_sk : { | |
// note: fuckadblock with custom instance name | |
// source: http://pastebin.com/42tUQ9aV | |
host : ['topserialy.sk'], | |
onStart : function () { | |
Aak.fakeFuckAdBlock('sratNaVas', Aak.generateID()); | |
} | |
}, | |
fab_customized : { | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1455 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1657 | |
// source: http://pastebin.com/N42a5BjE | |
host : ['epicurious.com', 'desktopsolution.org', 'indiatimes.com', 'hindustantimes.com', 'happytrips.com'], | |
onStart : function() { | |
Aak.addScript(function () { | |
(function () { | |
var _setAttribute = window.Element.prototype.setAttribute; | |
window.Element.prototype.setAttribute = function (name, value) { | |
if (name == 'class' && value.indexOf('text_ads') != -1) { | |
value = ''; | |
console.info(this, 'fab intercepted :-)'); | |
} | |
_setAttribute.call(this, name, value); | |
}; | |
})(); | |
}); | |
} | |
}, | |
d3xt3er_antiadblock : { | |
// site: http://d3xt3r.com/anti-adblock | |
// case: http://sport-show.fr/js/advertisement-AdBlock.js | |
// case: http://www.2site.me/advertisement-AdBlock.js | |
host : ['sport-show.fr', 'vipflash.net', '2site.me'], | |
onStart : function () { | |
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;}"); | |
} | |
}, | |
adblock_notify : { | |
// by: Skr4tchGr3azyMonkiBallllllZzzz | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1766 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1392 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1039 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/592 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/813 | |
host : ['gametransfers.com', 'winandmac.com', 'free-steam-giveaways.com', 'canalwp.com', 'alphahistory.com', 'nordpresse.be', 'sospc.name', 'baboo.com.br'], | |
onAlways : function () { | |
Aak.setCookie('anCookie', true); | |
Aak.uw.anOptions = {}; | |
} | |
}, | |
lutte_adblock : { | |
// site: http://lutteadblock.blogspot.com/2014/11/le-script.html | |
// issue: https://github.com/reek/anti-adblock-killer/issues/938 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/580 | |
host : ['lewebtvbouquetfrancophone.overblog.com', 'webtv.bloguez.com', 'latelegratuite.blogspot.com', 'totaldebrid.org', '37.187.173.205', 'tvgratuite.blogspot.com'], | |
onStart : function () { | |
Aak.addBaitElement('div#my_ad_div'); | |
Aak.uw.jabbahud = function () {}; | |
} | |
}, | |
antiblock : { | |
// site: antiblock.org | |
// note: customized | |
// issue: | |
host : ['mybank.pl', 'rapidgrab.pl'], | |
onStart : function () { | |
Aak.addScript(function () { | |
(function () { | |
var _addEventListener = window.addEventListener; | |
window.addEventListener = function (type, listener, options) { | |
if (listener.toString().indexOf('.nextFunction()}') > -1) { | |
listener = function () { | |
console.info(['AntiAdbKiller', location.host, 'AntiBlock{customized}']); | |
}; | |
} | |
_addEventListener.call(this, type, listener, options); | |
}; | |
})(); | |
}); | |
} | |
}, | |
blockadblock : { | |
// site: blockadblock.com | |
// note: random instance name | |
// source: https://gist.github.com/Watilin/af75e0a2e82a2efb384bde9c7b41dec8 | |
// issues: https://github.com/reek/anti-adblock-killer/issues?q=label:BlockAdBlock | |
// issue: https://greasyfork.org/forum/discussion/8273 | |
// issue: https://greasyfork.org/forum/discussion/7625 | |
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'], | |
onStart : function () { | |
Aak.addScript(function () { | |
// variant 1 | |
(function () { | |
var _setTimeout = window.setTimeout; | |
window.setTimeout = function (fn, delay) { | |
// console.log(fn.toString()) | |
if (typeof fn === 'string' && fn.indexOf('bab_elementid') > -1) { | |
fn = function () { | |
console.info(['AntiAdbKiller', location.host, 'BlockAdBlock']); | |
}; | |
} | |
_setTimeout.call(this, fn, delay); | |
}; | |
})(); | |
}); | |
} | |
}, | |
gpt_sp : { | |
// by: Reek, Giwayume | |
// note: when adblock detected inject new ads, redirect to http://tinyurl.com/zq2z5o6 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1636 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1596 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1297 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1144 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1542 | |
// source: http://pastebin.com/8Ajitfb2 | |
host : ['marketwatch.com', 'deadline.com', 'tweaktown.com', 'nypost.com', 'realgm.com', 'nasdaq.com'], | |
onStart : function () { | |
Aak.addStyle(".container--bannerAd, .col--ad { display: none; }"); | |
Aak.addScript(function () { | |
(function () { | |
// Giwayume | |
window._sp_ = window._sp_ || {}; | |
window._sp_.config = window._sp_.config || {}; | |
Object.defineProperty(window._sp_.config, "content_control_callback", { | |
value : function () {}, | |
writable : false, | |
configurable : false | |
}); | |
// Reek | |
var _addEventListener = window.EventTarget.prototype.addEventListener; | |
window.EventTarget.prototype.addEventListener = function (type, listener, options) { | |
if (type == 'sp.blocking') { | |
listener = function () { | |
console.info(['AntiAdbKiller', location.host, 'GPT{sp-blocking}']); | |
}; | |
} | |
_addEventListener.call(this, type, listener, options); | |
}; | |
})(); | |
}); | |
} | |
}, | |
krux_asl : { | |
// note: when adblock detected inject new ads | |
// source: http://pastebin.com/0HD7N84i | |
host : ['commentcamarche.net', 'journaldesfemmes.com', 'linternaute.com'], | |
onBeforeScript : function () { | |
return [{ | |
detected : 'Krux{asl}', | |
contains : 'Asl.prototype.inject', | |
external : false, | |
remove : true | |
} | |
]; | |
} | |
}, | |
krux_adp : { | |
// note: when adblock detected inject new ads | |
// source: | |
host : ['fourchette-et-bikini.fr', 'meteocity.com'], | |
onStart : function () { | |
Aak.uw.adProtect = 1; | |
} | |
}, | |
phoenix_goyavelab : { | |
// note: when adblock detected inject new ads | |
// note: script anti-adblock obfuscated, | |
// issue: https://github.com/reek/anti-adblock-killer/issues/ | |
// doc: http://tinyurl.com/gl3ghq2 | |
// source: http://pastebin.com/hsAmdSuf | |
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'], | |
onAlways : function () { | |
//Aak.uw.__$dc = function () {}; | |
Aak.addStyle('body {visibility: visible;}'); | |
}, | |
onBeforeScript : function () { | |
return [{ | |
detected : 'PhoenixGoyavelab', | |
contains : 'PHENV', | |
external : false, | |
remove: true | |
} | |
]; | |
} | |
}, | |
ad_defend_uabp : { | |
// note: when adblock detected inject new ads | |
// source: http://pastebin.com/cFQCp80W | |
host : ['tvspielfilm.de', 'finanzen.ch'], | |
onBeforeScript : function () { | |
return [{ | |
detected : 'AdDefend{UABPInject}', | |
contains : 'UABPInject', | |
external : false, | |
remove : true | |
} | |
]; | |
} | |
}, | |
ad_defend_uab : { | |
// note: when adblock detected inject new ads | |
// userscript: https://openuserjs.org/scripts/schwarztee/AdDefend_Klatsche | |
// userscript: https://gist.github.com/anonymous/a9b9956baf1d59a107c5 | |
// source: http://pastebin.com/1VyW0u9m, http://pastebin.com/AZqhRxWU | |
// issue: https://github.com/reek/anti-adblock-killer/issues?q=label:AdDefend | |
// pull: https://github.com/reek/anti-adblock-killer/pull/467 | |
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'], | |
onBeforeScript : function () { | |
return [{ | |
detected : 'AdDefend{uabInject}', | |
contains : 'uabInject', | |
external : false, | |
remove : true | |
} | |
]; | |
} | |
}, | |
/* solved by AakLIst | |
tisoomi_indirekt : { | |
// inline: http://pastebin.com/npmXTUHw | |
// external: http://pastebin.com/hvWnCuDw | |
host : ['energy.de', 'getvids.de', 'gewinde-normen.de', 'podcast.de', 'spielespielen24.de', 'dialo.de'], | |
onBeforeScript : function (e) { | |
var target = e.target || e.srcElement; | |
var text = target.text; | |
if (Aak.contains(text, 'n="abcdefghijklm",r="nopqrstuvwxyz",i="0123456789";var s=t==0?i:t==1?n')) { | |
Aak.stopScript(e); | |
Aak.log('Tisoomi Indirekt'); | |
} | |
} | |
}, | |
*/ | |
/* solved by AakLIst | |
tisoomi_direkt : { | |
// inline: http://pastebin.com/2vq38JXY | |
host : ['autozeitung.de', 'formel1.de', 'fremdwort.de', 'inside-handy.de', 'motorsport-total.com', 'aussenwirtschaftslupe.de', 'donnerwetter.de', 'wintotal.de'], | |
onBeforeScript : function (e) { | |
var target = e.target || e.srcElement; | |
var text = target.text; | |
if (Aak.contains(text, 'function detect()')) { | |
Aak.stopScript(e); | |
Aak.log('Tisoomi Direkt'); | |
} | |
} | |
}, | |
*/ | |
// -------------------------------------------------------------------------------------------- | |
// Generic | |
// -------------------------------------------------------------------------------------------- | |
generic : { | |
host : ['.*?'], | |
onRemove : function (removedNode) { | |
if (Aak.opts.removed) { | |
if (removedNode.src || | |
removedNode.id || | |
removedNode.className && | |
!/^firebug/.test(removedNode.className)) { | |
// Node removed | |
Aak.log(removedNode); | |
} | |
} | |
}, | |
onStart : function () { | |
// FuckAdBlock & BlockAdBlock v3 and v4 | |
// site: http://www.sitexw.fr/fuckadblock/ | |
// repo: https://github.com/sitexw/FuckAdBlock | |
// repo: https://github.com/sitexw/BlockAdBlock | |
// note: when fuckadblock.js or blockadblock.js is blocked | |
// demo v3: http://sh.st/vovHE | |
// demo v4: http://al.ly/qBbXH | |
// issue: https://github.com/reek/anti-adblock-killer/issues/888 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/824 | |
Aak.fakeFuckAdBlock('fuckAdBlock', 'FuckAdBlock'); | |
Aak.fakeFuckAdBlock('blockAdBlock', 'BlockAdBlock'); | |
// canRunAds | |
// repo: https://github.com/MatthewGross/CanRunAds | |
// note: use externall script "/js/ads.js" -> var canRunAds = true; | |
Object.defineProperty(Aak.uw, 'canRunAds', { | |
enumerable : true, | |
writable : false, | |
value : true | |
}); | |
// canShowAds | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1197 | |
Object.defineProperty(Aak.uw, 'canShowAds', { | |
enumerable : true, | |
writable : false, | |
value : true | |
}); | |
// Adblocker Detecting Scripts: Method 2 | |
// gist: https://gist.github.com/irazasyed/3d247d3d121e781a3872 | |
// note: use externall script "/js/ads.js" -> isAdBlockActive = false; | |
Object.defineProperty(Aak.uw, 'isAdBlockActive', { | |
enumerable : true, | |
writable : false, | |
value : false | |
}); | |
/* | |
window.iHaveLoadedAds = true; | |
var niceAdsCheck=true; | |
adblock = false | |
is_blocker = false; | |
*/ | |
}, | |
onIdle : function () { | |
// AdBlock Detector (XenForo Rellect) | |
// site: http://tinyurl.com/pa28xdn | |
// cloneInto: http://tinyurl.com/k6qphme | |
// issue: https://github.com/reek/anti-adblock-killer/issues/805 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/804 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/591 | |
if (Aak.uw.XenForo && typeof Aak.uw.XenForo.rellect == 'object') { | |
Aak.uw.XenForo.rellect = { | |
AdBlockDetector : { | |
start : function () {} | |
} | |
}; | |
Aak.detected('AdBlock Detector (XenForo Rellect)'); | |
} | |
/* | |
// Adunblock - http://adunblock.com/ | |
if (Aak.getCookie('adblock') == 1) { | |
Aak.setCookie('adblock', 0); | |
Aak.setCookie('bar_closed', 1); | |
} | |
*/ | |
// Adblock Blocker | |
// https://wordpress.org/plugins/addblockblocker/ | |
// http://tinyurl.com/nswn6fz | |
// http://pastebin.com/d65zr37m | |
/* can cause a bug | |
var ads = document.getElementsByClassName('afs_ads'); | |
var ad = ads.length && ads[ads.length - 1]; | |
if (ad && ad.innerHTML.length === 0 || ad.clientHeight === 0) { | |
Aak.addScript(function () { | |
getElementsByClassNameNative = HTMLDocument.prototype.getElementsByClassName; | |
HTMLDocument.prototype.getElementsByClassName = function (className) { | |
if (className == 'afs_ads') { | |
console.info(['AntiAdbKiller', location.host, 'AdblockBlocker', className]); | |
var uniqid = Date.now(); | |
var bait = document.createElement("div"); | |
bait.innerHTML = '<br>'; | |
bait.className = uniqid; | |
document.body.appendChild(bait); | |
return document.getElementsByClassName(uniqid); | |
} | |
return getElementsByClassNameNative.apply(this, arguments); | |
}; | |
}); | |
} | |
*/ | |
// Adbuddy | |
if (typeof Aak.uw.closeAdbuddy === 'function') { | |
Aak.uw.closeAdbuddy(); | |
Aak.detected('Adbuddy'); | |
} | |
// AdBlock Alerter (WP) | |
// https://github.com/wp-plugins/adblock-alerter | |
// | |
if (Aak.getElement('div.adb_overlay > div.adb_modal_img')) { | |
// Remove Alert + Allow Scroll | |
Aak.removeElement('div.adb_overlay'); | |
Aak.addStyle('html,body {height:auto; overflow: auto;}'); | |
Aak.detected('AdBlockAlerter'); | |
} | |
// Unknow Anti AdBlock system | |
if (Aak.getElement('#blockdiv') && Aak.contains(Aak.getElement('#blockdiv').innerHTML, 'disable ad blocking or use another browser without any adblocker when you visit')) { | |
Aak.removeElement('#blockdiv'); | |
} | |
// Antiblock.org v2 | |
// note: detect and store block id | |
// demo: http://tinyurl.com/nhyhpzk | |
var styles = document.querySelectorAll('style'); | |
for (var i = 0; i < styles.length; i++) { | |
var style = styles[i]; | |
var cssRules = style.sheet.cssRules; | |
for (var j = 0; j < cssRules.length; j++) { | |
var cssRule = cssRules[j]; | |
var cssText = cssRule.cssText; | |
var pattern = /^#([a-z0-9]{4,10}) ~ \* \{ display: none; \}/; | |
if (pattern.test(cssText)) { | |
var id = pattern.exec(cssText)[1]; | |
if (Aak.hasScript("w.addEventListener('load'," + id + ",false)")) { | |
Aak.aabs.abo2 = id; | |
break; | |
} | |
} | |
} | |
} | |
var win = Aak.uw; | |
for (var prop in win) { | |
try { | |
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') { | |
var method = win[prop]; | |
// Antiblock.org v3 & BetterStopAdblock | |
// issue: https://github.com/reek/anti-adblock-killer/issues/833 | |
if (method.deferExecution && | |
method.displayMessage && | |
method.getElementBy && | |
method.getStyle && | |
method.insert && | |
method.nextFunction) { | |
if (method.toggle) { | |
Aak.aabs.bsa = prop; | |
Aak.detected('BetterStopAdblock{dom}'); | |
} else { | |
Aak.aabs.abo3 = prop; | |
Aak.detected('Antiblock3{dom}'); | |
} | |
win[prop] = null; // kill instance | |
} | |
// BlockAdBlock | |
// site: blockadblock.com | |
// note: random instance name | |
// source: https://gist.github.com/Watilin/af75e0a2e82a2efb384bde9c7b41dec8 | |
// issues: https://github.com/reek/anti-adblock-killer/issues?q=label%3ABlockAdBlock | |
if (method.bab) { // variant 1 | |
Aak.detected('BlockAdBlock{dom:variant1}'); | |
win[prop] = null; | |
} else if (Object.keys(method).length === 3 && Object.keys(method).map(function (value, index) { | |
return value; | |
}).join().length === 32) { // variant 2 | |
Aak.detected('BlockAdBlock{dom:variant2}'); | |
win[prop] = null; | |
} | |
} | |
} catch (e) { | |
//console.log('error', prop) | |
} | |
} | |
// Anti-Adblockers | |
var aabs = { | |
// Plugins WordPress | |
NoAdBlock : '(/plugins/no-adblock/|/blockBlock/blockBlock.jquery.js)', | |
BetterStopAdblock : '(/plugins/better-stop-adblock/|bsa-script-doctype.js|bsa-script-no-doctype.js)', | |
AdBlockBlocker : '/plugins/wordpress-adblock-blocker/', | |
AntiBlockBukssaAyman : '/plugins/anti-block/', | |
BlockAlyzer : '/plugins/blockalyzer-adblock-counter/', | |
AdBlockingDetector : '/plugins/ad-blocking-detector/', | |
// Plugins Website | |
Adworkmedia : '(adworkmedia|loxtk|contentlockingnetworks).com/gLoader.php', | |
Adscendmedia : 'adscendmedia.com/gwjs.php', | |
FuckAdBlock : '(/fuckadblock.js|/blockadblock.js)', | |
jQueryAdBlock : '/jquery.adblock.js', | |
jQueryAdblockDetector : '/jquery.adblock-detector.js', | |
AdBlockAdvertisement : '/advertisement.js', | |
AdBlockAdvert : '/advert.js', | |
AdBlockAdvCustom : '/advertisement(.+).js', | |
AdBlockAdframe : '/adframe.js', | |
AntiAdBuster : '/anti-ad-buster.js', | |
RTKAntiAdblock : '/blockcake.js', | |
AdblockDetector : '/AdblockDetector/handler.min.js', | |
jQueryAntiAdsBlock : '/jquery.antiadsblock.js', | |
Adbuddy : '/js/adbuddy.min.js', | |
AntiADsBlocker : '/aadb/script.js' | |
}; | |
var scripts = document.scripts; | |
for (var y = 0; y < scripts.length; y++) { | |
var script = scripts[y]; | |
if (script.src) { | |
for (var key in aabs) { | |
if (new RegExp(aabs[key], 'i').test(script.src)) { | |
Aak.detected([key, script.src]); | |
break; | |
} | |
} | |
} | |
} | |
}, | |
onInsert : function (insertedNode) { | |
// All Nodes | |
if (Aak.opts.inserted) { | |
if (insertedNode.src || | |
insertedNode.id || | |
insertedNode.className && | |
!/firebug/.test(insertedNode.innerHTML)) { | |
// Node inserted | |
Aak.log(insertedNode); | |
} | |
} | |
// No-Adblock - http://www.no-adblock.com/ | |
if (insertedNode.id && | |
insertedNode.id.length == 4 && | |
/^[a-z0-9]{4}$/.test(insertedNode.id) && | |
insertedNode.nodeName == 'DIV' && | |
insertedNode.firstChild && | |
insertedNode.firstChild.id && | |
insertedNode.firstChild.id == insertedNode.id && | |
Aak.contains(insertedNode.innerHTML, 'no-adblock.com')) { | |
// Remove | |
Aak.detected('No-Adblock', false, location.href); | |
Aak.removeElement(insertedNode); | |
//Aak.log(insertedNode); | |
} | |
// StopAdblock - http://stopadblock.org/downloads/ | |
if (insertedNode.id && | |
insertedNode.id.length == 7 && | |
/^a[a-z0-9]{6}$/.test(insertedNode.id) && | |
insertedNode.nodeName == 'DIV' && | |
insertedNode.parentNode && | |
insertedNode.parentNode.id && | |
insertedNode.parentNode.id == insertedNode.id + '2' && | |
Aak.contains(insertedNode.innerHTML, 'stopadblock.org')) { | |
// Remove | |
Aak.detected('StopAdBlock', false, location.href); | |
Aak.removeElement(insertedNode); | |
//Aak.log(insertedNode); | |
} | |
// AntiAdblock (Packer) | |
var reIframeId = /^(zd|wd)$/; | |
var reImgId = /^(xd|gd)$/; | |
var reImgSrc = /\/ads\/banner.jpg/; | |
var reIframeSrc = /(\/adhandler\/|\/adimages\/|ad.html)/; | |
// Communs | |
if (insertedNode.id && | |
reImgId.test(insertedNode.id) && | |
insertedNode.nodeName == 'IMG' && | |
reImgSrc.test(insertedNode.src) || | |
insertedNode.id && | |
reIframeId.test(insertedNode.id) && | |
insertedNode.nodeName == 'IFRAME' && | |
reIframeSrc.test(insertedNode.src)) { | |
// Variant 1 | |
if (insertedNode.id == 'xd') { | |
Aak.detected('AntiAdblockPackerZdxd', false, location.href); | |
} // Variant 2 | |
else if (insertedNode.id == 'gd') { | |
Aak.detected('AntiAdblockPackerWdgd', false, location.href); | |
} | |
// Remove | |
//Aak.log(insertedNode); | |
Aak.removeElement(insertedNode); | |
} | |
// Adunblock - http://adunblock.com/ | |
var reId = /^[a-z]{8}$/; | |
var reClass = /^[a-z]{8} [a-z]{8}/; | |
var reBg = /^[a-z]{8}-bg$/; | |
var reMessage = /Il semblerait que vous utilisiez un bloqueur de publicité !/; | |
// Communs | |
if (typeof Aak.uw.vtfab != 'undefined' && | |
typeof Aak.uw.adblock_antib != 'undefined' && | |
insertedNode.parentNode && | |
insertedNode.parentNode.nodeName == 'BODY' && | |
insertedNode.id && | |
reId.test(insertedNode.id) && | |
insertedNode.nodeName == 'DIV' && | |
insertedNode.nextSibling && | |
insertedNode.nextSibling.className && | |
insertedNode.nextSibling.nodeName == 'DIV') { | |
// Full Screen Message (Premium) | |
// <div id="lfyhsvdq" class="tvwnoqdf svonexrk" style="top: 100px; opacity: 1; visibility: visible;"> | |
// <div class="tvwnoqdf-bg" style="display: block;"></div> | |
if (insertedNode.className && | |
reClass.test(insertedNode.className) && | |
reBg.test(insertedNode.nextSibling.className) && | |
insertedNode.nextSibling.style && | |
insertedNode.nextSibling.style.display != 'none') { | |
// Remove Message | |
Aak.detected("AdUnBlockPremium"); | |
Aak.removeElement(insertedNode.nextSibling); // overlay | |
Aak.removeElement(insertedNode); // box | |
} | |
// Top bar Message (Free) | |
// <div id="vixmgrly"> | |
// <div id="mfnhaiyx" class="lkrnvbyt"> | |
else if (insertedNode.nextSibling.id && | |
reId.test(insertedNode.nextSibling.id) && | |
reMessage.test(insertedNode.innerHTML)) { | |
// Remove Message | |
Aak.detected("AdUnBlockFree"); | |
Aak.removeElement(insertedNode); | |
} | |
} | |
// Antiblock - http://antiblock.org/ | |
var reMsgId = /^[a-z0-9]{4,10}$/i; | |
var reTag1 = /^(div|span|b|i|font|strong|center)$/i; | |
var reTag2 = /^(a|b|i|s|u|q|p|strong|center)$/i; | |
var reWords1 = /ad blocker|ad block|ad-block|adblocker|ad-blocker|adblock|bloqueur|bloqueador|Werbeblocker|adblockert|آدبلوك بلس|блокировщиком/i; | |
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; | |
// Antiblock.org (all version) | |
if (insertedNode.parentNode && | |
insertedNode.id && | |
insertedNode.style && | |
insertedNode.childNodes.length && | |
insertedNode.firstChild && | |
!insertedNode.firstChild.id && | |
!insertedNode.firstChild.className && | |
reMsgId.test(insertedNode.id) && | |
reTag1.test(insertedNode.nodeName) && | |
reTag2.test(insertedNode.firstChild.nodeName)) { | |
//Aak.log(insertedNode); | |
// Kill audio message | |
var audio = insertedNode.querySelector("audio[loop]"); | |
if (audio) { | |
audio.pause(); | |
Aak.detected('Antiblock{audio}'); | |
Aak.removeElement(audio); | |
} | |
// Antiblock.org v2 | |
// demo: http://tinyurl.com/h3mwta4 | |
else if ((Aak.aabs.abo2 && insertedNode.id == Aak.aabs.abo2) || | |
(insertedNode.firstChild.hasChildNodes() && reWords1.test(insertedNode.firstChild.innerHTML) && reWords2.test(insertedNode.firstChild.innerHTML))) { | |
Aak.detected('Antiblock2{insert}'); | |
Aak.removeElement(insertedNode); | |
} | |
// Antiblock.org v3 | |
// demo: http://tinyurl.com/qecfa7w | |
// case: http://tinyurl.com/zbrlr3a /* fork */ | |
else if ((Aak.aabs.abo3 && insertedNode.id == Aak.aabs.abo3) || | |
(insertedNode.firstChild.hasChildNodes() && insertedNode.firstChild.firstChild.nodeName == 'IMG' && /^data:image\/png;base64/.test(insertedNode.firstChild.firstChild.src))) { | |
Aak.uw[Aak.aabs.abo3] = null; | |
Aak.detected('Antiblock3{insert}'); | |
Aak.removeElement(insertedNode); | |
} | |
// BetterStopAdblock | |
// demo: http://tinyurl.com/js9zat4 | |
// source: http://pastebin.com/YimkrtKB | |
// issue: http://tinyurl.com/zetgbtx | |
else if (Aak.aabs.bsa && insertedNode.id == Aak.aabs.bsa) { | |
Aak.uw[Aak.aabs.bsa] = null; | |
Aak.detected('BetterStopAdblock{insert}'); | |
Aak.removeElement(insertedNode); | |
} | |
// Many false positive | |
else { | |
//Aak.removeElement(insertedNode); | |
} | |
} | |
} | |
} | |
}, | |
blockDetect : function () { | |
// Exclude domains | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1466 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/1263 | |
// issue: https://greasyfork.org/en/forum/discussion/8422/ | |
// issue: https://github.com/reek/anti-adblock-killer/issues/986 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/857 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/617 | |
// issue: https://greasyfork.org/fr/forum/discussion/5426 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/419 | |
// issue: https://github.com/reek/anti-adblock-killer/issues/377 | |
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"]; | |
var host = location.host; | |
var excluded = false; | |
excludes.forEach(function (exclude) { | |
if (new RegExp(exclude).test(host)) { | |
excluded = true; | |
if (Aak.opts.logExcluded) { | |
Aak.warn('Excluded'); | |
} | |
return false; | |
} | |
}); | |
// Include domains | |
// IsEventupported: http://tinyurl.com/oeez8c7 | |
if (!excluded) { | |
var handlerEvents = function () { | |
var rule = Aak.rules[name]; | |
rule.host.forEach(function (host) { | |
// Check host | |
if (new RegExp(host).test(location.host)) { | |
// Native mode | |
if (!Aak.useGM && Aak.isTopframe) { | |
Aak.warn('Run natively.'); | |
} | |
// Log rule used | |
if (rule.host[0] != '.*?') { | |
Aak.detected('rule', rule); | |
} | |
// Before DOM load | |
if (rule.onStart) { | |
rule.onStart(); | |
} | |
// On all statements | |
if (rule.onAlways) { | |
rule.onAlways(); // start | |
Aak.onEvent(window, 'DOMContentLoaded', rule.onAlways); // idle | |
Aak.onEvent(window, 'load', rule.onAlways); // end | |
} | |
// Before Script Executed | |
if (rule.onBeforeScript) { | |
// options: contains, search, replace, override, remove, external | |
var optionsBeforeScript = rule.onBeforeScript(); | |
if (typeof optionsBeforeScript == "object") { | |
var handlerBeforeScript = function (e, options) { | |
var isEvent = e instanceof window.Event; | |
var thisScript = (e.target || e.srcElement) || e; | |
options.forEach(function (o) { // hasAttribute | |
var src = o.external ? 'src' : 'innerHTML'; | |
var search = new RegExp(o.contains, o.flags || ''); | |
if (thisScript[src] && thisScript[src].length && search.test(thisScript[src])) { | |
// Stop script execution | |
if (isEvent) { | |
e.preventDefault(); | |
e.stopPropagation(); | |
} | |
// Create new script | |
var parent = thisScript.parentNode; | |
var newScript = document.createElement('script'); | |
// Replace a part of the script | |
if (o.replace) { | |
newScript[src] = thisScript[src].replace(search, o.replace); | |
parent.replaceChild(newScript, thisScript); | |
} // Override script | |
else if (o.override) { | |
newScript[src] = o.override; | |
parent.replaceChild(newScript, thisScript); | |
} // Remove script | |
else if (o.remove) { | |
parent.removeChild(thisScript); | |
} | |
if (o.detected) { | |
Aak.detected(o.detected); | |
} | |
if (Aak.opts.logInterceptedScripts) { | |
Aak.log(src, o, thisScript, newScript); | |
} | |
} | |
}); | |
}; | |
// Browser supporting event beforescriptexecute | |
if ('onbeforescriptexecute' in document) { | |
Aak.onEvent(window, 'beforescriptexecute', function (e) { | |
handlerBeforeScript(e, optionsBeforeScript); | |
}); | |
} else { // Browser not suppoting beforescriptexecute | |
var loadDocument = function (optionsBeforeScript) { | |
//if (document.referrer === '') | |
//return; | |
Aak.warn('onbeforescript-compatible'); | |
// Stop loading | |
Aak.addScript('window.stop();'); // chrome/opera | |
//Aak.addScript('document.open();'); // firefox | |
// Get content | |
Aak.request({ | |
url : location.href, | |
headers : { | |
"Referer" : document.referrer | |
}, | |
onload : function (result) { | |
var html = result.responseText; | |
var parser = new window.DOMParser(); | |
var doc = parser.parseFromString(html, "text/html"); | |
var scripts = doc.scripts; | |
for (var i = 0; i < scripts.length; i++) { | |
var thisScript = scripts[i]; | |
handlerBeforeScript(thisScript, optionsBeforeScript); | |
} | |
// Convert to string | |
html = doc.documentElement.outerHTML; | |
// Write new content to HTML document: | |
Aak.addScript('document.open(); document.write(unescape("' + window.escape(html) + '")); document.close();'); // chrome/opera | |
//Aak.addScript('document.write(unescape("' + escape(html) + '")); document.close();'); // firefox | |
} | |
}); | |
}; | |
loadDocument(optionsBeforeScript); | |
} | |
} | |
} // After Script Executed | |
if (rule.onAfterScript) { | |
if ('onafterscriptexecute' in document) { // Mozilla Firefox | |
Aak.onEvent(window, 'afterscriptexecute', rule.onAfterScript); | |
} | |
} | |
// When DOM Load | |
if (rule.onIdle) { | |
if (!Aak.useGM) { // Native mode | |
rule.onIdle(); | |
} else { | |
//Aak.onEvent(window, 'DOMContentLoaded', rule.onIdle); | |
Aak.onEvent(window, 'DOMContentLoaded', rule.onIdle); | |
} | |
} | |
// When Window Load | |
if (rule.onEnd) { | |
if (!Aak.useGM) { // Native mode | |
rule.onEnd(); | |
} else { | |
Aak.onEvent(window, 'load', rule.onEnd); | |
} | |
} | |
// When DOM AttrModified | |
if (rule.onAttrModified) { | |
Aak.onEvent(window, 'DOMAttrModified', rule.onAttrModified, false); | |
} | |
// When DOM SubtreeModified | |
if (rule.onSubtreeModified) { | |
Aak.onEvent(window, 'DOMSubtreeModified', rule.onSubtreeModified, false); | |
} | |
// When DOM Elements are Inserted in Document | |
if (rule.onInsert) { | |
// Mutation Observer | |
// doc: http://tinyurl.com/mxxzee4 | |
// support: http://tinyurl.com/nepn7vy | |
if (typeof window.MutationObserver != 'undefined' || | |
typeof WebKitMutationObserver != 'undefined') { | |
// Mutation Observer | |
var MutationObserver1 = window.MutationObserver || window.WebKitMutationObserver; | |
// Create an observer instance | |
var obs1 = new MutationObserver1(function (mutations) { | |
// We can safely use `forEach` because we already use mutation | |
// observers that are more recent than `forEach`. (source: MDN) | |
mutations.forEach(function (mutation) { | |
// we want only added nodes | |
if (mutation.addedNodes.length) { | |
Array.prototype.forEach.call(mutation.addedNodes, function (addedNode) { | |
if (Aak.opts.logInsertedNodes) { | |
Aak.log(addedNode); | |
} | |
rule.onInsert(addedNode); | |
}); | |
} | |
}); | |
}); | |
// Observer | |
obs1.observe(document, { | |
childList : true, | |
subtree : true | |
}); | |
} | |
// Mutation Events (Alternative Solution) | |
// doc: http://tinyurl.com/op95rfy | |
else { | |
Aak.onEvent(window, "DOMNodeInserted", function (e) { | |
if (Aak.opts.logInsertedNodes) { | |
Aak.log(e.target); | |
} | |
rule.onInsert(e.target); | |
}, false); | |
} | |
} | |
// When DOM Elements are Removed in Document | |
if (rule.onRemove) { | |
// Mutation Observer | |
// doc: http://tinyurl.com/mxxzee4 | |
// support: http://tinyurl.com/nepn7vy | |
if (typeof window.MutationObserver != 'undefined' || | |
typeof WebKitMutationObserver != 'undefined') { | |
// Mutation Observer | |
var MutationObserver2 = window.MutationObserver || window.WebKitMutationObserver; | |
// Create an observer instance | |
var obs2 = new MutationObserver2(function (mutations) { | |
// We can safely use `forEach` because we already use mutation | |
// observers that are more recent than `forEach`. (source: MDN) | |
mutations.forEach(function (mutation) { | |
// we want only removed nodes | |
if (mutation.removedNodes.length) { | |
Array.prototype.forEach.call(mutation.removedNodes, function (removedNode) { | |
if (Aak.opts.logRemovedNodes) { | |
Aak.log(removedNode); | |
} | |
rule.onRemove(removedNode); | |
}); | |
} | |
}); | |
}); | |
// Observer | |
obs2.observe(document, { | |
childList : true, | |
subtree : true | |
}); | |
} | |
// Mutation Events (Alternative Solution) | |
// doc: http://tinyurl.com/op95rfy | |
else { | |
Aak.onEvent(window, "DOMNodeRemoved", function (e) { | |
if (Aak.opts.logRemovedNodes) { | |
Aak.log(e.target); | |
} | |
rule.onRemove(e.target); | |
}, false); | |
} | |
} | |
// Aak Events | |
Aak.onEvent(window, 'detected', function (e) { | |
Aak.info(['AntiAdbKiller', Aak.isTopframe ? 'topframe' : 'subframe', location.host, e.detail]); | |
}); | |
} | |
}); | |
}; | |
// Apply rules | |
for (var name in Aak.rules) { | |
if (Aak.rules.hasOwnProperty(name)) { | |
handlerEvents(Aak, name); | |
} | |
} | |
} | |
} | |
}; | |
Aak.initialize(); | |
})(window); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Auto Close YouTube Ads | |
// @namespace http://fuzetsu.acypa.com | |
// @version 1.1.17 | |
// @description Close and/or Mute YouTube ads automatically! | |
// @author fuzetsu | |
// @match https://*.youtube.com/* | |
// @grant GM_getValue | |
// @grant GM_setValue | |
// @grant GM_deleteValue | |
// @grant GM_registerMenuCommand | |
// @require https://greasyfork.org/scripts/5679-wait-for-elements/code/Wait%20For%20Elements.js?version=141779 | |
// ==/UserScript== | |
var Util = { | |
log: function () { | |
var args = [].slice.call(arguments); | |
args.unshift('%c' + SCRIPT_NAME + ':', 'font-weight: bold;color: purple;'); | |
console.log.apply(console, args); | |
}, | |
clearTicks: function(ticks) { | |
ticks.forEach(function(tick) { | |
if(typeof tick === 'number') { | |
clearInterval(tick); | |
} else { | |
tick.stop(); | |
} | |
}); | |
ticks.length = 0; | |
}, | |
keepTrying: function(wait, action) { | |
var tick = setInterval(function() { | |
if(action()) { | |
clearInterval(tick); | |
} | |
}, wait); | |
}, | |
storeGet: function(key) { | |
if (typeof GM_getValue === "undefined") { | |
var value = localStorage.getItem(key); | |
if (value === "true" || value === "false") { | |
return (value === "true") ? true : false; | |
} | |
return value; | |
} | |
return GM_getValue(key); | |
}, | |
storeSet: function(key, value) { | |
if (typeof GM_setValue === "undefined") { | |
return localStorage.setItem(key, value); | |
} | |
return GM_setValue(key, value); | |
}, | |
storeDel: function(key) { | |
if (typeof GM_deleteValue === "undefined") { | |
return localStorage.removeItem(key); | |
} | |
return GM_deleteValue(key); | |
}, | |
q: function(query, context) { | |
return (context || document).querySelector(query); | |
}, | |
qq: function(query, context) { | |
return [].slice.call((context || document).querySelectorAll(query)); | |
}, | |
}; | |
var SCRIPT_NAME = 'Auto Close YouTube Ads'; | |
var SEC_WAIT = parseInt(Util.storeGet('SEC_WAIT')); | |
var MUTE_AD = Util.storeGet('MUTE_AD'); | |
var HIDE_AD = Util.storeGet('HIDE_AD'); | |
var MUTE_BUTTON_SELECTOR = '.ytp-mute-button'; | |
var MUTE_INDICATOR_SELECTOR = '.ytp-volume-slider-handle'; | |
var ticks = []; | |
var videoUrl; | |
if(!MUTE_AD && MUTE_AD !== false) MUTE_AD = true; | |
if(!SEC_WAIT && SEC_WAIT !== 0) SEC_WAIT = 3; | |
function waitForAds() { | |
ticks.push( | |
waitAndClick('.videoAdUiSkipButton', function(btn) { | |
Util.keepTrying(1000, function() { | |
btn.click(); | |
if(!Util.q('.videoAdUiSkipButton')) { | |
return true; | |
} | |
}); | |
}), | |
waitAndClick('a.close-button', function(btn) { | |
Util.q('div.recall-button').remove(); | |
}) | |
); | |
if(MUTE_AD) { | |
ticks.push(waitForElems('.videoAdUi', function(ad) { | |
if(HIDE_AD) { | |
ad.style.zIndex = 10; | |
ad.style.background = 'black'; | |
} | |
var muteButton = Util.q(MUTE_BUTTON_SELECTOR); | |
var muteIndicator = Util.q(MUTE_INDICATOR_SELECTOR); | |
if(!muteIndicator) return Util.log('unable to determine mute state, skipping mute'); | |
if( muteIndicator.style.left === '0px') { | |
Util.log('Video ad detected, audio already muted so respecting user setting'); | |
return; | |
} | |
// mute the ad | |
muteButton.click(); | |
Util.log('Video ad detected, muting audio'); | |
// wait for the ad to dissapear before unmuting | |
Util.keepTrying(500, function() { | |
if(!Util.q('.videoAdUi')) { | |
if(muteIndicator.style.left === '0px') { | |
muteButton.click(); | |
Util.log('Video ad ended, unmuting audio'); | |
} else { | |
Util.log('Video ad ended, audio already unmuted'); | |
} | |
return true; | |
} | |
}); | |
})); | |
} | |
} | |
function waitAndClick(sel, cb, extraWait) { | |
return waitForElems(sel, function(btn) { | |
Util.log('Found ad, closing in', SEC_WAIT, 'seconds'); | |
setTimeout(function() { | |
btn.click(); | |
if(cb) { | |
cb(btn); | |
} | |
}, SEC_WAIT * 1000 + (extraWait || 0)); | |
}); | |
} | |
Util.log('Started'); | |
if(window.self === window.top) { | |
waitForUrl(/^https:\/\/www\.youtube\.com\/watch\?.*v=.+/, function() { | |
if(videoUrl && location.href !== videoUrl) { | |
Util.log('Changed video, removing old wait'); | |
Util.clearTicks(ticks); | |
} | |
videoUrl = location.href; | |
Util.log('Entered video, waiting for ads'); | |
waitForAds(); | |
ticks.push( | |
waitForUrl(function(url) { | |
return url !== videoUrl; | |
}, function() { | |
videoUrl = null; | |
Util.clearTicks(ticks); | |
Util.log('Left video, stopped waiting for ads'); | |
}, true) | |
); | |
}); | |
} else { | |
if(/https:\/\/www\.youtube\.com\/embed\//.test(location.href)) { | |
Util.log('Found embedded video, waiting for ads'); | |
waitForAds(); | |
} | |
} | |
// register menu commands | |
GM_registerMenuCommand(SCRIPT_NAME + ': set ad close delay', function() { | |
var wait = parseInt(prompt('Current setting is ' + SEC_WAIT + ' seconds. Enter the number of seconds you would like the script to wait before closing an ad. 0 means no delay.')); | |
if(!isNaN(wait)) { | |
SEC_WAIT = wait; | |
Util.storeSet('SEC_WAIT', SEC_WAIT); | |
} | |
}); | |
GM_registerMenuCommand(SCRIPT_NAME + ': ' + (MUTE_AD ? 'disable' : 'enable') + ' video ad muting (warning clicking this will refresh the page)', function() { | |
Util.storeSet('MUTE_AD', !MUTE_AD); | |
location.reload(); | |
}); | |
GM_registerMenuCommand(SCRIPT_NAME + ': ' + (HIDE_AD ? 'disable' : 'enable') + ' video ad hiding (warning clicking this will refresh the page)', function() { | |
Util.storeSet('HIDE_AD', !HIDE_AD); | |
location.reload(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name FB | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://www.facebook.com* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
document.getElementById('pagelet_ego_pane').remove(); | |
// Selectors | |
var streamSelector = 'div[id^="topnews_main_stream"]'; | |
var storySelector = 'div[id^="hyperfeed_story_id"]'; | |
var searchedNodes = [{ | |
// Sponsored | |
'selector': [ | |
'.fbUserPost span > div > a:not([title]):not([role]):not(.UFICommentActorName):not(.uiLinkSubtle):not(.profileLink)' | |
], | |
'content': { | |
'en': ['Sponsored', 'Chartered'], | |
'vi': ['Được tài trợ'] | |
} | |
}, { | |
// Suggested Post | |
'selector': [ | |
'.fbUserPost div > div > span > span' | |
], | |
'content': { | |
'en': ['Suggested Post', 'Reccomended fer ye eye'], | |
'vi': ['Bài viết được đề xuất'] | |
} | |
}, { | |
// Popular Live Video // A Video You May Like | |
'selector': [ | |
'.fbUserPost div > div > div:not(.userContent)' | |
], | |
'exclude': function(node) { | |
if(!node) { | |
return true; | |
} | |
return (node.children && node.children.length); | |
}, | |
'content': { | |
'en': ['Popular Live Video', 'A Video You May Like'], | |
'vi': ['Video trực tiếp phổ biến', 'Một video bạn có thể thích'] | |
} | |
}]; | |
var language = document.documentElement.lang; | |
var nodeContentKey = (('innerText' in document.documentElement) ? 'innerText' : 'textContent'); | |
var mutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver; | |
// Default to 'en' when the current language isn't yet supported | |
var i; | |
for(i = 0; i < searchedNodes.length; i++) { | |
if(searchedNodes[i].content[language]) { | |
searchedNodes[i].content = searchedNodes[i].content[language]; | |
} | |
else { | |
searchedNodes[i].content = searchedNodes[i].content.en; | |
} | |
} | |
var body; | |
var stream; | |
var observer; | |
function block(story) { | |
if(!story) { | |
return; | |
} | |
story.remove(); | |
} | |
function isSponsored(story) { | |
if(!story) { | |
return false; | |
} | |
var nodes; | |
var nodeContent; | |
var typeIterator; | |
var selectorIterator; | |
var nodeIterator; | |
var targetIterator; | |
for(typeIterator = 0; typeIterator < searchedNodes.length; typeIterator++) { | |
for(selectorIterator = 0; selectorIterator < searchedNodes[typeIterator].selector.length; selectorIterator++) { | |
nodes = story.querySelectorAll(searchedNodes[typeIterator].selector[selectorIterator]); | |
for(nodeIterator = 0; nodeIterator < nodes.length; nodeIterator++) { | |
nodeContent = nodes[nodeIterator][nodeContentKey]; | |
if(nodeContent) { | |
for(targetIterator = 0; targetIterator < searchedNodes[typeIterator].content.length; targetIterator++) { | |
if(searchedNodes[typeIterator].exclude && searchedNodes[typeIterator].exclude(nodes[nodeIterator])) { | |
continue; | |
} | |
if(nodeContent.trim() == searchedNodes[typeIterator].content[targetIterator]) { | |
return true; | |
} | |
} | |
} | |
} | |
} | |
} | |
return false; | |
} | |
function process() { | |
// Locate the stream every iteration to allow for FB SPA navigation which | |
// replaces the stream element | |
stream = document.querySelector(streamSelector); | |
if(!stream) { | |
return; | |
} | |
var stories = stream.querySelectorAll(storySelector); | |
if(!stories.length) { | |
return; | |
} | |
var i; | |
for(i = 0; i < stories.length; i++) { | |
if(isSponsored(stories[i])) { | |
block(stories[i]); | |
} | |
} | |
} | |
if(mutationObserver) { | |
body = document.querySelector('body'); | |
if(!body) { | |
return; | |
} | |
observer = new mutationObserver(process); | |
observer.observe(body, { | |
'childList': true, | |
'subtree': true | |
}); | |
} | |
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Google Domain Blocker | |
// @namespace http://jobson.us | |
// @description Blocks irrelevant and spam domains. | |
// @license http://creativecommons.org/licenses/by-nc-sa/3.0/ | |
// @downloadURL https://github.com/pjobson/pjUserscripts/raw/master/Google_Domain_Blocker.user.js | |
// @version 2013.09.08 | |
// @include https://google.com* | |
// @exclude *tbm=shop* | |
// @exclude *://plus.* | |
// @exclude *://mail.* | |
// @require http://code.jquery.com/jquery-latest.min.js | |
// @grant GM_addStyle | |
// @grant GM_deleteValue | |
// @grant GM_getValue | |
// @grant GM_setValue | |
// @grant GM_registerMenuCommand | |
// @grant GM_xmlhttpRequest | |
// ==/UserScript== | |
var console = console || $.noop; | |
var g = { | |
mobserver: null, | |
update: { | |
localVer: GM_info.script.version, | |
remoteVer: null, | |
downloadURL: GM_info.scriptMetaStr.match(/.+@downloadURL\s+(.+)/)[1], | |
lastCheck: 0, | |
now: new Date().getTime() | |
}, | |
prefs: { | |
blEnable: true, | |
blDisplay: true, | |
blRegex: false, | |
blMalware: true, | |
blNews: false, | |
blRelated: false, | |
blPrefShow: false, | |
blPosition: { | |
right: 5, | |
top: ($('#mngb').height()+2) | |
} | |
}, | |
blacklist: [], | |
hiddenText: '<li class="hidtxt"><span class="domain">xxx</span> blacklisted</li>', | |
init: function() { | |
g.checkForUpdate(); | |
g.loadPrefs(); | |
g.eventListeners(); | |
g.addStyles(); | |
g.blacklist = g.getBlacklist(); | |
g.makeBlacklistControls(); | |
g.searchDIV; | |
g.urlUnFuck(); | |
if (g.prefs.blPrefShow===true) { | |
$('div#blTop').show(); | |
} | |
// Debug: Empty Blacklist | |
// GM_setValue('blacklist',''); | |
if (g.prefs.blEnable===true) { | |
g.mutationObservation(); | |
//setTimeout(g.events.hideResults,1000); | |
} | |
if (g.prefs.blDisplay===false) { | |
GM_addStyle('div#ires ol li.hidtxt { display: none; }'); | |
} | |
}, | |
mutationObservation: function() { | |
g.mobserver = new MutationObserver(function(mutations) { | |
//console.log(mutations); | |
g.events.hideResults(); | |
g.mobserver.disconnect(); | |
}); | |
var config = { attributes: false, childList: true, characterData: true, subtree: true }; | |
g.mobserver.observe(document.querySelector('body'),config); | |
}, | |
checkForUpdate: function() { | |
g.update.remoteVer = GM_getValue('remoteVer') || g.update.localVer; | |
g.update.lastCheck = parseInt(GM_getValue('lastCheck'),10) || 0; | |
if (g.update.now - g.update.lastCheck > 1296000000) { | |
// Last update older than 15 days | |
// 1296000000 = 15 days in ms | |
GM_xmlhttpRequest({ | |
method: "GET", | |
url: g.update.downloadURL, | |
onload: function(response) { | |
g.update.remoteVer = response.responseText.match(/@version\s+(.+)/)[1]; | |
g.update.lastCheck = g.update.now; | |
GM_setValue('remoteVer',g.update.remoteVer); | |
GM_setValue('lastCheck',g.update.lastCheck.toString()); | |
g.checkForUpdate(); | |
} | |
}); | |
return; | |
} else if (g.update.remoteVer !== g.update.localVer) { | |
// remote different from local | |
var tmp,remoteVerDate,localVerDate; | |
tmp = g.update.remoteVer.split('.'); | |
remoteVerDate = new Date(tmp[0],tmp[1],tmp[2]).getTime(); | |
tmp = g.update.localVer.split('.'); | |
localVerDate = new Date(tmp[0],tmp[1],tmp[2]).getTime(); | |
if (localVerDate < remoteVerDate) { | |
// Local version is older than remote version prompt for get new version | |
$('#gbx3').append('<div id="blUpdateMe"><strong>'+ GM_info.script.name +'</strong> Update Available<div>'); | |
$('#blUpdateMe').on('click',function() { | |
window.location.href = g.update.downloadURL; | |
}); | |
} | |
return; | |
} | |
}, | |
events: { | |
hideResults: function() { | |
if (g.prefs.blRelated) { | |
$('div#extrares').replaceWith(g.hiddenText.replace(/xxx/,'related')) | |
} | |
// Hide ads | |
$('#tvcap').remove(); | |
$('#bottomads').remove(); | |
$('.ads-container').remove(); | |
// Hide the results using the blacklist. | |
$('li.g').each(function() { | |
// Old results | |
if ($(this).is(":visible") === false) return; | |
if ($(this).hasClass('psli') === true) return; | |
var cite = $(this).find('cite'); | |
var domain = $(cite).text().replace(/^https:\/\//,'').split(' ')[0].split('/')[0]; | |
// Malware check based on blMalware pref. | |
if (g.prefs.blMalware === true && /This site may harm your computer./.test($(this).parent().parent().find('a[onmousedown]').html()) === true) { | |
g.events.hideThis(cite,'malware'); | |
return; | |
} | |
// News Display Check based on blNews pref | |
if (g.prefs.blNews === true && ($(this).parents('li.g').attr('id') === 'newsbox' || $(this).attr('id') === 'newsbox')) { | |
g.events.hideThis(cite,'news'); | |
return; | |
} | |
var h = false; | |
$.each(g.blacklist,function(i,key) { | |
if (/^\/.+\/$/.test(key)) { | |
// Regular expression | |
var re = new RegExp(key.replace(/\//g,''),'i'); | |
if (re.test(domain)) { | |
h = true; | |
} | |
} else if (key.toLowerCase() === domain.toLowerCase()) { | |
h = true; | |
} | |
}); | |
// If hide is true hide this item. | |
if (h===true) { | |
g.events.hideThis(cite,domain); | |
} | |
}); | |
$('div#res ol#rso li.g').on('mouseenter',g.events.serpMouseOver); | |
}, | |
serpMouseOver: function() { | |
if ($(this).find('.blLink').length > 0) return; | |
if ($(this).attr('id')) return; | |
if ($(this).siblings().height() > ($(this).height() * 3)) return; | |
if ($(this).find('.vspib').length > 0) return; | |
if ($(this).hasClass('obcontainer')) return; | |
$(this).append($('<div class="rotated"><span class="blLink">Blacklist\u00a0Domain</span></div>').on('click',g.events.blacklistThisDomain)); | |
}, | |
serpMouseLeave: function() { | |
$(this).find('div.rotated').remove(); | |
}, | |
showHideBlacklist: function() { | |
$('div#blTop').toggle(); | |
}, | |
blacklistThisDomain: function() { | |
// Blacklist this domain, show the confirmation | |
$(this).parents('li.g').find('div.cover').remove(); | |
$(this).parents('li').append( | |
$('<div class="cover"><div class="blConfirm">Confirm:\u00a0<span class="blyes">Yes</span>\u00a0/\u00a0<span class="blno">No</span></div></div>').height($(this).parents('li').height()).width($(this).parents('li').width()) | |
); | |
$('span.blyes,span.blno').on('click',g.events.confirmation); | |
}, | |
confirmation: function() { | |
// Shows confirmation for adding a domain to the list | |
if ($(this).hasClass('blyes')) { | |
var domain = $(this).parents('li.g').find('cite:first').text().replace(/^https:\/\//,'').replace(/[\/\s].+/,'').replace(/\/$/,''); | |
if (g.prefs.blRegex===true) { | |
var tld = ''; | |
var re; | |
$.each(g.tld,function() { | |
if (tld!='') return; | |
re = new RegExp('(.+)'+ this.replace(/\./g,'\\.') +'$','i'); | |
if(re.test(domain)) { | |
tld = this.toString(); | |
} | |
}); | |
domain = '/([a-z0-9\\.]+)*'+ (domain.replace(re,'$1').split('.').pop()) + tld.replace(/\./g,'\\.') +'$/'; | |
} | |
domain = $.trim(domain); | |
g.events.addToBlackList(domain); | |
} | |
$(this).parents('div.cover').remove(); | |
}, | |
manualAdd: function(ev) { | |
// manually add a domain to the blacklist | |
if ($('input#blAddBox').val() === '') return; | |
// I'm lazy, so I'm using the same function for keypress and a click | |
if(ev.keyCode != 13 && $(this).attr('id')== 'blAddBox') return; | |
g.events.addToBlackList($('input#blAddBox').val()); | |
$('input#blAddBox').val(''); | |
}, | |
removeFromBlackList: function() { | |
// Removes an entry from the blacklist | |
var domain = $(this).parent().find('span.domain').text(); | |
g.blacklist = g.blacklist.remove(domain); | |
g.events.saveBlacklist(); | |
// Show the results first, stop duplication errors. | |
g.events.showResults(); | |
g.events.hideResults(); | |
g.buildList(); | |
}, | |
togglePref: function(ev) { | |
var pref = $(this).parent().attr('id'); | |
if ($(this).hasClass('blOn')) { | |
$(this).removeClass('blOn'); | |
$(this).addClass('blOff'); | |
g.prefs[pref] = false; | |
} else { | |
$(this).removeClass('blOff'); | |
$(this).addClass('blOn'); | |
g.prefs[pref] = true; | |
} | |
GM_setValue(pref,g.prefs[pref]); | |
g.events.doPref(pref); | |
}, | |
doPref: function(pref) { | |
switch (pref) { | |
case 'blEnable': | |
window.location.reload() | |
break; | |
case 'blDisplay': | |
if (g.prefs[pref]===false) { | |
GM_addStyle('div#ires ol li.hidtxt { display: none; }'); | |
} else { | |
GM_addStyle('div#ires ol li.hidtxt { display: block; }'); | |
} | |
break; | |
case 'blRegex': | |
// Regex only happens when user clicks Blacklist Domain | |
break; | |
default: break; | |
} | |
}, | |
selectText: function() { | |
// For some reason in GM 0.9.6 an exception is thrown here. | |
try { | |
$('textarea#blPortBox').select(); | |
} catch(er) {} | |
}, | |
export: function() { | |
$('#blPortBox').val(JSON.stringify(g.blacklist)); | |
$('textarea#blPortBox').on('click',g.events.selectText); | |
}, | |
import: function() { | |
$('textarea#blPortBox').off('click'); | |
$.each(JSON.parse($('#blPortBox').val()),function() { | |
g.events.addToBlackList(this.toString()); | |
}); | |
$('#blPortBox').val(''); | |
}, | |
saveBlacklist: function() { | |
// Saves g.blacklist to greasemonkey blacklist | |
GM_setValue('blacklist',g.blacklist.join(',')); | |
}, | |
addToBlackList: function(domain) { | |
// Adds an entry to the blacklist | |
g.blacklist.push(domain); | |
g.blacklist = g.blacklist.uniq().sort(); | |
// g.blacklist = $.unique(g.blacklist).sort(); | |
g.events.saveBlacklist(); | |
// Show the results first, stop duplication errors. | |
g.events.showResults(); | |
g.events.hideResults(); | |
g.buildList(); | |
}, | |
hideThis: function(cite,domain) { | |
domain = domain || ''; | |
if ($(cite).parents('li.g').prev().hasClass('hidtxt')) { | |
// Return if this domain is already blocked | |
return; | |
} else { | |
$(cite).parents('li.g').before(g.hiddenText.replace(/xxx/,domain)); | |
$(cite).parents('li.g').hide(); | |
} | |
}, | |
showResults: function() { | |
// Shows all results | |
$('li.hidtxt').remove(); | |
$('li.g').show(); | |
} | |
}, | |
loadPrefs: function() { | |
// Debug: unset all prefs. | |
// GM_deleteValue('blEnable'); | |
// GM_deleteValue('blRegex'); | |
// GM_deleteValue('blDisplay'); | |
// GM_deleteValue('blMalware'); | |
// GM_deleteValue('blNews'); | |
// GM_deleteValue('blRelated'); | |
// GM_deleteValue('blPrefShow'); | |
// If pref is undefined, set it as default otherwise use the set value | |
g.prefs.blEnable = GM_getValue('blEnable') || g.prefs.blEnable; | |
g.prefs.blDisplay = GM_getValue('blDisplay') || g.prefs.blDisplay; | |
g.prefs.blRegex = GM_getValue('blRegex') || g.prefs.blRegex; | |
g.prefs.blMalware = GM_getValue('blMalware') || g.prefs.blMalware; | |
g.prefs.blNews = GM_getValue('blNews') || g.prefs.blNews; | |
g.prefs.blRelated = GM_getValue('blRelated') || g.prefs.blRelated; | |
g.prefs.blPrefShow = GM_getValue('blPrefShow') || g.prefs.blPrefShow; | |
}, | |
eventListeners: function() { | |
// OnHashChange hide results | |
$(window).hashchange(function() { | |
setTimeout(g.events.hideResults,1000); | |
}); | |
// SERP item mouse over | |
$('div#res ol#rso li.g').on('mouseenter',g.events.serpMouseOver); | |
$('div#res ol#rso li.g').on('mouseleave',g.events.serpMouseLeave); | |
}, | |
addStyles: function() { | |
// Adds styles to the DOM | |
GM_addStyle("div.vspib { right: -10px !important; opacity: 0.5; }"); | |
GM_addStyle("div#blTop { background-color: white; z-index: 999; position: absolute; top: "+ (g.prefs.blPosition.top) +"px; right: "+ (g.prefs.blPosition.right) +"px; border: 1px solid black; width: 300px; padding: 0; }"); | |
GM_addStyle("li.hidtxt { color: gray; font-size: 0.60em; margin: 2px 0; }"); | |
GM_addStyle("li.hidtxt span.domain { text-decoration: line-through; }"); | |
GM_addStyle("li.domainEntry { list-style: none; margin: 2px 0; padding: 1px 0 1px 0; }"); | |
GM_addStyle("li.domainEntry span.domain { margin-left: 20px; }"); | |
GM_addStyle("div.ex { clear: none; position: absolute; cursor: pointer; background: transparent url("+ g.roundClose +") 0 0 no-repeat; height: 16px; width: 16px; } "); | |
GM_addStyle("span.blLink { color: FireBrick; cursor: pointer; font-size: 0.75em; } "); | |
GM_addStyle("span.blLink:hover { text-decoration: underline; } "); | |
GM_addStyle("div#blULContainer { cursor: default; height: 300px; overflow: auto; margin: 5px; position: relative;z-index: 2; background-color: #fff; }"); | |
GM_addStyle("div#blForm { margin-top: 5px; padding: 5px; }"); | |
GM_addStyle("div.blText { background-color: white; background-color: #C9D7F1; color: black; padding: 3px; text-align: center; font-weight: bold; cursor: move; -moz-user-select: none; }"); | |
GM_addStyle("div#blClose { position: absolute; height: 16px; width: 16px; top: 2px; right: 3px; cursor: pointer; background: transparent url("+ g.squareClose +") 0 0 no-repeat; }"); | |
GM_addStyle("input#blAddBox { width: 180px; }"); | |
GM_addStyle("input#blAddBtn { width: 40px; }"); | |
GM_addStyle("div#blPrefContainer { cursor: default; background-color: white; margin: 5px; z-index: 2; }"); | |
GM_addStyle("ul#blPrefList li { list-style: none; margin: 0; padding: 1px 0 10px 0; }"); | |
GM_addStyle("div#blPortContainer { cursor: default; background-color: white; margin: 5px; z-index: 2; text-align: center; }"); | |
GM_addStyle("div#blPortContainer button { font-size: 12px; }"); | |
GM_addStyle("div#blPortContainer textarea#blPortBox { width: 250px; height: 100px; font-family: courier new; font-size: 10px; }"); | |
GM_addStyle("span.blOn { float: right; width: 68px; height: 28px; overflow: hidden; cursor: pointer; background: transparent url("+ g.onoffData +") 0 0 no-repeat; }"); | |
GM_addStyle("span.blOff { float: right; width: 68px; height: 28px; overflow: hidden; cursor: pointer; background: transparent url("+ g.onoffData +") -68px 0 no-repeat; }"); | |
GM_addStyle("span.blDesc { font-size: 0.75em; }"); | |
GM_addStyle("div#blUpdated { margin: 3px; text-align: center; }"); | |
GM_addStyle("li.g { position: relative; background-color: transparent; }"); | |
GM_addStyle("div.rotated { background-color: transparent; -moz-transform: rotate(-90deg); -webkit-transform: rotate(-90deg); position: absolute; top: 30px; left: -46px; padding-bottom: 5px; padding-top: 5px; }"); | |
GM_addStyle("div.cover { background-color: transparent; top: 0; left: 0; position: absolute; text-align: center; background-image: url("+ g.transPNG +"); background-repeat: repeat-x repeat-y; }"); | |
GM_addStyle("div.cover div.blConfirm { text-align: left; color: white; background-color: transparent; padding: 10px; font-weight: bold; }"); | |
GM_addStyle("div.blConfirm span.blyes { color: #0E774A; cursor: pointer; }"); | |
GM_addStyle("div.blConfirm span.blno { color: #D13B3B; cursor: pointer; }"); | |
GM_addStyle("div#blUpdateMe { color: white; position: absolute; top: 0; right: 10px; font-size: 12px; z-index:100; cursor: pointer; }"); | |
}, | |
getBlacklist: function() { | |
// Gets the blacklist from greasemonkey | |
// Debug: for clearing out the blacklist | |
// GM_setValue('blacklist',''); | |
// End debug | |
return (GM_getValue('blacklist') ? GM_getValue('blacklist').split(',') : [] ); | |
}, | |
makeBlacklistControls: function() { | |
// Makes the controls for this script | |
// Adds an option to show the blacklist into the greasemonkey menu | |
GM_registerMenuCommand("Toggle Google Blacklist",g.events.showHideBlacklist); | |
$('body').append('<div id="blTop"><div class="blText">Your Blacklist<div id="blClose"></div></div><div id="blULContainer"><ul id="blacklist"></ul></div><div id="blForm"></div></div>'); | |
$('div#blClose').on('click',g.events.showHideBlacklist); | |
$('div#blForm').append('<input type="text" id="blAddBox" /><input type="button" value="add" id="blAddBtn" />'); | |
$('div#blForm').append('<br/><span class="blDesc">Regular expressions are supported, do not use i or g flags.'); | |
// Events | |
$('input#blAddBox').on('keyup',g.events.manualAdd); | |
$('input#blAddBtn').on('click',g.events.manualAdd); | |
// Preferences | |
var prefTxt = '<span class="blPref blOn"></span>'; | |
$('#blTop').append('<div class="blText">Preferences</div>'); | |
$('#blTop').append('<div id="blPrefContainer"><ul id="blPrefList"></ul></div>'); | |
$('#blPrefList').append('<li id="blEnable">Blacklist Enabled'+ prefTxt +'<br/><span class="blDesc">Toggles this userscript. This will reload the page..</span></li>'); | |
$('#blPrefList').append('<li id="blDisplay">Display Messages'+ prefTxt +'<br/><span class="blDesc">Shows "<span class="domain">domain</span> blacklisted" in SERP.</span></li>'); | |
$('#blPrefList').append('<li id="blRegex">RegEx Blocker'+ prefTxt +'<br/><span class="blDesc">Use regex to block full domain name.</span></li>'); | |
$('#blPrefList').append('<li id="blMalware">Auto Block Malware'+ prefTxt +'<br/><span class="blDesc">Auto-block sites listed as malware.</span></li>'); | |
$('#blPrefList').append('<li id="blNews">Blacklist News'+ prefTxt +'<br/><span class="blDesc">Blacklists google news widget.</span></li>'); | |
$('#blPrefList').append('<li id="blRelated">Blacklist Related'+ prefTxt +'<br/><span class="blDesc">Blacklists related results.</span></li>'); | |
$('#blPrefList').append('<li id="blPrefShow">Show Preferences'+ prefTxt +'<br/><span class="blDesc">Leaves prefs open for debugging.</span></li>'); | |
$.each(g.prefs, function(id) { | |
if (this==false) { | |
$('li#'+ id +' span.blPref').removeClass('blOn'); | |
$('li#'+ id +' span.blPref').addClass('blOff'); | |
} | |
}); | |
// Preference Toggle Events | |
$('span.blPref').on('click',g.events.togglePref); | |
// Import/Export | |
$('#blTop').append('<div class="blText">Import/Export</div>'); | |
$('#blTop').append('<div id="blPortContainer"></div>'); | |
$('#blPortContainer').append('<button id="blImport">Import</button> <button id="blExport">Export</button>'); | |
$('#blPortContainer').append('<br/>'); | |
$('#blPortContainer').append('<textarea id="blPortBox"></textarea>'); | |
// Import/Export Events | |
$('button#blImport').on('click',g.events.import); | |
$('button#blExport').on('click',g.events.export); | |
$('div#blTop').hide(); | |
g.buildList(); | |
}, | |
buildList: function() { | |
$('li.domainEntry').remove(); | |
if (g.blacklist.length==0) { | |
$('ul#blacklist').append('<li class="domainEntry"><i>No entries in your list.</i></li>'); | |
$('ul#blacklist').append('<li class="domainEntry"><i>Click "Blacklist Domain" in the SERP or add a domain below.</i></li>'); | |
} else { | |
$.each(g.blacklist,function(i,key) { | |
$('ul#blacklist').append('<li class="domainEntry"><div class="ex"></div><span class="domain">'+ key +'</span></li>'); | |
$('div.ex').on('click',g.events.removeFromBlackList); | |
}); | |
} | |
}, | |
urlUnFuck: function() { | |
$('a[onmousedown]').each(function(){ | |
if (/return rwt/.test($(this).attr('onmousedown').toSource()) === false) return; | |
$(this).replaceWith($('<a href="'+ $(this).attr('href') +'">'+ $(this).html() +'</a>')); | |
}); | |
}, | |
// Image from: http://www.webstuffshare.com/2010/03/stylize-your-own-checkboxes/ | |
onoffData: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIgAAAAcCAYAAAC6TfcHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAADPZJREFUeNrsm2tsXMd1x38zd+5jl8tdPpakKFqOFClVTKmWKKGSIyNOFLRBA8NyWrqQH3Bh95sQfyiM1J/6cIt+KGLHDVCgRtE0KVygqAFvC8QWIDWRQLl0LKlirAel6kXboh5LkWuSy9e+7p3bD7t3uSSXS0qmKzXgARZ3uXd3zp05/znn/M8cCt/3WZVVWUzk6hKsSi1R/58fPpFIfAk4AOwHWoFw6dYMMAy8DbwJXFtsjO7u7hXX193dfe3XBSCiVoj5xyOvG9KQ+6SUT0kpNgsptgshjPvhwc2JKPZMlM7OTtatW4dt2xhG8dE8zyOXy3H9+nUuXLiA1vqHwPc/D0ASicRrUsrvL1Mf91no9rTWp33fv+R53jta659prT3P83jxxRfvDiD/1PPGZqWMtwxl7DKUgTQkUggQAiHEvZvqjIkYt2mLPMAjjzyCUrWdoOu6HD9+nKHh5FHhy9eAQ3cCkEQi8bvAgba2tn13oi+VSmEYRhlE91J830drjdYaz/NwXfek67p/6Hnepeeff/7OAfKTY3/7smmpvzYtM2QoA2UaSCkRQnAvsaHHTLxRxde2f5329vby5AcHB0mlUhQKhaJ3MU3i8TgPPvhgGczJZJLe4/81KLXxF8A/LwcgiUTiBeDAnj17dt2NvhMnTmDbNpZl3Rcg8TwvAAj5fD7juu6fPv3002/cEUB++v6PfmBa6k8sx0KZCqUMDCURUhJg4154EJ0V5D41+caub9HU1ARAenycy1ev4HsaHxBQvArwfYEhJV/5yiZiDQ0AjI6OcuT9nyelp/YCl2oBJJFIbAbe2rt3767Po6+3t5doNHrPPElgX9/3yyBxXZdCoUA+n6dQKLy2f//+V5YFkJ/0vLHfcqx/sxwLyzZRpsIwJFJKENzT0JK7ZvDQmi42bdoEwMDAAGPj44iSpXyfsncLZhQ8bUNDAxs3bgTg6tWr/Or8fx8yXOs7SwDk77Zt2/bSSui7cuUK0Wj0nnuQSpAEAMnn8+RyuaefeeaZt2sC5MdHX7dM2/rYCVkdlmNhWiZKGQi5dM7RaLWwuaGLqF3cadO5SS7c7iOZuYbtWAgp2Nmyl+ncBB/d6sVyLAxlEDEb2Bzr4tztE0x7aZSpqurSGUHufxz27duHEIKbN2+SSo1UmKS8ClWs5uMjaInH6ejoQGvNu+++S17nuqQ2TlcDSCKR2KKU6l9JfQ0NDVXzl/b2dtrb2wmFQgCkUikGBgaYmZlBKUUkEmHDhg1VE99Tp07R2dlJJBJBaz3n3q1btxgeHsayrOIGnweUUpghn8+TzWav5vP5Lc8991x+UZorpXxKKaOjHFYMuSxwtDgddLV8ndGpEX5+/mfMZKfZsr6L33rwm/Rf7+Pi2EfU1Ydodtpodtq4nhzkVnqA+oYIhlI0h9qYHssyqaeJNdVjqIWuOD8s2bp1K0IItNak02mUMisMNi+PmvNxMRCk0xO0t7cjZXGsvv6TP0Ab315kWgdWWt/ly5cXeJH169fT0dFRZj9KKbZt28bu3bvp7e1lZmaG+vp6GhoauHLlChMTE3Ps8dlnnxEKhbAsi4sXL865l0qlyGQyxGKxOQAJvmMYBkoptNYopTa5rvsU8K+LAkRI+XiZrZTCynJCyuaGLqayE7z1n/9AoZCjLhrm1tlBALau28lHH59EGrMPuPPLe/j4w8uYdg7fKqJ+emKajMgSbYxU52jjgvYdxSRxZGQEZaiiNcquXhSvlZubYHPPBoBUKkVra2vRcGeNPTWm9XiQlK6UvnPnzs1RYNs2HR0dDA4OkkgksG2bcDjM0NAQTzzxBA8//DDvvfcejY2NAJw+fZqhoSEikUg5n3EcB9/3SafTHDt2jEgkguM4RcMqRX19ffW8osREDaNIPkrXx2sCREqxU0hRBEYp51hKHCNM2IzQc+EQuVyGtgdaaIzHEFJyZfQsm9Z+lbX1D3IzPQDAmaun+I11W9j95W/w4eAvaAl7xRCifbRYvHag86I88Vwuh7LMWffu+8U9W3b1PlQmkIBf+iObzQIQCoUQ2gjXmNraldbned4cBYHxent7sW2b9vZ2otEoWmsGBgbo6urCMIzyGFJK6uvraW1txTTN8meBd7Asi3g8Xh5XCIFSatHkuBIkQgiklF+rXUkVYo0s/Wi5qagj64qU7rOb1EXraIjHCEWKsbSQzxV3iumQSRUnOTGTpqfvMN/Z810uJ/vJZvLLzLAoL4SUErNkIDHvOwTGmU0HSkYrmU74lW621jTNL0DfHAmo78jICC0tLTQ2NpYNH4BJKUU+n69Kx48fP8709HQRzWvX8tJLL80JL319fZimOSe8LAaSUrToWPFSu+/rsiInVKTFZfBY4eApcF0v8FKcu97H1pHt/M72fRztP3jnZwNKlTatX3TpPviIip07u9Nnt3bxvriLk6cvSl/gLYUQhEKhOQmsbdvlewFYjh49yvDwMI7jIKVkamqqnNOkUikOHz6M4ziYpkmhUMB1XeLx+JKFvcpUr/Zhne8P6YAKLXPEifw4AFvWb0drf06IaA0VATk8lpxTXHNCNic+PYptOezZ/K3SjtFLHAhQztJt28Y0FaYyUcpEmSamqVCmwlQK0zQxlVG8miamCu4bWJZdCml6NjZUl8JK65vvRSYnJwF46KGHFjCUeDxeXLvh4TleIZVKMTk5ydTUFJZllT1OLpcjmUwyPj7O1NQUrusSCoWWrL0EjKZUZb1Z04No7ff52t+stcbXGpaRh2hcLg6d4Tc37CA5dp309G0sy6TebuSrjTuYzKS5NHie1o74LCINiW95nL52nO1feqRYns4Xavoyaflks1nC4TCO45DL5UoxvzLyV2cXogwFgW0X3Xo2m8WXekboRRfwVjabXb+S+ua7+rGxMcbGxnjsscc4dOgQmUyGcDhcTmovXrxIPp8vhyKlFLFYjDVr1mCaZjk0BJ4mHA7T0tJS9iqV+UktcHieF7zvqwkQX+uDnus9qz2N9jRaaqSozWSEFFxNn6PebOTbO55kMpPG9Qs0huNMZtK80/Mv2I5FJFY3N8Bbik+mL/DAxAbi0Ta0V9tnGQ0+yWSSjRs34jjOnIRvoalmPxGlbCDIBYLEM5lMoqX3S2NxgBxMJpPfW0l9Qdgoz8kwOHv2LDt27ODJJ59kdHQUx3EIh8Mkk0mOHDlCOByeU6Y3jFlPtWATSYkqebTlFs08zyufz2itDy7hQfQ7ruv9pVtwN0mjVFoXAmTtCqq0BO9/chD7Uj1t0bVIKZnMpDlz9RSGqWhe00RdfZieq+8xOPwpTqhYuLFskw+v/YLsWIGJwhhNdrTInqqI1arp7+9nw4YNSCmxbRvXc4GKxNGvknaWaYWPoVSJnvr09/cjtPFKjTV8s7+//3srqa+hVH6vNKjruhw+fJjm5mbq6uqQUnLz5k0GBwdxHIeWlhYKhQLHjh1jcnKSurq6Bba4dOkSqVQKx3GWVc6vDCuu6wavT7TW71TdnK+++ioAOzbs8X718QfDQoinAjZDKXMPlqUaUAJj5/wMyfEb3BodZGwmRV00THxNI7HmKKalyBSm0EITioRwwjaGMvClR87P4NTZ1EXD2LZVVYcwQed9VMGhqampSM0QyJKbDV5GiaIH1/LnpZ0XlMxvjFw7ZHjmDwE6OzsX6Ovs7Bw5f/58k23bu1dCXzqdLldK56+dbdtMTU2RTCYZGhoil8sRi8XKlNUwDDKZDKZplj1K5RoVCgUKhQLhcJhwOLwoSKqV2oNqaqFQOPDss8+eXZLF/NE3X377p+//aBfwsh8MWiqeBYd1i4EkUh/GCVllxlJcJIWQAl/7xcJNQx2iBDft6SK3j0XQvo8hZVHfIuHGiPucu3Ka5uZmGhsbS+zCx9d6IQWtqITLimrw2NgYH/X33TY864+XkYP//ZkzZx5tbm7e+Xn0nT9/nlgstqAUXsmSotEo4XB4Dr0NilhBqLJtuzxu5VhSSiKRSPl9NT3zwTHvsO6Nxc5hqtJct+C+4vv+qO/7f649bbl3eNyvKkrlrusu0r5SpY9CL8FkJMgmn56eHh599FFaW1uLz7PMU9Lh4WE++OADpDb+LDjJrSXd3d2XEonEmz09PT/+PPqCHGZ+oazqJiiNHZyV3KnU0lHluD/vuu5fua77N3fcDwL3ccPQlIlI27TVL79h6OTJk9wauvmh8OXrwL/PA0LN3ycSid+n2DD023ei7/bt2zUrmf/XJ7lVGoZe9Dzvwl01DAVSajn8vVLL4SYhxc57Co5KJlRqOdy6dSsdHR0LWgDz+Tw3btygv79/RVsOl6nvfms5RGvd5/v+J57nva21/g+ttae15oUXXrh7gNzvkkgkNlJsIv4DIM7cJuJRZpuWB2qEkhXX193dPcCviYjV/4tZlSVSv1VZlVWArMoqQFbli5D/HQA3gshqP9wDcQAAAABJRU5ErkJggg==', | |
// Square Close 16x16 | |
squareClose: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAKRSURBVHjafFNNSxtRFD1jJokT0XzYFEVTYtClJQqithTbtZv+hCoIrsTgpisxXXRRqG3pUtAu/QndWaGFfsaIlZqiUaRpMNrERJM0yUym540voC764Lx598295368exVwDQP3NeBFMxB2Um4iFFxdJlEnqkQJiJeByGfgnTJE4y63e+3x8jJC/f3QSyWYdaqa5lUGRYFis0HVNCS3tvB0chJH+fwD5R6wH11aCvr9flSzWRjVqmWsXPPeILE5HHC0tyOTyeDJ1NSB2goEvW43Cru70CsVGFLXJlNphF6/dK/mcvAFAhC2apvIaX8fOr07OzowPDuLVCyG76ursDciYNhD09Nweb1Yn58ncxPOdR0tgkxstVQKSrmMmjizBl2DgzAYTZx1sbtcuDMzg7bOThQOD2HSu0ilSn2XINCEh3QaKvOu8edHehiJRnFrdBQ66+ENBuHu7kaeUX5ZWICdDkQaldNTaA0CPZmEy+Oxci6T5H0kgruLiwiNjVkp5FifT3Nz0IpFOOUT10jQ3CAwNjeh9vZCbW21iljY28M5o/L19V0QJBKoU3bwLAjqZ2eokdQiEFsLC6Ls7IDNgTNGMrK2ZhmfxONoYwqh8XHg+BiJiQn4qCOIRP7COZ6zBDFih/jq8Zj5jQ1TLPF9S3k9HDaruZx1l1pZMb9RL0F8IJ6JV37FbZv4RSSpLFaRxhs0/imJt3mvk0RAyCnp9CWh6rJZxHM6GfLRwAAq/AYoN8t/Zcrpnh7Ymd7Nax2qFoCDP+yoGxTcosJUVi51ImSuBqtuCvCclTinre02kOflQ5tkNOTE/b2YOgtlKReJE+KA+EH85kRaMzMDPPJynP2AR/vPOBuS6AhgLIi8Bt78E2AAIgs1EDs3QMgAAAAASUVORK5CYII=', | |
// Round Close 16x16 | |
roundClose: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAEtQTFRF4ktG/Pz8+J+quJyQ3NTU9djb58bH59rXiVMn7MzVh2lZ+cfE6Mq22Jub7eTku1FPp3xr4Lm3fBMT8mddujMyzXh2nyEJ5isI////62JIbAAAAKZJREFUeNosj1dyBEEIQ5k8u3ZnELr/SU13WR+EV4ICYegxBdSeWQuZTS1dV4uUJ8ilpHZ/rs/dSskBTJMd7ef+PVJSozwoRh6tHaQVNDGMPXZZUDaDiUIWCe0mUOlwGYncuI/h6BO4lGko4u49Rtx1Gkh1xysVrtGNsU2CKmd35zbcBxkTpzAsHv0KqPP0L/xf+Ob1XO0Lodf1XOisb+9vPWf9J8AAjDQSeN44sCcAAAAASUVORK5CYII=', | |
// Transparent PNG | |
transPNG: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAABNJREFUeNpiYGBg2A8AAAD//wMAAMQAwD0vpSsAAAAASUVORK5CYII=', | |
// TLD List | |
tld: ['.areo','.asia','.biz','.cat','.com','.coop','.edu','.gov','.info','.int','.jobs','.mil','.mobi','.museum','.name','.net','.org','.pro','.tel','.travel','.xxx','.com.ac','.net.ac','.gov.ac','.org.ac','.mil.ac','.ac','.ad','.co.ae','.net.ae','.gov.ae','.ac.ae','.sch.ae','.org.ae','.mil.ae','.pro.ae','.name.ae','.ae','.af','.com.ag','.org.ag','.net.ag','.co.ag','.nom.ag','.ag','.off.ai','.com.ai','.net.ai','.org.ai','.ai','.com.al','.edu.al','.gov.al','.mil.al','.net.al','.org.al','.al','.com.am','.net.am','.org.am','.am','.an','.ed.ao','.gv.ao','.og.ao','.co.ao','.pb.ao','.it.ao','.ao','.aq','.com.ar','.edu.ar','.gob.ar','.gov.ar','.int.ar','.mil.ar','.net.ar','.org.ar','.tur.ar','.ar','.as','.gv.at','.ac.at','.co.at','.or.at','.at','.com.au','.net.au','.org.au','.edu.au','.gov.au','.csiro.au','.asn.au','.id.au','.au','.aw','.ax','.com.az','.net.az','.int.az','.gov.az','.org.az','.edu.az','.info.az','.pp.az','.mil.az','.name.az','.pro.az','.biz.az','.az','.web.ba','.org.ba','.net.ba','.edu.ba','.gov.ba','.mil.ba','.unsa.ba','.untz.ba','.unmo.ba','.unbi.ba','.unze.ba','.co.ba','.com.ba','.rs.ba','.ba','.co.bb','.com.bb','.net.bb','.org.bb','.gov.bb','.edu.bb','.info.bb','.store.bb','.tv.bb','.biz.bb','.bb','.com.bd','.edu.bd','.ac.bd','.net.bd','.gov.bd','.org.bd','.mil.bd','.bd','.be','.bf','.bg','.com.bh','.info.bh','.cc.bh','.edu.bh','.biz.bh','.net.bh','.org.bh','.gov.bh','.bh','.bi','.gouv.bj','.mil.bj','.edu.bj','.gov.bj','.asso.bj','.com.bj','.bj','.bm','.com.bn','.edu.bn','.gov.bn','.net.bn','.org.bn','.bn','.com.bo','.net.bo','.org.bo','.tv.bo','.mil.bo','.int.bo','.gob.bo','.gov.bo','.edu.bo','.bo','.adm.br','.adv.br','.agr.br','.am.br','.arq.br','.art.br','.ato.br','.b.br','.bio.br','.blog.br','.bmd.br','.cim.br','.cng.br','.cnt.br','.com.br','.coop.br','.ecn.br','.edu.br','.eng.br','.esp.br','.etc.br','.eti.br','.far.br','.flog.br','.fm.br','.fnd.br','.fot.br','.fst.br','.g12.br','.ggf.br','.gov.br','.imb.br','.ind.br','.inf.br','.jor.br','.jus.br','.lel.br','.mat.br','.med.br','.mil.br','.mus.br','.net.br','.nom.br','.not.br','.ntr.br','.odo.br','.org.br','.ppg.br','.pro.br','.psc.br','.psi.br','.qsl.br','.radio.br','.rec.br','.slg.br','.srv.br','.taxi.br','.teo.br','.tmp.br','.trd.br','.tur.br','.tv.br','.vet.br','.vlog.br','.wiki.br','.zlg.br','.br','.com.bs','.net.bs','.org.bs','.edu.bs','.gov.bs','.bs','.bt','.bv','.co.bw','.org.bw','.bw','.by','.com.bz','.edu.bz','.gov.bz','.net.bz','.org.bz','.bz','.ab.ca','.bc.ca','.mb.ca','.nb.ca','.nf.ca','.nl.ca','.ns.ca','.nt.ca','.nu.ca','.on.ca','.pe.ca','.qc.ca','.sk.ca','.yk.ca','.ca','.cc','.cd','.cf','.cg','.ch','.ci','.co.ck','.org.ck','.edu.ck','.gov.ck','.net.ck','.gen.ck','.biz.ck','.info.ck','.ck','.cl','.cm','.ac.cn','.com.cn','.edu.cn','.gov.cn','.mil.cn','.net.cn','.org.cn','.ah.cn','.bj.cn','.cq.cn','.fj.cn','.gd.cn','.gs.cn','.gz.cn','.gx.cn','.ha.cn','.hb.cn','.he.cn','.hi.cn','.hk.cn','.hl.cn','.hn.cn','.jl.cn','.js.cn','.jx.cn','.ln.cn','.mo.cn','.nm.cn','.nx.cn','.qh.cn','.sc.cn','.sd.cn','.sh.cn','.sn.cn','.sx.cn','.tj.cn','.tw.cn','.xj.cn','.xz.cn','.yn.cn','.zj.cn','.cn','.com.co','.org.co','.edu.co','.gov.co','.net.co','.mil.co','.nom.co','.co','.ac.cr','.co.cr','.ed.cr','.fi.cr','.go.cr','.or.cr','.sa.cr','.cr','.cu','.cv','.cx','.ac.cy','.net.cy','.gov.cy','.org.cy','.pro.cy','.name.cy','.ekloges.cy','.tm.cy','.ltd.cy','.biz.cy','.press.cy','.parliament.cy','.com.cy','.cy','.cz','.de','.dj','.dk','.dm','.art.do','.com.do','.edu.do','.gob.do','.gov.do','.mil.do','.net.do','.org.do','.sld.do','.web.do','.do','.com.dz','.org.dz','.net.dz','.gov.dz','.edu.dz','.asso.dz','.pol.dz','.art.dz','.dz','.com.ec','.info.ec','.net.ec','.fin.ec','.med.ec','.pro.ec','.org.ec','.edu.ec','.gob.ec','.gov.ec','.mil.ec','.ec','.ee','.com.eg','.edu.eg','.eun.eg','.gov.eg','.mil.eg','.name.eg','.net.eg','.org.eg','.sci.eg','.eg','.com.er','.edu.er','.gov.er','.mil.er','.net.er','.org.er','.ind.er','.er','.com.es','.nom.es','.org.es','.gob.es','.edu.es','.es','.com.et','.gov.et','.org.et','.edu.et','.net.et','.biz.et','.name.et','.info.et','.et','.europa.eu','.eu','.fi','.ac.fj','.biz.fj','.com.fj','.info.fj','.mil.fj','.name.fj','.net.fj','.org.fj','.pro.fj','.fj','.co.fk','.org.fk','.gov.fk','.ac.fk','.nom.fk','.net.fk','.fk','.fm','.fo','.tm.fr','.asso.fr','.nom.fr','.prd.fr','.presse.fr','.com.fr','.gouv.fr','.fr','.ga','.gb','.gd','.ge','.gf','.co.gg','.net.gg','.org.gg','.gg','.com.gh','.edu.gh','.gov.gh','.org.gh','.mil.gh','.gh','.gi','.gl','.gm','.com.gn','.ac.gn','.gov.gn','.org.gn','.net.gn','.gn','.com.gp','.net.gp','.mobi.gp','.edu.gp','.asso.gp','.org.gp','.gp','.gq','.co.gr','.com.gr','.edu.gr','.net.gr','.org.gr','.gov.gr','.mil.gr','.mod.gr','.sch.gr','.gr','.gs','.com.gt','.edu.gt','.net.gt','.gob.gt','.org.gt','.mil.gt','.ind.gt','.gt','.com.gu','.net.gu','.gov.gu','.org.gu','.edu.gu','.gu','.gw','.gy','.com.hk','.edu.hk','.gov.hk','.idv.hk','.net.hk','.org.hk','.hk','.hm','.hn','.hr','.ht','.co.hu','.gov.hu','.edu.hu','.hu','.ac.id','.co.id','.net.id','.or.id','.web.id','.sch.id','.mil.id','.go.id','.id','.ie','.ac.il','.co.il','.org.il','.net.il','.k12.il','.gov.il','.muni.il','.idf.il','.il','.im','.co.in','.firm.in','.net.in','.org.in','.gen.in','.ind.in','.ac.in','.edu.in','.res.in','.ernet.in','.gov.in','.mil.in','.in','.io','.gov.iq','.edu.iq','.com.iq','.mil.iq','.org.iq','.net.iq','.iq','.ac.ir','.co.ir','.gov.ir','.id.ir','.net.ir','.org.ir','.sch.ir','.ir','.is','.gov.it','.edu.it','.it','.co.je','.net.je','.org.je','.je','.com.jm','.net.jm','.org.jm','.edu.jm','.gov.jm','.mil.jm','.jm','.com.jo','.net.jo','.gov.jo','.edu.jo','.org.jo','.mil.jo','.name.jo','.sch.jo','.jo','.ac.jp','.ad.jp','.co.jp','.ed.jp','.go.jp','.gr.jp','.lg.jp','.ne.jp','.or.jp','.jp','.co.ke','.or.ke','.ne.ke','.go.ke','.ac.ke','.sc.ke','.me.ke','.mobi.ke','.info.ke','.ke','.kg','.per.kh','.com.kh','.edu.kh','.gov.kh','.mil.kh','.net.kh','.org.kh','.kh','.biz.ki','.net.ki','.info.ki','.org.ki','.gov.ki','.edu.ki','.mob.ki','.tel.ki','.ki','.com.km','.coop.km','.asso.km','.nom.km','.presse.km','.tm.km','.medecin.km','.notaires.km','.pharmaciens.km','.veterinaire.km','.edu.km','.gouv.km','.mil.km','.km','.net.kn','.org.kn','.edu.kn','.gov.kn','.kn','.com.kp','.gov.kp','.kp','.co.kr','.ne.kr','.or.kr','.re.kr','.pe.kr','.go.kr','.mil.kr','.ac.kr','.hs.kr','.ms.kr','.es.kr','.sc.kr','.kg.kr','.kr','.edu.kw','.com.kw','.net.kw','.org.kw','.gov.kw','.kw','.com.ky','.org.ky','.net.ky','.edu.ky','.gov.ky','.ky','.com.kz','.edu.kz','.gov.kz','.mil.kz','.net.kz','.org.kz','.kz','.la','.com.lb','.edu.lb','.gov.lb','.net.lb','.org.lb','.lb','.lc','.li','.gov.lk','.sch.lk','.net.lk','.int.lk','.com.lk','.org.lk','.edu.lk','.ngo.lk','.soc.lk','.web.lk','.ltd.lk','.assn.lk','.grp.lk','.hotel.lk','.lk','.com.lr','.edu.lr','.gov.lr','.org.lr','.net.lr','.lr','.ls','.lt','.lu','.com.lv','.edu.lv','.gov.lv','.org.lv','.mil.lv','.id.lv','.net.lv','.asn.lv','.conf.lv','.lv','.com.ly','.net.ly','.gov.ly','.plc.ly','.edu.ly','.sch.ly','.med.ly','.org.ly','.id.ly','.ly','.net.ma','.ac.ma','.org.ma','.gov.ma','.press.ma','.co.ma','.ma','.tm.mc','.asso.mc','.mc','.md','co.me','net.me','org.me','edu.me','ac.me','gov.me','its.me','priv.me','.me','.org.mg','.nom.mg','.gov.mg','.prd.mg','.tm.mg','.edu.mg','.mil.mg','.com.mg','.in.mg','.mg','.mh','.com.mk','.org.mk','.net.mk','.edu.mk','.gov.mk','.inf.mk','.name.mk','.pro.mk','.mk','.com.ml','.net.ml','.org.ml','.edu.ml','.gov.ml','.presse.ml','.ml','.net.mm','.com.mm','.org.mm','.gov.mm','.mm','.gov.mn','.edu.mn','.org.mn','.mn','.com.mo','.edu.mo','.gov.mo','.net.mo','.org.mo','.mo','.gov.mp','.org.mp','.co.mp','.mp','.mq','.mr','.ms','.com.mt','.org.mt','.net.mt','.edu.mt','.gov.mt','.mt','.com.mu','.net.mu','.org.mu','.gov.mu','.ac.mu','.oc.mu','.or.mu','.mu','.aero.mv','.biz.mv','.com.mv','.coop.mv','.edu.mv','.gov.mv','.info.mv','.int.mv','.mil.mv','.museum.mv','.name.mv','.net.mv','.org.mv','.pro.mv','.mv','.ac.mw','.co.mw','.com.mw','.coop.mw','.edu.mw','.gov.mw','.int.mw','.museum.mw','.net.mw','.org.mw','.mw','.mx','.com.my','.net.my','.org.my','.gov.my','.edu.my','.sch.my','.mil.my','.name.my','.my','.ac.mz','.co.mz','.org.mz','.gov.mz','.edu.mz','.mz','.co.na','.com.na','.na','.asso.nc','.nc','.ne','.com.nf','.net.nf','.arts.nf','.store.nf','.web.nf','.firm.nf','.info.nf','.other.nf','.per.nf','.rec.nf','.nf','.com.ng','.org.ng','.gov.ng','.edu.ng','.net.ng','.sch.ng','.name.ng','.mobi.ng','.biz.ng','.mil.ng','.ng','.gob.ni','.co.ni','.com.ni','.ac.ni','.edu.ni','.org.ni','.nom.ni','.net.ni','.mil.ni','.ni','.gob.nl','.co.nl','.ac.nl','.org.nl','.nom.nl','.net.nl','.mil.nl','.nl','.priv.no','.no','.com.np','.edu.np','.gov.np','.mil.np','.net.np','.org.np','.np','.edu.nr','.gov.nr','.biz.nr','.info.nr','.net.nr','.org.nr','.com.nr','.nr','.nu','.ac.nz','.co.nz','.geek.nz','.gen.nz','.maori.nz','.net.nz','.org.nz','.school.nz','.cri.nz','.govt.nz','.iwi.nz','.parliament.nz','.mil.nz','.health.nz','.nz','.com.om','.co.om','.edu.om','.ac.om','.sch.om','.gov.om','.net.om','.org.om','.mil.om','.museum.om','.biz.om','.pro.om','.med.om','.om','.net.pa','.com.pa','.ac.pa','.sld.pa','.gob.pa','.edu.pa','.org.pa','.abo.pa','.ing.pa','.med.pa','.nom.pa','.pa','.edu.pe','.gob.pe','.nom.pe','.mil.pe','.sld.pe','.org.pe','.com.pe','.net.pe','.pe','.com.pf','.pf','.com.pg','.net.pg','.ac.pg','.gov.pg','.mil.pg','.org.pg','.pg','.ph','.com.pk','.net.pk','.edu.pk','.org.pk','.fam.pk','.biz.pk','.web.pk','.gov.pk','.gob.pk','.gok.pk','.gon.pk','.gop.pk','.gos.pk','.pk','.com.pl','.biz.pl','.net.pl','.art.pl','.edu.pl','.org.pl','.ngo.pl','.gov.pl','.info.pl','.mil.pl','.waw.pl','.warszawa.pl','.wroc.pl','.wroclaw.pl','.krakow.pl','.katowice.pl','.poznan.pl','.lodz.pl','.gda.pl','.gdansk.pl','.slupsk.pl','.radom.pl','.szczecin.pl','.lublin.pl','.bialystok.pl','.olsztyn.pl','.bydgoszcz.pl','.torun.pl','.gorzow.pl','.zgora.pl','.pl','.pm','.pn','.pr','.biz.pr','.com.pr','.edu.pr','.gov.pr','.info.pr','.isla.pr','.name.pr','.net.pr','.org.pr','.pro.pr','.est.pr','.prof.pr','.ac.pr','.pr','.com.ps','.net.ps','.org.ps','.edu.ps','.gov.ps','.plo.ps','.sec.ps','.ps','.com.pt','.edu.pt','.gov.pt','.int.pt','.net.pt','.nome.pt','.org.pt','.publ.pt','.pt','.co.pw','.ne.pw','.or.pw','.ed.pw','.go.pw','.belau.pw','.pw','.org.py','.edu.py','.mil.py','.gov.py','.net.py','.com.py','.coop.py','.py','.com.qa','.net.qa','.org.qa','.gov.qa','.edu.qa','.mil.qa','.qa','.asso.re','.nom.re','.com.re','.re','.arts.ro','.com.ro','.firm.ro','.info.ro','.nom.ro','.nt.ro','.org.ro','.rec.ro','.store.ro','.tm.ro','.www.ro','.ro','.co.rs','.org.rs','.edu.rs','.ac.rs','.gov.rs','.in.rs','.rs','.ac.ru','.com.ru','.edu.ru','.gov.ru','.int.ru','.mil.ru','.net.ru','.org.ru','.pp.ru','.ru','.gov.rw','.net.rw','.edu.rw','.ac.rw','.com.rw','.co.rw','.int.rw','.mil.rw','.gouv.rw','.rw','.com.sa','.edu.sa','.sch.sa','.med.sa','.gov.sa','.net.sa','.org.sa','.pub.sa','.sa','.com.sb','.net.sb','.edu.sb','.org.sb','.gov.sb','.sb','.com.sc','.net.sc','.edu.sc','.gov.sc','.org.sc','.sc','.com.sd','.net.sd','.org.sd','.edu.sd','.med.sd','.tv.sd','.gov.sd','.info.sd','.sd','.se','.com.sg','.net.sg','.org.sg','.gov.sg','.edu.sg','.per.sg','.idn.sg','.sg','.co.sh','.com.sh','.org.sh','.gov.sh','.edu.sh','.net.sh','.nom.sh','.sh','.si','.sj','.sk','.com.sl','.net.sl','.org.sl','.edu.sl','.gov.sl','.sl','.sm','.art.sn','.com.sn','.edu.sn','.gouv.sn','.org.sn','.perso.sn','.univ.sn','.sn','.so','.sr','.nic.st','.gov.st','.saotome.st','.principe.st','.consulado.st','.embaixada.st','.org.st','.edu.st','.net.st','.com.st','.store.st','.mil.st','.co.st','.st','.su','.edu.sv','.gob.sv','.com.sv','.org.sv','.red.sv','.sv','.edu.sy','.gov.sy','.net.sy','.mil.sy','.com.sy','.org.sy','.news.sy','.sy','.co.sz','.ac.sz','.org.sz','.sz','.tc','.td','.eu.tf','.us.tf','.net.tf','.edu.tf','.tf','.tg','.ac.th','.co.th','.in.th','.go.th','.mi.th','.or.th','.net.th','.th','.ac.tj','.aero.tj','.biz.tj','.co.tj','.com.tj','.coop.tj','.dyn.tj','.edu.tj','.go.tj','.gov.tj','.info.tj','.int.tj','.mil.tj','.name.tj','.museum.tj','.my.tj','.name.tj','.net.tj','.nic.tj','.org.tj','.per.tj','.pro.tj','.test.tj','.web.tj','.tj','.tk','.tl','.tm','.com.tn','.ens.tn','.fin.tn','.gov.tn','.ind.tn','.intl.tn','.nat.tn','.net.tn','.org.tn','.info.tn','.perso.tn','.tourism.tn','.edunet.tn','.rnrt.tn','.rns.tn','.rnu.tn','.mincom.tn','.agrinet.tn','.defense.tn','.tn','.edu.to','.to','.tp','.nc.tr','.com.tr','.gen.tr','.org.tr','.biz.tr','.info.tr','.av.tr','.dr.tr','.pol.tr','.bel.tr','.tsk.tr','.bbs.tr','.k12.tr','.edu.tr','.name.tr','.net.tr','.gov.tr','.web.tr','.tel.tr','.tv.tr','.tr','.co.tt','.com.tt','.org.tt','.net.tt','.biz.tt','.info.tt','.pro.tt','.int.tt','.coop.tt','.jobs.tt','.mobi.tt','.travel.tt','.museum.tt','.aero.tt','.cat.tt','.tel.tt','.name.tt','.tt','.tv','.edu.tw','.gov.tw','.mil.tw','.com.tw','.net.tw','.org.tw','.idv.tw','.game.tw','.ebiz.tw','.club.tw','.tw','.co.tz','.ac.tz','.go.tz','.or.tz','.ne.tz','.tz','.com.ua','.edu.ua','.gov.ua','.net.ua','.org.ua','.co.ua','.biz.ua','.in.ua','.me.ua','.pp.ua','.ua','.co.ug','.ac.ug','.sc.ug','.go.ug','.ne.ug','.or.ug','.org.ug','.ug','.ac.uk','.co.uk','.gov.uk','.ltd.uk','.me.uk','.mod.uk','.net.uk','.nhs.uk','.org.uk','.parliament.uk','.plc.uk','.police.uk','.soc.uk','.cym.uk','.scot.uk','.bl.uk','.british-library.uk','.icnet.uk','.jet.uk','.nls.uk','.parliament.uk','.nhs.uk','.mod.uk','.govt.uk','.orgn.uk','.lea.uk','.mil.uk','.nel.uk','.sch.uk','.nic.uk','.uk','.dni.us','.fed.us','.isa.us','.kids.us','.nsn.us','.us','.com.uy','.edu.uy','.gub.uy','.net.uy','.mil.uy','.org.uy','.uy','.co.uz','.com.uz','.org.uz','.uz','.va','.vc','.com.ve','.net.ve','.org.ve','.info.ve','.co.ve','.web.ve','.gob.ve','.edu.ve','.mil.ve','.tec.ve','.ve','.vg','.co.vi','.org.vi','.com.vi','.net.vi','.k12.vi','.vi','.com.vn','.biz.vn','.edu.vn','.gov.vn','.net.vn','.org.vn','.int.vn','.ac.vn','.pro.vn','.info.vn','.health.vn','.name.vn','.vn','.vu','.wf','.org.ws','.gov.ws','.edu.ws','.ws','.com.ye','.co.ye','.ltd.ye','.me.ye','.net.ye','.org.ye','.plc.ye','.gov.ye','.ye','.yt','.agric.za','.cybernet.za','.grondar.za','.iaccess.za','.inca.za','.nis.za','.olivetti.za','.pix.za','.ac.za','.city.za','.co.za','.edu.za','.gov.za','.law.za','.mil.za','.nom.za','.org.za','.school.za','.alt.za','.net.work.za','.ngo.za','.tm.za','.web.za','.bourse.za','.za','.ac.zm','.co.zm','.com.zm','.edu.zm','.gov.zm','.net.zm','.org.zm','.sch.zm','.zm','.ac.zw','.org.zw','.zw','.cym','.eng','.gb','.sco','.bzh','.cymru','.cwl','.wales','.eus','.gal','.ker','.lli','.quebec','.scot','.sic','.nai','.kids','.mail','.web','.med','.eco','.post','.shop','.sport','.wine'] | |
}; | |
setTimeout(g.init,500); | |
//var x = [1,2,3,3,3,3,3,4,9,1,2,3,4,5,5,5,5]; | |
//console.log($.unique(x).sort()); | |
Array.prototype.uniq = function() { | |
var old = this; | |
var uniq = []; | |
$.each(old,function(i,key) { | |
if (uniq.indexOf(key) === -1) uniq.push(key); | |
}); | |
return uniq; | |
}; | |
Array.prototype.remove = function(word) { | |
var old = this; | |
var out = []; | |
$.each(old,function(i,key) { | |
if (key===word) return; | |
out.push(key); | |
}); | |
return out; | |
}; | |
/* | |
* jQuery hashchange event - v1.3 - 7/21/2010 | |
* http://benalman.com/projects/jquery-hashchange-plugin/ | |
* | |
* Copyright (c) 2010 "Cowboy" Ben Alman | |
* Dual licensed under the MIT and GPL licenses. | |
* http://benalman.com/about/license/ | |
*/ | |
(function($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){r||l(a());n()}).attr("src",r||"javascript:0").insertAfter("body")[0].contentWindow;h.onpropertychange=function(){try{if(event.propertyName==="title"){q.document.title=h.title}}catch(s){}}}};j.stop=k;o=function(){return a(q.location.href)};l=function(v,s){var u=q.document,t=$.fn[c].domain;if(v!==s){u.title=h.title;u.open();t&&u.write('<script>document.domain="'+t+'"<\/script>');u.close();q.location.hash=v}}})();return j})()})(jQuery,this); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name SoundTake - SoundCloud Downloader | |
// @namespace http://soundtake.hol.es/ | |
// @version 0.6 | |
// @description SoundTake enables you to download musics from SoundCloud. This script will add a "Download" button for every SoundCloud track and playlist. | |
// @author soundtake | |
// @copyright 2014-2017, soundtake | |
// @include http://soundcloud.com/* | |
// @include https://soundcloud.com/* | |
// @include http://www.soundcloud.com/* | |
// @include https://www.soundcloud.com/* | |
// @require https://code.jquery.com/jquery-1.11.1.min.js | |
// @run-at document-start | |
// ==/UserScript== | |
/* | |
* arrive.js | |
* v2.3.1 | |
* https://github.com/uzairfarooq/arrive | |
* MIT licensed | |
* | |
* Copyright (c) 2014-2016 Uzair Farooq | |
*/ | |
var Arrive=function(a,b,c){"use strict";function l(a,b,c){e.addMethod(b,c,a.unbindEvent),e.addMethod(b,c,a.unbindEventWithSelectorOrCallback),e.addMethod(b,c,a.unbindEventWithSelectorAndCallback)}function m(a){a.arrive=j.bindEvent,l(j,a,"unbindArrive"),a.leave=k.bindEvent,l(k,a,"unbindLeave")}if(a.MutationObserver&&"undefined"!=typeof HTMLElement){var d=0,e=function(){var b=HTMLElement.prototype.matches||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector;return{matchesSelector:function(a,c){return a instanceof HTMLElement&&b.call(a,c)},addMethod:function(a,b,c){var d=a[b];a[b]=function(){return c.length==arguments.length?c.apply(this,arguments):"function"==typeof d?d.apply(this,arguments):void 0}},callCallbacks:function(a){for(var c,b=0;c=a[b];b++)c.callback.call(c.elem)},checkChildNodesRecursively:function(a,b,c,d){for(var g,f=0;g=a[f];f++)c(g,b,d)&&d.push({callback:b.callback,elem:g}),g.childNodes.length>0&&e.checkChildNodesRecursively(g.childNodes,b,c,d)},mergeArrays:function(a,b){var d,c={};for(d in a)c[d]=a[d];for(d in b)c[d]=b[d];return c},toElementsArray:function(b){return"undefined"==typeof b||"number"==typeof b.length&&b!==a||(b=[b]),b}}}(),f=function(){var a=function(){this._eventsBucket=[],this._beforeAdding=null,this._beforeRemoving=null};return a.prototype.addEvent=function(a,b,c,d){var e={target:a,selector:b,options:c,callback:d,firedElems:[]};return this._beforeAdding&&this._beforeAdding(e),this._eventsBucket.push(e),e},a.prototype.removeEvent=function(a){for(var c,b=this._eventsBucket.length-1;c=this._eventsBucket[b];b--)a(c)&&(this._beforeRemoving&&this._beforeRemoving(c),this._eventsBucket.splice(b,1))},a.prototype.beforeAdding=function(a){this._beforeAdding=a},a.prototype.beforeRemoving=function(a){this._beforeRemoving=a},a}(),g=function(b,d){var g=new f,h=this,i={fireOnAttributesModification:!1};return g.beforeAdding(function(c){var i,e=c.target;c.selector,c.callback;(e===a.document||e===a)&&(e=document.getElementsByTagName("html")[0]),i=new MutationObserver(function(a){d.call(this,a,c)});var j=b(c.options);i.observe(e,j),c.observer=i,c.me=h}),g.beforeRemoving(function(a){a.observer.disconnect()}),this.bindEvent=function(a,b,c){b=e.mergeArrays(i,b);for(var d=e.toElementsArray(this),f=0;f<d.length;f++)g.addEvent(d[f],a,b,c)},this.unbindEvent=function(){var a=e.toElementsArray(this);g.removeEvent(function(b){for(var d=0;d<a.length;d++)if(this===c||b.target===a[d])return!0;return!1})},this.unbindEventWithSelectorOrCallback=function(a){var f,b=e.toElementsArray(this),d=a;f="function"==typeof a?function(a){for(var e=0;e<b.length;e++)if((this===c||a.target===b[e])&&a.callback===d)return!0;return!1}:function(d){for(var e=0;e<b.length;e++)if((this===c||d.target===b[e])&&d.selector===a)return!0;return!1},g.removeEvent(f)},this.unbindEventWithSelectorAndCallback=function(a,b){var d=e.toElementsArray(this);g.removeEvent(function(e){for(var f=0;f<d.length;f++)if((this===c||e.target===d[f])&&e.selector===a&&e.callback===b)return!0;return!1})},this},h=function(){function h(a){var b={attributes:!1,childList:!0,subtree:!0};return a.fireOnAttributesModification&&(b.attributes=!0),b}function i(a,b){a.forEach(function(a){var c=a.addedNodes,d=a.target,f=[];null!==c&&c.length>0?e.checkChildNodesRecursively(c,b,k,f):"attributes"===a.type&&k(d,b,f)&&f.push({callback:b.callback,elem:node}),e.callCallbacks(f)})}function k(a,b,f){if(e.matchesSelector(a,b.selector)&&(a._id===c&&(a._id=d++),-1==b.firedElems.indexOf(a._id))){if(b.options.onceOnly){if(0!==b.firedElems.length)return;b.me.unbindEventWithSelectorAndCallback.call(b.target,b.selector,b.callback)}b.firedElems.push(a._id),f.push({callback:b.callback,elem:a})}}var f={fireOnAttributesModification:!1,onceOnly:!1,existing:!1};j=new g(h,i);var l=j.bindEvent;return j.bindEvent=function(a,b,c){"undefined"==typeof c?(c=b,b=f):b=e.mergeArrays(f,b);var d=e.toElementsArray(this);if(b.existing){for(var g=[],h=0;h<d.length;h++)for(var i=d[h].querySelectorAll(a),j=0;j<i.length;j++)g.push({callback:c,elem:i[j]});if(b.onceOnly&&g.length)return c.call(g[0].elem);setTimeout(e.callCallbacks,1,g)}l.call(this,a,b,c)},j},i=function(){function d(a){var b={childList:!0,subtree:!0};return b}function f(a,b){a.forEach(function(a){var c=a.removedNodes,f=(a.target,[]);null!==c&&c.length>0&&e.checkChildNodesRecursively(c,b,h,f),e.callCallbacks(f)})}function h(a,b){return e.matchesSelector(a,b.selector)}var c={};k=new g(d,f);var i=k.bindEvent;return k.bindEvent=function(a,b,d){"undefined"==typeof d?(d=b,b=c):b=e.mergeArrays(c,b),i.call(this,a,b,d)},k},j=new h,k=new i;b&&m(b.fn),m(HTMLElement.prototype),m(NodeList.prototype),m(HTMLCollection.prototype),m(HTMLDocument.prototype),m(Window.prototype);var n={};return l(j,n,"unbindAllArrive"),l(k,n,"unbindAllLeave"),n}}(window,"undefined"==typeof jQuery?null:jQuery,void 0); | |
/* End arrive.js */ | |
console.info('Thanks for using SoundTake! :)'); | |
(function(document) { | |
'use strict'; | |
var versi = '0.6', | |
jQ = jQuery.noConflict(true); | |
var options = { | |
fireOnAttributesModification: false | |
}; | |
function DownloadButton(e) { | |
if (jQ(e).find('.sc-button-download').length > 0 && jQ(e).find('.sc-sndtk-btn').length === 0) { | |
jQ(e).find('.sc-button-download').remove(); | |
} | |
var button_size = jQ(e).find('div.sc-button-group').hasClass('sc-button-group-medium') || jQ(e).find('div.sc-button-group').find('button').eq(0).hasClass('sc-button-medium') ? 'sc-button-medium' : 'sc-button-small', | |
d = jQ(e).find('.soundTitle__title').eq(0), | |
link = null, | |
btngroup = jQ(e).find('div.sc-button-group').eq(0); | |
link = (d.attr('href') === undefined) ? document.location.href : 'https://soundcloud.com' + d.attr('href'); | |
if (jQ(e).hasClass('userNetwork__share')) { | |
link = document.location.href; | |
jQ(e).append('<button style="margin-left:5px;" class=\'sc-sndtk-btn sc-button sc-button-download ' + button_size + ' sc-button-responsive\' title=\'Download this list with SoundTake\' onclick=\'window.open("http://soundtake.net/?utm_source=likes&utm_campaign=download_btn&utm_medium=soundcloud&ver=' + versi + '#' + link + '", "_blank")\'>Download This List </button>'); | |
} | |
else if (jQ(e).hasClass('userInfoBar__buttons') || jQ(e).hasClass('userDropbar__buttons')) { | |
link = document.location.href; | |
btngroup.append('<button class=\'sc-sndtk-btn sc-button sc-button-download ' + button_size + ' sc-button-responsive\' title=\'Download all tracks with SoundTake\' onclick=\'window.open("http://soundtake.net/?utm_source=sc_user&utm_campaign=download_btn&utm_medium=soundcloud&ver=' + versi + '#' + link + '", "_blank")\'>Download All Tracks </button>'); | |
} | |
else if (jQ(e).hasClass('playlist') || jQ(e).find('.sc-button-like[title=\'Like Playlist\']').length > 0) { | |
btngroup.append('<button class=\'sc-sndtk-btn sc-button sc-button-download ' + button_size + ' sc-button-responsive\' title=\'Download this playlist with SoundTake\' onclick=\'window.open("http://soundtake.net/?utm_source=playlist&utm_campaign=download_btn&utm_medium=soundcloud&ver=' + versi + '#' + link + '", "_blank")\'>Download Playlist </button>'); | |
} | |
else if (jQ(e).find('.trackItem__content').length > 0) { | |
link = 'https://soundcloud.com' + jQ(e).find('.trackItem__trackTitle').eq(0).attr('href'); | |
btngroup.append('<button class=\'sc-sndtk-btn sc-button sc-button-download ' + button_size + ' sc-button-responsive sc-button-icon\' title=\'Download this track with SoundTake\' onclick=\'window.open("http://soundtake.net/?utm_source=tracklist&utm_campaign=download_btn&utm_medium=soundcloud&ver=' + versi + '#' + link + '", "_blank")\'>Download </button>'); | |
} | |
else if (jQ(e).hasClass('soundBadge')) { | |
btngroup.append('<button class=\'sc-sndtk-btn sc-button sc-button-download ' + button_size + ' sc-button-responsive sc-button-icon\' title=\'Download this track with SoundTake\' onclick=\'window.open("http://soundtake.net/?utm_source=soundbadge&utm_campaign=download_btn&utm_medium=soundcloud&ver=' + versi + '#' + link + '", "_blank")\'>Download </button>'); | |
} | |
else { | |
btngroup.append('<button class=\'sc-sndtk-btn sc-button sc-button-download ' + button_size + ' sc-button-responsive\' title=\'Download this track with SoundTake\' onclick=\'window.open("http://soundtake.net/?utm_source=track&utm_campaign=download_btn&utm_medium=soundcloud&ver=' + versi + '#' + link + '", "_blank")\'>Download </button>'); | |
} | |
jQ(e).leave('.sc-button-download', function () { | |
jQ(e).unbindLeave(); | |
DownloadButton(e); | |
}); | |
} | |
function eksekusi() { | |
var elements = ['.trackItem', '.l-listen-engagement', '.listenEngagement__actions', '.soundBadge', '.userNetwork__share', '.userInfoBar__buttons', '.userDropbar__buttons', '.chartTracks__item']; | |
jQ('.sound').each(function (a, b) { | |
DownloadButton(b); | |
}); | |
jQ(document).arrive('.sound', options, function(){ | |
DownloadButton(this); | |
}); | |
for (var i=0; i<=elements.length; i++) { | |
DownloadButton(jQ(elements[i])); | |
jQ(document).arrive(elements[i], options, function(){ | |
DownloadButton(this); | |
}); | |
} | |
} | |
eksekusi(); | |
})(document); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Youtube Auto Subtitle Downloader v15 | |
// @description download youtube AUTO subtitle (v15 support new Material Design) sometime when it's not working properly, REFRESH! | |
// @include https://*youtube.com/* | |
// @require http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.9.1.min.js | |
// @version 15 | |
// @namespace https://greasyfork.org/users/5711 | |
// ==/UserScript== | |
// Author : Cheng Zheng | |
// Email : guokrfans@gmail.com ( if you get any problem just email me, I am happy to help ) | |
// Github : https://github.com/1c7 | |
// Blog : http://1c7.me | |
// Test video | |
// everytime I change the script, I would test following video to make sure it work properly | |
// English | |
// https://www.youtube.com/watch?v=DPFJROWdkQ8 | |
// (2 subtitle: English auto-generated + Arabic) | |
// https://www.youtube.com/watch?v=kkPN55JNQnY | |
// Xbox Elite Wireless Controller - The World's Most Advanced Controller | |
// German | |
// https://www.youtube.com/watch?v=2-xbQ7ydHWo | |
// Deutsch Lernen Mit Videos | German Learning Videos | Zu Hause | | |
// France | |
// https://www.youtube.com/watch?v=bb4zvZdrMz4 | |
// Easy French 1 - à Paris! | |
// Russian | |
// https://www.youtube.com/watch?v=JEF1Ro56wIU | |
// Жизнь в Америке? | |
// =============================================== | |
// CONFIG | |
var NO_SUBTITLE = 'No (auto-generated) subtitle'; | |
// important initial variable, don't change it unless you know what you are doing. | |
var first_load = true; | |
var youtube_playerResponse_1c7 = null; | |
var auto_subtitle_language_name = ''; | |
// trigger when first load (hit refresh button) | |
$(document).ready(function(){ | |
// because document ready still not enough | |
// it's still too early, we have to wait certain element exist, then execute function. | |
if(new_material_design_version()){ | |
var material_checkExist = setInterval(function() { | |
if (document.querySelectorAll('.title.style-scope.ytd-video-primary-info-renderer').length) { | |
init(); | |
clearInterval(material_checkExist); | |
} | |
}, 330); | |
} else { | |
var checkExist = setInterval(function() { | |
if ($('#watch-headline-title').length && $('#YT_auto').length === 0) { | |
init(); | |
clearInterval(checkExist); | |
} | |
}, 330); | |
} | |
}); | |
// trigger when loading new page (actually this would also trigger when first loading, that's not what we want, that's why we need to use firsr_load === false) | |
// (new Material design version would trigger this "yt-navigate-finish" event. old version would not.) | |
var body = document.getElementsByTagName("body")[0]; | |
body.addEventListener("yt-navigate-finish", function(event) { | |
if (current_page_is_video_page() === false){ | |
return; | |
} | |
youtube_playerResponse_1c7 = event.detail.response.playerResponse; // Youtube stuff | |
console.log(youtube_playerResponse_1c7); | |
if(first_load === false){ | |
remove_subtitle_download_button(); | |
init(); | |
} | |
}, false); | |
// trigger when loading new page | |
// (old version would trigger this "spfdone" event. new Material design version not sure yet.) | |
window.addEventListener("spfdone", function(e) { | |
if (current_page_is_video_page() === false){ | |
return; | |
} | |
if(current_page_is_video_page()){ | |
remove_subtitle_download_button(); | |
var checkExist = setInterval(function() { | |
if ($('#watch7-headline').length && $('#YT_auto').length === 0) { | |
init(); | |
clearInterval(checkExist); | |
} | |
}, 330); | |
} | |
}); | |
// return true / false | |
// Detect [new version UI(material design)] OR [old version UI] | |
function new_material_design_version(){ | |
var old_title_element = document.getElementById('watch7-headline'); | |
if(old_title_element){ | |
return false; | |
} else { | |
return true; | |
} | |
} | |
// return true / false | |
function auto_subtitle_exist(){ | |
return typeof get_auto_subtitle_name() === 'string'; | |
} | |
// https://stackoverflow.com/questions/23808928/javascript-elegant-way-to-check-nested-object-properties-for-null-undefined | |
function get(obj, key) { | |
return key.split(".").reduce(function(o, x) { | |
return (typeof o == "undefined" || o === null) ? o : o[x]; | |
}, obj); | |
} | |
// return "English (auto-generated)" or null; | |
function get_auto_subtitle_name(){ | |
var json = ''; | |
if(new_material_design_version()){ | |
json = youtube_playerResponse_1c7; | |
if(json === null){ | |
return null; | |
} | |
} else { | |
var raw_string = ytplayer.config.args.player_response; | |
try{ | |
json = JSON.parse(raw_string); | |
}catch(e){ | |
return null; | |
} | |
} | |
// if we can't get into that deep level, just return null; | |
if(get(json, 'captions.playerCaptionsTracklistRenderer.captionTracks') === undefined){ | |
return null; | |
} | |
var captionTracks = json.captions.playerCaptionsTracklistRenderer.captionTracks; | |
for (var index in captionTracks){ | |
var caption = captionTracks[index]; | |
if(typeof caption.kind === 'string' && caption.kind == 'asr'){ | |
return captionTracks[index].name.simpleText; | |
} | |
} | |
return null; | |
} | |
// return true / false | |
function current_page_is_video_page(){ | |
return get_video_id() !== null; | |
} | |
// return string like "RW1ChiWyiZQ", from "https://www.youtube.com/watch?v=RW1ChiWyiZQ" | |
// or null | |
function get_video_id(){ | |
return getURLParameter('v'); | |
} | |
//https://stackoverflow.com/questions/11582512/how-to-get-url-parameters-with-javascript/11582513#11582513 | |
function getURLParameter(name) { | |
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) || [null, ''])[1].replace(/\+/g, '%20')) || null; | |
} | |
function remove_subtitle_download_button(){ | |
$('#YT_auto').remove(); | |
} | |
function no_subtitle_button(){ | |
if(new_material_design_version()){ | |
var title_element = document.querySelectorAll('.title.style-scope.ytd-video-primary-info-renderer'); | |
if (title_element){ | |
$(title_element[0]).after('<a id="YT_auto">' + NO_SUBTITLE + '</a>'); | |
} | |
$('#YT_auto').addClass('start yt-uix-button yt-uix-button-text yt-uix-tooltip'); // 样式是 Youtube 自带的. | |
$("#YT_auto").css('margin-top','2px') | |
.css('position','relative') | |
.css('top','-3px') | |
.css('margin-right','6px') | |
.css('padding','7px') | |
.css('padding-right','12px') | |
.css('padding-left','12px') | |
.css('text-decoration','none') | |
.css('border','1px solid #95a5a6') | |
.css('cursor','not-allowed') | |
.css('color','rgb(255, 255, 255)') | |
.css('border-top-left-radius','3px') | |
.css('border-top-right-radius','3px') | |
.css('border-bottom-right-radius','3px') | |
.css('border-bottom-left-radius','3px') | |
.css('background-color','#95a5a6') | |
.css('display','inline-block'); | |
} else { | |
$('#watch-headline-title').after('<a id="YT_auto">' + NO_SUBTITLE + '</a>'); | |
$('#YT_auto').addClass('start yt-uix-button yt-uix-button-text yt-uix-tooltip'); // 样式是 Youtube 自带的. | |
$("#YT_auto") | |
.css('padding','6px 12px') | |
.css('border','1px solid #95a5a6') | |
.css('cursor','not-allowed') | |
.css('color','rgb(255, 255, 255)') | |
.css('border-top-left-radius','3px') | |
.css('border-top-right-radius','3px') | |
.css('border-bottom-right-radius','3px') | |
.css('border-bottom-left-radius','3px') | |
.css('background-color','#95a5a6') | |
.css('display','inline-block') | |
.css('padding','5px 12px') | |
.css('font-weight','normal') | |
.css('font-size','13px'); | |
} | |
} | |
function normal_subtitle_button(){ | |
if(new_material_design_version()){ | |
var title_element = document.querySelectorAll('.title.style-scope.ytd-video-primary-info-renderer'); | |
if (title_element){ | |
$(title_element[0]).after('<a id="YT_auto">' + 'Download "' + auto_subtitle_language_name + '"</a>'); | |
} | |
$("#YT_auto").css('margin-top','2px') | |
.css('position','relative') | |
.css('top','-3px') | |
.css('margin-right','6px') | |
.css('padding','7px') | |
.css('padding-right','12px') | |
.css('padding-left','12px') | |
.css('text-decoration','none') | |
.css('border','1px solid rgb(0, 183, 90)') | |
.css('cursor','pointer') | |
.css('color','rgb(255, 255, 255)') | |
.css('border-top-left-radius','3px') | |
.css('border-top-right-radius','3px') | |
.css('border-bottom-right-radius','3px') | |
.css('border-bottom-left-radius','3px') | |
.css('background-color','#00B75A') | |
.css('display','inline-block'); | |
} else { | |
$('#watch-headline-title').after('<a id="YT_auto">' + 'Download "' + auto_subtitle_language_name + '"</a>'); | |
$('#YT_auto').addClass('start yt-uix-button yt-uix-button-text yt-uix-tooltip'); // 样式是 Youtube 自带的. | |
$("#YT_auto").css('margin-top','4px') | |
.css('padding-top','2px') | |
.css('border','1px solid rgb(0, 183, 90)') | |
.css('cursor','pointer') | |
.css('color','rgb(255, 255, 255)') | |
.css('border-top-left-radius','3px') | |
.css('border-top-right-radius','3px') | |
.css('border-bottom-right-radius','3px') | |
.css('border-bottom-left-radius','3px') | |
.css('background-color','#00B75A') | |
.css('display','inline-block') | |
.css('padding','5px 12px') | |
.css('font-weight','normal') | |
.css('font-size','13px'); | |
} | |
} | |
function init(){ | |
first_load = false; | |
if (auto_subtitle_exist()){ | |
auto_subtitle_language_name = get_auto_subtitle_name(); | |
normal_subtitle_button(); | |
var button_element = $("#YT_auto"); | |
if (getChromeVersion() > 52){ | |
button_element.attr('download', get_file_name()); | |
button_element.attr('href', 'data:Content-type: text/plain,' + get_subtitle()); | |
} else { | |
button_element.click(function(){ downloadFile(get_file_name(), get_subtitle()); }); | |
} | |
} else { | |
// if there are no (auto-generated), we just put a button on page, tell user there are no subtitle. | |
no_subtitle_button(); | |
return; | |
} | |
} | |
// return a URL address or null; | |
// later we can send a AJAX and get XML subtitle response | |
function get_auto_subtitle_xml_url(){ | |
// use data from different souce | |
var json = ''; | |
if(youtube_playerResponse_1c7 !== null && youtube_playerResponse_1c7 !== "" && youtube_playerResponse_1c7 !== undefined){ | |
json = youtube_playerResponse_1c7; | |
} else { | |
var raw_string = ytplayer.config.args.player_response; | |
json = JSON.parse(raw_string); | |
} | |
var captionTracks = json.captions.playerCaptionsTracklistRenderer.captionTracks; | |
for (var index in captionTracks){ | |
var caption = captionTracks[index]; | |
if(typeof caption.kind === 'string' && caption.kind == 'asr'){ | |
return captionTracks[index].baseUrl; | |
} | |
// ASR – A caption track generated using automatic speech recognition. | |
// https://developers.google.com/youtube/v3/docs/captions | |
} | |
return null; | |
} | |
function get_subtitle(){ | |
var ajax_url = get_auto_subtitle_xml_url(); | |
if(ajax_url === null){ | |
// hint: no auto subtitle; | |
console.log('can not get auto subtitle xml URL'); | |
return false; | |
} | |
var SRT_subtitle = "<content will be replace>"; | |
$.ajax({ | |
url: ajax_url, //for debug comment: lang_code_url | |
type: 'get', | |
async: false, | |
error: function(r){ | |
console.log("Auto Subtitle Download: Ajax Error"); | |
}, | |
success: function(r) { | |
SRT_subtitle = parseYoutubeXMLToSRT(r); | |
} | |
}); | |
return SRT_subtitle; | |
} | |
// Youtube return XML. we want SRT, | |
// so this function input Youtube XML format, output proper SRT format. | |
function parseYoutubeXMLToSRT(youtube_xml_string){ | |
if(youtube_xml_string === ""){ | |
return false; | |
} | |
var text = youtube_xml_string.getElementsByTagName('text'); | |
var result = ""; | |
var BOM = "\uFEFF"; | |
result = BOM + result; // store final SRT result | |
var len = text.length; | |
for(var i=0; i<len; i++){ | |
var index = i+1; | |
var content = text[i].textContent.toString(); | |
content = content.replace(/(<([^>]+)>)/ig, ""); // remove all html tag. | |
var start = text[i].getAttribute('start'); | |
var end = ""; | |
if (i+1 >= len){ | |
end = parseFloat(text[i].getAttribute('start')) + parseFloat(text[i].getAttribute('dur')); | |
}else{ | |
end = text[i+1].getAttribute('start'); | |
} | |
// ==== 开始处理数据, 把数据保存到result里. ==== | |
var new_line = "%0D%0A"; | |
result = result + index + new_line; | |
// SRT index | |
var start_time = process_time( parseFloat(start) ); | |
result = result + start_time; | |
// 拿到 开始时间 后往 result 里存 | |
result = result + ' --> '; | |
// 标准 srt 时间轴: 00:00:01,850 --> 00:00:02,720 | |
// 现在加中间的箭头 | |
var end_time = process_time( parseFloat(end) ); | |
result = result + end_time + new_line; | |
// 拿到 结束时间 后往 result 里存 | |
result = result + content + new_line + new_line; | |
// 加字幕内容 | |
} | |
// ==== srt字幕我们已经完全处理好了, 保存在result里了, 我们现在保存到用户的电脑里就行了. ==== | |
// 保存javascript字符到用户电脑里 | |
result = result.replace(/(<div><br>)*<\/div>/g, '\n'); | |
result = result.replace(/<div>/g, ''); | |
/* replaces some html entities */ | |
result = result.replace(/ /g, ' '); | |
result = result.replace(/&/g, '&'); | |
result = result.replace(/</g, '<'); | |
result = result.replace(/>/g, '>'); | |
result = result.replace(/'/g, "'"); | |
return result; | |
} | |
// Copy from: http://www.alloyteam.com/2014/01/use-js-file-download/ | |
// Chrome 53 之后这个函数失效. 52有效. | |
function downloadFile(fileName, content){ | |
var aLink = document.createElement('a'); | |
var blob = new Blob([content]); | |
var evt = document.createEvent("HTMLEvents"); | |
evt.initEvent("click", false, false); | |
aLink.download = fileName; | |
aLink.href = URL.createObjectURL(blob); | |
aLink.dispatchEvent(evt); | |
} | |
//http://stackoverflow.com/questions/4900436/how-to-detect-the-installed-chrome-version | |
function getChromeVersion() { | |
var raw = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./); | |
return raw ? parseInt(raw[2], 10) : false; | |
} | |
// Convert Time Format | |
// Example: start="671.33" start="37.64" start="12" start="23.029" | |
// turn to SRT time format, like: 00:00:00,090 00:00:08,460 00:10:29,350 | |
// from this format: 671.33 | |
// to this format: 00:10:29,350 | |
// (easy task, Youtube return only second, | |
// we just use some division to get Hours & Minute and put them back all together) | |
function process_time(s){ | |
// s mean second | |
s = s.toFixed(3); | |
// 超棒的函数, 不论是整数还是小数都给弄成3位小数形式 | |
// 举个柚子: | |
// 671.33 -> 671.330 | |
// 671 -> 671.000 | |
// 注意函数会四舍五入. 具体读文档 | |
var array = s.split('.'); | |
// 把开始时间根据句号分割 | |
// 671.330 会分割成数组: [671, 330] | |
var Hour = 0; | |
var Minute = 0; | |
var Second = array[0]; // 671 | |
var MilliSecond = array[1]; // 330 | |
// 先声明下变量, 待会把这几个拼好就行了 | |
// 我们来处理秒数. 把"分钟"和"小时"除出来 | |
if(Second >= 60){ | |
Minute = Math.floor(Second / 60); | |
Second = Second - Minute * 60; | |
// 把 秒 拆成 分钟和秒, 比如121秒, 拆成2分钟1秒 | |
Hour = Math.floor(Minute / 60); | |
Minute = Minute - Hour * 60; | |
// 把 分钟 拆成 小时和分钟, 比如700分钟, 拆成11小时40分钟 | |
} | |
// Minute,如果位数不够两位就变成两位,下面两个if语句的作用也是一样。 | |
if (Minute < 10){ | |
Minute = '0' + Minute; | |
} | |
// Hour | |
if (Hour < 10){ | |
Hour = '0' + Hour; | |
} | |
// Second | |
if (Second < 10){ | |
Second = '0' + Second; | |
} | |
return Hour + ':' + Minute + ':' + Second + ',' + MilliSecond; | |
} | |
// Return something like: "(auto)Screenplays Crash Course Film Production #1.srt" | |
function get_file_name(){ | |
if(new_material_design_version()){ | |
var video_name = ""; | |
if(first_load){ | |
var title_element = document.querySelectorAll('.title.style-scope.ytd-video-primary-info-renderer'); | |
video_name = title_element[0].childNodes[0].data; | |
}else{ | |
video_name = youtube_playerResponse_1c7.videoDetails.title; | |
} | |
return get_auto_subtitle_name() + video_name + '.srt'; | |
} else { | |
var TITLE = unsafeWindow.ytplayer.config.args.title; | |
return get_auto_subtitle_name() + TITLE + '.srt'; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Youtube Best Video Downloader 2 | |
// @description Download every YouTube video you want and you can download them as Full-HD MP4, FLV, 3GP, MP3 128kbps and 192kbps, M4A and AAC formats. Also thumbnails and subtitles can be downloaded! Easy & Fast! | |
// @homepageURL https://bvd2.nl/ | |
// @author BVD2 | |
// @version 7.73 | |
// @date 03-09-2017 | |
// @namespace BVD2 | |
// @include http://www.youtube.com/* | |
// @include https://www.youtube.com/* | |
// @exclude http://www.youtube.com/embed/* | |
// @exclude https://www.youtube.com/embed/* | |
// @match http://www.youtube.com/* | |
// @match https://www.youtube.com/* | |
// @match http://s.ytimg.com/yts/jsbin/* | |
// @match https://s.ytimg.com/yts/jsbin/* | |
// @match http://manifest.googlevideo.com/* | |
// @match https://manifest.googlevideo.com/* | |
// @match http://*.googlevideo.com/videoplayback* | |
// @match https://*.googlevideo.com/videoplayback* | |
// @match http://*.youtube.com/videoplayback* | |
// @match https://*.youtube.com/videoplayback* | |
// @connect googlevideo.com | |
// @connect bvd2.nl | |
// @connect ytimg.com | |
// @grant GM_xmlhttpRequest | |
// @grant GM_getValu | |
// @grant GM_setValue | |
// @run-at document-end | |
// @license MIT License | |
// @icon https://bvd2.nl/images/icon64.png | |
// ==/UserScript== | |
(function() { | |
var FORMAT_LABEL = { | |
'18': 'MP4 360p', | |
'22': 'MP4 720p', | |
'43': 'WebM 360p', | |
'44': 'WebM 480p', | |
'45': 'WebM 720p', | |
'46': 'WebM 1080p', | |
'135': 'MP4 480p - no audio', | |
'137': 'MP4 1080p - no audio', | |
'138': 'MP4 2160p - no audio', | |
'140': 'M4A 128kbps - audio', | |
'264': 'MP4 1440p - no audio', | |
'266': 'MP4 2160p - no audio', | |
'298': 'MP4 720p60 - no audio', | |
'13': '3GP', | |
'17': '3GP 144p', | |
'36': '3GP 240p', | |
'5': 'FLV 240p', | |
'34': 'FLV 360p', | |
'35': 'FLV 480p', | |
'299': 'MP4 1080p60 - no audio' | |
}; | |
var FORMAT_TYPE = { | |
'5': 'flv', | |
'34': 'flv', | |
'35': 'flv', | |
'13': '3gp', | |
'17': '3gp', | |
'36': '3gp', | |
'18': 'mp4', | |
'22': 'mp4', | |
'43': 'webm', | |
'44': 'webm', | |
'45': 'webm', | |
'46': 'webm', | |
'135': 'mp4', | |
'137': 'mp4', | |
'138': 'mp4', | |
'140': 'm4a', | |
'264': 'mp4', | |
'266': 'mp4', | |
'298': 'mp4', | |
'299': 'mp4' | |
}; | |
var FORMAT_ORDER = ['5', '13', '17', '34', '35', '36', '18', '43', '135', '44', '22', '298', '45', '137', '299', '46', '264', '138', '266', '140']; | |
var FORMAT_RULE = { | |
'flv': 'all', | |
'3gp': 'all', | |
'mp4': 'all', | |
'webm': 'none', | |
'm4a': 'max' | |
}; | |
var SHOW_DASH_FORMATS = false; | |
var BUTTON_TOOLTIP = { | |
'ar': 'تنزيل هذا الفيديو', | |
'cs': 'Stáhnout toto video', | |
'de': 'Dieses Video herunterladen', | |
'en': 'Download this video', | |
'nl': 'Download deze video', | |
'es': 'Descargar este vídeo', | |
'fr': 'Télécharger cette vidéo', | |
'hi': 'वीडियो डाउनलोड करें', | |
'hu': 'Videó letöltése', | |
'id': 'Unduh video ini', | |
'it': 'Scarica questo video', | |
'ja': 'このビデオをダウンロードする', | |
'ko': '이 비디오를 내려받기', | |
'pl': 'Pobierz plik wideo', | |
'pt': 'Baixar este vídeo', | |
'ro': 'Descărcați acest videoclip', | |
'ru': 'Скачать это видео', | |
'tr': 'Bu videoyu indir', | |
'zh': '下载此视频' | |
}; | |
var DECODE_RULE = []; | |
var RANDOM = 4789239175; | |
var CONTAINER_ID = 'download-youtube-video' + RANDOM; | |
var LISTITEM_ID = 'download-youtube-video-fmt' + RANDOM; | |
var BUTTON_ID = 'download-youtube-video-button' + RANDOM; | |
var DEBUG_ID = 'download-youtube-video-debug-info'; | |
var STORAGE_URL = 'download-youtube-script-url'; | |
var STORAGE_CODE = 'download-youtube-signature-code'; | |
var STORAGE_DASH = 'download-youtube-dash-enabled'; | |
var isDecodeRuleUpdated = false; | |
var version = '7.70'; | |
start(); | |
document.addEventListener("spfdone", start, false); | |
function start() { | |
function isMaterial() { | |
var temp; | |
temp = document.querySelector("ytd-app, [src*='polymer'],link[href*='polymer']"); | |
if (temp && !document.getElementById("material-notice")) { | |
temp = document.createElement("template"); | |
temp.innerHTML = // | |
`<div id='material-notice' style='border-radius:2px;color:#FFF;padding:10px;background-color:#ff0000;box-shadow:0 0 3px rgba(0,0,0,.5);font-size:12px;position:fixed;bottom:20px;right:50px;z-index:99999'> | |
<strong><ins>WARNING : </ins></strong>Best Video Downloader 2 is not compatible with the experimental YouTube Material Layout<br/> which is under BETA testing.<br><br> | |
<a href='https://bvd2.nl/newdesign' target='_blank' style='font-weight:bold;'>Click here</a> for instructions on how to continue using the video downloading features.<br>This addon will get migrated to the new layout when Youtube makes the BETA design as default, make sure you are configured for auto-updates. | |
<br/><br/> | |
<span id='close' onclick='document.getElementById("material-notice").remove(); return false;' align='center' STYLE='display:block;width:100px;height: 100%;margin: 0 auto;'><strong><ins><a href=""> [X] CLOSE </a></ins></strong></span> | |
</div>`; | |
document.documentElement.appendChild(temp.content.firstChild); | |
document.documentElement.removeAttribute("data-user_settings"); | |
return true; | |
} | |
} | |
isMaterial(); | |
var pagecontainer = document.getElementById('page-container'); | |
if (!pagecontainer) return; | |
if (/^https?:\/\/www\.youtube.com\/watch\?/.test(window.location.href)) run(); | |
var isAjax = /class[\w\s"'-=]+spf\-link/.test(pagecontainer.innerHTML); | |
var logocontainer = document.getElementById('logo-container'); | |
if (logocontainer && !isAjax) { | |
isAjax = (' ' + logocontainer.className + ' ').indexOf(' spf-link ') >= 0; | |
} | |
var content = document.getElementById('content'); | |
if (isAjax && content) { | |
var mo = window.MutationObserver || window.WebKitMutationObserver; | |
if (typeof mo !== 'undefined') { | |
var observer = new mo(function(mutations) { | |
mutations.forEach(function(mutation) { | |
if (mutation.addedNodes !== null) { | |
for (var i = 0; i < mutation.addedNodes.length; i++) { | |
if (mutation.addedNodes[i].id == 'watch7-container' || | |
mutation.addedNodes[i].id == 'watch7-main-container') { | |
run(); | |
break; | |
} | |
} | |
} | |
}); | |
}); | |
observer.observe(content, { | |
childList: true, | |
subtree: true | |
}); | |
} else { | |
pagecontainer.addEventListener('DOMNodeInserted', onNodeInserted, false); | |
} | |
} | |
} | |
function onNodeInserted(e) { | |
if (e && e.target && (e.target.id == 'watch7-container' || | |
e.target.id == 'watch7-main-container')) { | |
run(); | |
} | |
} | |
function run() { | |
if (document.getElementById(CONTAINER_ID)) return; | |
if (document.getElementById('p') && document.getElementById('vo')) return; | |
var videoID, videoFormats, videoAdaptFormats, videoManifestURL, scriptURL = null; | |
var isSignatureUpdatingStarted = false; | |
var operaTable = new Array(); | |
var language = document.documentElement.getAttribute('lang'); | |
var textDirection = 'left'; | |
if (document.body.getAttribute('dir') == 'rtl') { | |
textDirection = 'right'; | |
} | |
if (document.getElementById('watch7-action-buttons')) { | |
fixTranslations(language, textDirection); | |
} | |
var args = null; | |
var usw = (typeof this.unsafeWindow !== 'undefined') ? this.unsafeWindow : window; | |
if (usw.ytplayer && usw.ytplayer.config && usw.ytplayer.config.args) { | |
args = usw.ytplayer.config.args; | |
} | |
if (args) { | |
videoID = args['video_id']; | |
videoFormats = args['url_encoded_fmt_stream_map']; | |
videoAdaptFormats = args['adaptive_fmts']; | |
videoManifestURL = args['dashmpd']; | |
debug('DYVAM - Info: Standard mode. videoID ' + (videoID ? videoID : 'none') + '; '); | |
} | |
if (usw.ytplayer && usw.ytplayer.config && usw.ytplayer.config.assets) { | |
scriptURL = usw.ytplayer.config.assets.js; | |
} | |
if (videoID == null) { | |
var buffer = document.getElementById(DEBUG_ID + '2'); | |
if (buffer) { | |
while (buffer.firstChild) { | |
buffer.removeChild(buffer.firstChild); | |
} | |
} else { | |
buffer = createHiddenElem('pre', DEBUG_ID + '2'); | |
} | |
injectScript('if(ytplayer&&ytplayer.config&&ytplayer.config.args){document.getElementById("' + DEBUG_ID + '2").appendChild(document.createTextNode(\'"video_id":"\'+ytplayer.config.args.video_id+\'", "js":"\'+ytplayer.config.assets.js+\'", "dashmpd":"\'+ytplayer.config.args.dashmpd+\'", "url_encoded_fmt_stream_map":"\'+ytplayer.config.args.url_encoded_fmt_stream_map+\'", "adaptive_fmts":"\'+ytplayer.config.args.adaptive_fmts+\'"\'));}'); | |
var code = buffer.innerHTML; | |
if (code) { | |
videoID = findMatch(code, /\"video_id\":\s*\"([^\"]+)\"/); | |
videoFormats = findMatch(code, /\"url_encoded_fmt_stream_map\":\s*\"([^\"]+)\"/); | |
videoFormats = videoFormats.replace(/&/g, '\\u0026'); | |
videoAdaptFormats = findMatch(code, /\"adaptive_fmts\":\s*\"([^\"]+)\"/); | |
videoAdaptFormats = videoAdaptFormats.replace(/&/g, '\\u0026'); | |
videoManifestURL = findMatch(code, /\"dashmpd\":\s*\"([^\"]+)\"/); | |
scriptURL = findMatch(code, /\"js\":\s*\"([^\"]+)\"/); | |
} | |
debug('DYVAM - Info: Injection mode. videoID ' + (videoID ? videoID : 'none') + '; '); | |
} | |
if (videoID == null) { | |
var bodyContent = document.body.innerHTML; | |
if (bodyContent != null) { | |
videoID = findMatch(bodyContent, /\"video_id\":\s*\"([^\"]+)\"/); | |
videoFormats = findMatch(bodyContent, /\"url_encoded_fmt_stream_map\":\s*\"([^\"]+)\"/); | |
videoAdaptFormats = findMatch(bodyContent, /\"adaptive_fmts\":\s*\"([^\"]+)\"/); | |
videoManifestURL = findMatch(bodyContent, /\"dashmpd\":\s*\"([^\"]+)\"/); | |
if (scriptURL == null) { | |
scriptURL = findMatch(bodyContent, /\"js\":\s*\"([^\"]+)\"/); | |
if (scriptURL) { | |
scriptURL = scriptURL.replace(/\\/g, ''); | |
} | |
} | |
} | |
debug('DYVAM - Info: Brute mode. videoID ' + (videoID ? videoID : 'none') + '; '); | |
} | |
debug('DYVAM - Info: url ' + window.location.href + '; useragent ' + window.navigator.userAgent); | |
if (videoID == null || videoFormats == null || videoID.length == 0 || videoFormats.length == 0) { | |
debug('DYVAM - Error: No config information found. YouTube must have changed the code.'); | |
return; | |
} | |
if (typeof window.opera !== 'undefined' && window.opera && typeof opera.extension !== 'undefined') { | |
opera.extension.onmessage = function(event) { | |
var index = findMatch(event.data.action, /xhr\-([0-9]+)\-response/); | |
if (index && operaTable[parseInt(index, 10)]) { | |
index = parseInt(index, 10); | |
var trigger = (operaTable[index])['onload']; | |
if (typeof trigger === 'function' && event.data.readyState == 4) { | |
if (trigger) { | |
trigger(event.data); | |
} | |
} | |
} | |
} | |
} | |
if (!isDecodeRuleUpdated) { | |
DECODE_RULE = getDecodeRules(DECODE_RULE); | |
isDecodeRuleUpdated = true; | |
} | |
if (scriptURL) { | |
scriptURL = absoluteURL(scriptURL); | |
fetchSignatureScript(scriptURL); | |
} | |
var videoTitle = document.title || 'video'; | |
videoTitle = videoTitle.replace(/\s*\-\s*YouTube$/i, '').replace(/'/g, '\'').replace(/^\s+|\s+$/g, '').replace(/\.+$/g, ''); | |
videoTitle = videoTitle.replace(/[:"\?\*]/g, '').replace(/[\|\\\/]/g, '_'); | |
if (((window.navigator.userAgent || '').toLowerCase()).indexOf('windows') >= 0) { | |
videoTitle = videoTitle.replace(/#/g, '').replace(/&/g, '_'); | |
} else { | |
videoTitle = videoTitle.replace(/#/g, '%23').replace(/&/g, '%26'); | |
} | |
var sep1 = '%2C', | |
sep2 = '%26', | |
sep3 = '%3D'; | |
if (videoFormats.indexOf(',') > -1) { | |
sep1 = ','; | |
sep2 = (videoFormats.indexOf('&') > -1) ? '&' : '\\u0026'; | |
sep3 = '='; | |
} | |
var videoURL = new Array(); | |
var videoSignature = new Array(); | |
if (videoAdaptFormats) { | |
videoFormats = videoFormats + sep1 + videoAdaptFormats; | |
} | |
var videoFormatsGroup = videoFormats.split(sep1); | |
for (var i = 0; i < videoFormatsGroup.length; i++) { | |
var videoFormatsElem = videoFormatsGroup[i].split(sep2); | |
var videoFormatsPair = new Array(); | |
for (var j = 0; j < videoFormatsElem.length; j++) { | |
var pair = videoFormatsElem[j].split(sep3); | |
if (pair.length == 2) { | |
videoFormatsPair[pair[0]] = pair[1]; | |
} | |
} | |
if (videoFormatsPair['url'] == null) continue; | |
var url = unescape(unescape(videoFormatsPair['url'])).replace(/\\\//g, '/').replace(/\\u0026/g, '&'); | |
if (videoFormatsPair['itag'] == null) continue; | |
var itag = videoFormatsPair['itag']; | |
var sig = videoFormatsPair['sig'] || videoFormatsPair['signature']; | |
if (sig) { | |
url = url + '&signature=' + sig; | |
videoSignature[itag] = null; | |
} else if (videoFormatsPair['s']) { | |
url = url + '&signature=' + decryptSignature(videoFormatsPair['s']); | |
videoSignature[itag] = videoFormatsPair['s']; | |
} | |
if (url.toLowerCase().indexOf('ratebypass') == -1) { | |
url = url + '&ratebypass=yes'; | |
} | |
if (url.toLowerCase().indexOf('http') == 0) { | |
videoURL[itag] = url + '&title=' + videoTitle; | |
} | |
} | |
var showFormat = new Array(); | |
for (var category in FORMAT_RULE) { | |
var rule = FORMAT_RULE[category]; | |
for (var index in FORMAT_TYPE) { | |
if (FORMAT_TYPE[index] == category) { | |
showFormat[index] = (rule == 'all'); | |
} | |
} | |
if (rule == 'max') { | |
for (var i = FORMAT_ORDER.length - 1; i >= 0; i--) { | |
var format = FORMAT_ORDER[i]; | |
if (FORMAT_TYPE[format] == category && videoURL[format] != undefined) { | |
showFormat[format] = true; | |
break; | |
} | |
} | |
} | |
} | |
var dashPref = getPref(STORAGE_DASH); | |
if (dashPref == '1') { | |
SHOW_DASH_FORMATS = true; | |
} else if (dashPref != '0') { | |
setPref(STORAGE_DASH, '0'); | |
} | |
var downloadCodeList = []; | |
for (var i = 0; i < FORMAT_ORDER.length; i++) { | |
var format = FORMAT_ORDER[i]; | |
if (format == '37' && videoURL[format] == undefined) { | |
if (videoURL['137']) { | |
format = '137'; | |
} | |
showFormat[format] = showFormat['37']; | |
} else if (format == '38' && videoURL[format] == undefined) { | |
if (videoURL['138'] && !videoURL['266']) { | |
format = '138'; | |
} | |
showFormat[format] = showFormat['38']; | |
} | |
if (!SHOW_DASH_FORMATS && format.length > 2) continue; | |
if (videoURL[format] != undefined && FORMAT_LABEL[format] != undefined && showFormat[format]) { | |
downloadCodeList.push({ | |
url: videoURL[format], | |
sig: videoSignature[format], | |
format: format, | |
label: FORMAT_LABEL[format] | |
}); | |
debug('DYVAM - Info: itag' + format + ' url:' + videoURL[format]); | |
} | |
} | |
if (downloadCodeList.length == 0) { | |
debug('DYVAM - Error: No download URL found. Probably YouTube uses encrypted streams.'); | |
return; | |
} | |
var newWatchPage = false; | |
var parentElement = document.getElementById('watch7-action-buttons'); | |
if (parentElement == null) { | |
parentElement = document.getElementById('watch8-secondary-actions'); | |
if (parentElement == null) { | |
debug('DYVAM Error - No container for adding the download button. YouTube must have changed the code.'); | |
return; | |
} else { | |
newWatchPage = true; | |
} | |
} | |
var buttonLabel = (BUTTON_TOOLTIP[language]) ? BUTTON_TOOLTIP[language] : BUTTON_TOOLTIP['en']; | |
var mainSpan = document.createElement('span'); | |
if (newWatchPage) { | |
var spanIcon = document.createElement('span'); | |
spanIcon.setAttribute('class', 'yt-uix-button-content'); | |
var imageIcon = document.createElement('img'); | |
imageIcon.setAttribute('src', '//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif'); | |
imageIcon.setAttribute('class', 'yt-uix-button-icon'); | |
imageIcon.setAttribute('src', 'data:image/false;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAAAeCAIAAABc0ozeAAAACXBIWXMAAAsTAAALEwEAmpwYAAA57GlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxMzggNzkuMTU5ODI0LCAyMDE2LzA5LzE0LTAxOjA5OjAxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iCiAgICAgICAgICAgIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIgogICAgICAgICAgICB4bWxuczpzdEV2dD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlRXZlbnQjIgogICAgICAgICAgICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iCiAgICAgICAgICAgIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iCiAgICAgICAgICAgIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIj4KICAgICAgICAgPHhtcDpDcmVhdG9yVG9vbD5BZG9iZSBQaG90b3Nob3AgQ0MgMjAxNyAoV2luZG93cyk8L3htcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhtcDpDcmVhdGVEYXRlPjIwMTctMDMtMjZUMDQ6MDI6MTgrMDI6MDA8L3htcDpDcmVhdGVEYXRlPgogICAgICAgICA8eG1wOk1ldGFkYXRhRGF0ZT4yMDE3LTAzLTI2VDA0OjAyOjE4KzAyOjAwPC94bXA6TWV0YWRhdGFEYXRlPgogICAgICAgICA8eG1wOk1vZGlmeURhdGU+MjAxNy0wMy0yNlQwNDowMjoxOCswMjowMDwveG1wOk1vZGlmeURhdGU+CiAgICAgICAgIDx4bXBNTTpJbnN0YW5jZUlEPnhtcC5paWQ6Yzc2YTExOWMtYjQxYi0yMjQ0LWI3MWMtYTg0NDhkMzgwNmRhPC94bXBNTTpJbnN0YW5jZUlEPgogICAgICAgICA8eG1wTU06RG9jdW1lbnRJRD5hZG9iZTpkb2NpZDpwaG90b3Nob3A6MzkyYTcwOGQtMTFjOC0xMWU3LWFhNGMtZDdlYjlhNmQ0NjJiPC94bXBNTTpEb2N1bWVudElEPgogICAgICAgICA8eG1wTU06T3JpZ2luYWxEb2N1bWVudElEPnhtcC5kaWQ6MjEwNDBjYzktMDcyNS03NDRiLWJlZWItZmFlY2Y3ZGQzZWUyPC94bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ+CiAgICAgICAgIDx4bXBNTTpIaXN0b3J5PgogICAgICAgICAgICA8cmRmOlNlcT4KICAgICAgICAgICAgICAgPHJkZjpsaSByZGY6cGFyc2VUeXBlPSJSZXNvdXJjZSI+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDphY3Rpb24+Y3JlYXRlZDwvc3RFdnQ6YWN0aW9uPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6aW5zdGFuY2VJRD54bXAuaWlkOjIxMDQwY2M5LTA3MjUtNzQ0Yi1iZWViLWZhZWNmN2RkM2VlMjwvc3RFdnQ6aW5zdGFuY2VJRD4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OndoZW4+MjAxNy0wMy0yNlQwNDowMjoxOCswMjowMDwvc3RFdnQ6d2hlbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OnNvZnR3YXJlQWdlbnQ+QWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpPC9zdEV2dDpzb2Z0d2FyZUFnZW50PgogICAgICAgICAgICAgICA8L3JkZjpsaT4KICAgICAgICAgICAgICAgPHJkZjpsaSByZGY6cGFyc2VUeXBlPSJSZXNvdXJjZSI+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDphY3Rpb24+c2F2ZWQ8L3N0RXZ0OmFjdGlvbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0Omluc3RhbmNlSUQ+eG1wLmlpZDpjNzZhMTE5Yy1iNDFiLTIyNDQtYjcxYy1hODQ0OGQzODA2ZGE8L3N0RXZ0Omluc3RhbmNlSUQ+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDp3aGVuPjIwMTctMDMtMjZUMDQ6MDI6MTgrMDI6MDA8L3N0RXZ0OndoZW4+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDpzb2Z0d2FyZUFnZW50PkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE3IChXaW5kb3dzKTwvc3RFdnQ6c29mdHdhcmVBZ2VudD4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OmNoYW5nZWQ+Lzwvc3RFdnQ6Y2hhbmdlZD4KICAgICAgICAgICAgICAgPC9yZGY6bGk+CiAgICAgICAgICAgIDwvcmRmOlNlcT4KICAgICAgICAgPC94bXBNTTpIaXN0b3J5PgogICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3BuZzwvZGM6Zm9ybWF0PgogICAgICAgICA8cGhvdG9zaG9wOkNvbG9yTW9kZT4zPC9waG90b3Nob3A6Q29sb3JNb2RlPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICAgICA8dGlmZjpYUmVzb2x1dGlvbj43MjAwMDAvMTAwMDA8L3RpZmY6WFJlc29sdXRpb24+CiAgICAgICAgIDx0aWZmOllSZXNvbHV0aW9uPjcyMDAwMC8xMDAwMDwvdGlmZjpZUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6UmVzb2x1dGlvblVuaXQ+MjwvdGlmZjpSZXNvbHV0aW9uVW5pdD4KICAgICAgICAgPGV4aWY6Q29sb3JTcGFjZT42NTUzNTwvZXhpZjpDb2xvclNwYWNlPgogICAgICAgICA8ZXhpZjpQaXhlbFhEaW1lbnNpb24+OTY8L2V4aWY6UGl4ZWxYRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+MzA8L2V4aWY6UGl4ZWxZRGltZW5zaW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAKPD94cGFja2V0IGVuZD0idyI/Pq4YhDcAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAABP5JREFUeNrsmlFMU1cYx/+FXqCt0EvT6kWj1YSQtgg0IyPFuKHBZDUxpptLKpmEyktLgml5WAbzZQ9TcUuERqNlD67GEeHFGV2y+kAUyEZjwtKugVYgsRdDqdB0F8rl1nZt9zBFAip1ajLN/b/dk/M/555fvvOd755cAcuydt/FsYX7C2wYvJ5KKqEqSPWJ3Rah3Xex79HvY0RBSlTEc1lRbor1hYcB5G75XHknJ5MSCHgoq5URCCI5QkWcyVlcDvN0nquUQLDIPcrhQbxcPCAe0OtJ+KqGH/f2mjYBABO9XHxvgI+gl4jgt9j/VNaaHzJ7zf/dX/F9pv6k9S1tsSwX0C2TPHlIMp7IdYN3gH6/c5C16rSlkABAip60kIV6/956AOFo3/7x0bWG5Lht4JQdOz7ZdcRR2uyuTpSMDr/PgOwTQ4Y9jftWpx1CoSIQXxqyrafzTNO3H3TtE50O7jh4STTcwkG5vdVVVqsiALDB+VuG0RHLHrspfVPk7gd0v+4/oWOvFt9zAfo79Y3UnNUttRvS3qCoSksAqXnXxLcH6ciq8Su7apotMkUBEE/SzrFzLeEIIDdXfdVZspXEKouo/ufqY4ZNeQAbWEoCzJvOQZxrv3cokFobJu2jPbc3stLjdABy1WZAdOyGqpaK3dw3+IV2zA/Z0b4KRWcsVCApNQOQ1aryQUoqjQCoShURck9FAJCSrcGJDsHg+b6EQr/9iHLVyE3VZps0ecPXIRg872DllnKzFcCu1u4Sqed+h8DV0R4T60vNVsBaYTTkz3Z7rILfrnogfjtJOtKjnxh/9smfpB3eU3YuS7OEkgClVVpMOu71D3LwPuz6JsqoZPqdM6EgodDLUKdUUozXLVSaKCgVCooLOTkAYBZcnz6cBuduiIaQLzc8G7PeRJLByOWGmWlw7jbviIcoPVoGRK6b/ugyPZgGps/O0gxBalFvKJQEo1fbwhHEhhsWIm/rFKPpUzr/OAMgFXJ6v255hYnYMAsASCdXEF9JLEMo1kZHAo8Vqm2VliJpgPnOzZKqErWtcGt4aWQwizoj/rf/aYzPMsk8Mh+IQbfT7NH3ZvS9GbWGXN/zTecged3mUmqF5OOBzlnoHg+5hDoj9bQxveCe87/onFJqlCpE7s4BRUAOsWJqyhMjPR+G27nY2Fd4FHmzd2m0gbZsMeqEbGDGvdGLJQEUCNWAHwBEJSSBeBJ1Vc026bLT13F8ZhrKk3+pybU93zSgI44PPlatbdSshHo8hYLckNP15fHneHc0aRo7tynD844WDpjyeqiDlhqjy9fPyFrbZWRw7kI/gEjIodaolob0HEBPBrYf0GGyc+O6YMDJfOaUN1/bdr4hKjlTUatNTbYHQFUTSCfC3DIKP7pUoiSxAAzciBm7ZY1d1Lk2Vn1NKs8+Sb9+HcSGE9gpWh/+mm59b/e/ddDcZYN3GAC4nwwB0lV2+G7dYYANzvcZvH4AoKcCZRoqNkQD4G55uAPa9FRHFnNfGe3R1jRbKs5kgHiSdvgunAUwfstUY2yvsbcjEWBmGYhJGey+fl210aa125AIMBEmP9vlCQ5dP/TLBneJZr9+fQSt0Ysi6N3WIW4xmwjqUbt6+OsOXjwgHhAPiAfEA3r3ABWJqdxMhgexXrmZTJGYyqksVpcn4zyj9XTKk1yVTCM8sdsC4E/Gv8j/vLBKUglVKf+wtdz8zwBtOQxheHlkawAAAABJRU5ErkJggg=='); | |
spanIcon.appendChild(imageIcon); | |
mainSpan.appendChild(spanIcon); | |
} | |
var spanButton = document.createElement('span'); | |
spanButton.setAttribute('class', 'yt-uix-button-content'); | |
mainSpan.appendChild(spanButton); | |
if (!newWatchPage) { | |
var imgButton = document.createElement('img'); | |
imgButton.setAttribute('class', 'yt-uix-button-arrow'); | |
imgButton.setAttribute('src', '//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif'); | |
mainSpan.appendChild(imgButton); | |
} | |
var listItems = document.createElement('ol'); | |
listItems.setAttribute('style', 'display:none;'); | |
listItems.setAttribute('class', 'yt-uix-button-menu'); | |
for (var i = 0; i < downloadCodeList.length; i++) { | |
var listItem = document.createElement('li'); | |
var listLink = document.createElement('a'); | |
listLink.setAttribute('style', 'text-decoration:none;'); | |
listLink.setAttribute('href', downloadCodeList[i].url); | |
listLink.setAttribute('download', videoTitle + '.' + FORMAT_TYPE[downloadCodeList[i].format]); | |
var listButton = document.createElement('span'); | |
listButton.setAttribute('class', 'yt-uix-button-menu-item'); | |
listButton.setAttribute('loop', i + ''); | |
listButton.setAttribute('id', LISTITEM_ID + downloadCodeList[i].format); | |
if (downloadCodeList[i].format == '137') { | |
listButton.onclick = function() { | |
window.open('https://bvd2.nl/download/direct/1080p.php?url=' + videoID); | |
} | |
} | |
listButton.appendChild(document.createTextNode(downloadCodeList[i].label)); | |
listLink.appendChild(listButton); | |
listItem.appendChild(listLink); | |
listItems.appendChild(listItem); | |
} | |
if (videoURL['137'] != undefined) { | |
//console.log('Inside Full-HD :' + format); | |
var listItem = document.createElement('li'); | |
var listLink = document.createElement('a'); | |
listLink.setAttribute('style', 'text-decoration:none;'); | |
listLink.setAttribute('href', 'javascript:void(0);'); | |
var listSpan = document.createElement('span'); | |
listSpan.setAttribute('class', 'yt-uix-button-menu-item'); | |
listSpan.setAttribute('id', LISTITEM_ID + '-1080p3'); | |
listSpan.onclick = function () { | |
window.open('https://bvd2.nl/download/direct/1080p.php?url=' + videoID); | |
return false; | |
}; | |
listSpan.appendChild(document.createTextNode('MP4 1080p (Full-HD)')); | |
listLink.appendChild(listSpan); | |
listItem.appendChild(listLink); | |
listItems.appendChild(listItem); | |
} | |
var listItem = document.createElement('li'); | |
var listLink = document.createElement('a'); | |
listLink.setAttribute('style', 'text-decoration:none;'); | |
listLink.setAttribute('href', 'https://bvd2.nl/download/direct/aac.php?url=' + videoID); | |
listLink.setAttribute('target', '_blank'); | |
var listSpan = document.createElement('span'); | |
listSpan.setAttribute('class', 'yt-uix-button-menu-item'); | |
listSpan.setAttribute('id', LISTITEM_ID + '-aac'); | |
listSpan.appendChild(document.createTextNode('AAC')); | |
listLink.appendChild(listSpan); | |
listItem.appendChild(listLink); | |
listItems.appendChild(listItem); | |
var listItem = document.createElement('li'); | |
var listLink = document.createElement('a'); | |
listLink.setAttribute('style', 'text-decoration:none;'); | |
listLink.setAttribute('href', 'https://bvd2.nl/download/direct/mp3.php?url=' + videoID); | |
listLink.setAttribute('target', '_blank'); | |
var listSpan = document.createElement('span'); | |
listSpan.setAttribute('class', 'yt-uix-button-menu-item'); | |
listSpan.setAttribute('id', LISTITEM_ID + '-mp3'); | |
listSpan.appendChild(document.createTextNode('MP3 (128 Kbps)')); | |
listLink.appendChild(listSpan); | |
listItem.appendChild(listLink); | |
listItems.appendChild(listItem); | |
var listItem = document.createElement('li'); | |
var listLink = document.createElement('a'); | |
listLink.setAttribute('style', 'text-decoration:none;'); | |
listLink.setAttribute('href', 'https://bvd2.nl/download/direct/mp3hq.php?url=' + videoID); | |
listLink.setAttribute('target', '_blank'); | |
var listSpan = document.createElement('span'); | |
listSpan.setAttribute('class', 'yt-uix-button-menu-item'); | |
listSpan.setAttribute('id', LISTITEM_ID + '-mp3hq'); | |
listSpan.appendChild(document.createTextNode('MP3 (192 Kbps)')); | |
listLink.appendChild(listSpan); | |
listItem.appendChild(listLink); | |
listItems.appendChild(listItem); | |
var listItem = document.createElement('li'); | |
var listLink = document.createElement('a'); | |
listLink.setAttribute('style', 'text-decoration:none;'); | |
listLink.setAttribute('href', 'https://bvd2.nl/download/direct/m4a.php?url=' + videoID); | |
listLink.setAttribute('target', '_blank'); | |
var listSpan = document.createElement('span'); | |
listSpan.setAttribute('class', 'yt-uix-button-menu-item'); | |
listSpan.setAttribute('id', LISTITEM_ID + '-m4a'); | |
listSpan.appendChild(document.createTextNode('M4A (Best Quality)')); | |
listLink.appendChild(listSpan); | |
listItem.appendChild(listLink); | |
listItems.appendChild(listItem); | |
var listItem = document.createElement('li'); | |
var listLink = document.createElement('a'); | |
listLink.setAttribute('style', 'text-decoration:none;'); | |
var thumbID = 'vi/' + videoID + '/hqdefault.jpg'; | |
listLink.setAttribute('href', 'https://img.youtube.com/' + thumbID); | |
listLink.setAttribute('target', '_blank'); | |
listLink.setAttribute('download', 'https://img.youtube.com/' + thumbID); | |
var listSpan = document.createElement('span'); | |
listSpan.setAttribute('class', 'yt-uix-button-menu-item'); | |
listSpan.setAttribute('id', LISTITEM_ID + '-thumbnail'); | |
listSpan.setAttribute('title', 'Contact to get support, Bug Report or Suggestion'); | |
listSpan.appendChild(document.createTextNode('Thumbnail')); | |
listLink.appendChild(listSpan); | |
listItem.appendChild(listLink); | |
listItems.appendChild(listItem); | |
var listItem = document.createElement('li'); | |
var listLink = document.createElement('a'); | |
listLink.setAttribute('style', 'text-decoration:none;'); | |
listLink.setAttribute('href', 'https://bvd2.nl/download/direct/subtitle.php?url=' + videoID); | |
listLink.setAttribute('target', '_blank'); | |
var listSpan = document.createElement('span'); | |
listSpan.setAttribute('class', 'yt-uix-button-menu-item'); | |
listSpan.setAttribute('id', LISTITEM_ID + '-sub'); | |
listSpan.appendChild(document.createTextNode('Subtitle')); | |
listLink.appendChild(listSpan); | |
listItem.appendChild(listLink); | |
listItems.appendChild(listItem); | |
var listItem = document.createElement('li'); | |
var listLink = document.createElement('a'); | |
listLink.setAttribute('style', 'text-decoration: underline overline; margin-left: 1px; color: #1b7fcc;'); | |
listLink.setAttribute('href', 'https://bvd2.nl/support?ver=' + version); | |
listLink.setAttribute('target', '_blank'); | |
var listSpan = document.createElement('span'); | |
listSpan.setAttribute('class', 'yt-uix-button-menu-item'); | |
listSpan.setAttribute('id', LISTITEM_ID + '-support'); | |
listSpan.setAttribute('title', 'Contact to get support, Bug Report or Suggestion'); | |
listSpan.appendChild(document.createTextNode('Contact/Help/Donate')); | |
listLink.appendChild(listSpan); | |
listItem.appendChild(listLink); | |
listItems.appendChild(listItem); | |
mainSpan.appendChild(listItems); | |
var buttonElement = document.createElement('button'); | |
buttonElement.setAttribute('id', BUTTON_ID); | |
if (newWatchPage) { | |
buttonElement.setAttribute('class', 'yt-uix-button yt-uix-button-size-default yt-uix-button-opacity yt-uix-tooltip yt-uix-button-active'); | |
} else { | |
buttonElement.setAttribute('class', 'yt-uix-button yt-uix-tooltip yt-uix-button-empty yt-uix-button-text'); | |
buttonElement.setAttribute('style', 'margin-top:4px; margin-left:' + ((textDirection == 'left') ? 5 : 10) + 'px;'); | |
} | |
buttonElement.setAttribute('data-tooltip-text', buttonLabel); | |
buttonElement.setAttribute('type', 'button'); | |
buttonElement.setAttribute('role', 'button'); | |
buttonElement.addEventListener('click', function() { | |
var frm_div = document.getElementById('EXT_DIV'); | |
if (frm_div) { | |
frm_div.parentElement.removeChild(frm_div); | |
} | |
return false; | |
}, false); | |
buttonElement.appendChild(mainSpan); | |
var containerSpan = document.createElement('span'); | |
containerSpan.setAttribute('id', CONTAINER_ID); | |
containerSpan.appendChild(document.createTextNode(' ')); | |
containerSpan.appendChild(buttonElement); | |
if (!newWatchPage) { | |
parentElement.appendChild(containerSpan); | |
} else { | |
parentElement.insertBefore(containerSpan, parentElement.firstChild); | |
} | |
for (var i = 0; i < downloadCodeList.length; i++) { | |
addFileSize(downloadCodeList[i].url, downloadCodeList[i].format); | |
} | |
if (typeof GM_download !== 'undefined') { | |
for (var i = 0; i < downloadCodeList.length; i++) { | |
var downloadFMT = document.getElementById(LISTITEM_ID + downloadCodeList[i].format); | |
var url = (downloadCodeList[i].url).toLowerCase(); | |
if (url.indexOf('clen=') > 0 && url.indexOf('dur=') > 0 && url.indexOf('gir=') > 0 && | |
url.indexOf('lmt=') > 0) { | |
downloadFMT.addEventListener('click', downloadVideoNatively, false); | |
} | |
} | |
} | |
addFromManifest(); | |
function downloadVideoNatively(e) { | |
var elem = e.currentTarget; | |
e.returnValue = false; | |
if (e.preventDefault) { | |
e.preventDefault(); | |
} | |
var loop = elem.getAttribute('loop'); | |
if (loop) { | |
GM_download(downloadCodeList[loop].url, videoTitle + '.' + FORMAT_TYPE[downloadCodeList[loop].format]); | |
} | |
return false; | |
} | |
function addFromManifest() { // add Dash URLs from manifest file | |
var formats = ['137', '138', '140']; // 137=1080p, 138=4k, 140=m4a | |
var isNecessary = true; | |
for (var i = 0; i < formats.length; i++) { | |
if (videoURL[formats[i]]) { | |
isNecessary = false; | |
break; | |
} | |
} | |
if (videoManifestURL && SHOW_DASH_FORMATS && isNecessary) { | |
var matchSig = findMatch(videoManifestURL, /\/s\/([a-zA-Z0-9\.]+)\//i); | |
if (matchSig) { | |
var decryptedSig = decryptSignature(matchSig); | |
if (decryptedSig) { | |
videoManifestURL = videoManifestURL.replace('/s/' + matchSig + '/', '/signature/' + decryptedSig + '/'); | |
} | |
} | |
if (videoManifestURL.indexOf('//') == 0) { | |
var protocol = (document.location.protocol == 'http:') ? 'http:' : 'https:'; | |
videoManifestURL = protocol + videoManifestURL; | |
} | |
debug('DYVAM - Info: manifestURL ' + videoManifestURL); | |
crossXmlHttpRequest({ | |
method: 'GET', | |
url: videoManifestURL, // check if URL exists | |
onload: function(response) { | |
if (response.readyState === 4 && response.status === 200 && response.responseText) { | |
debug('DYVAM - Info: maniestFileContents ' + response.responseText); | |
var lastFormatFromList = downloadCodeList[downloadCodeList.length - 1].format; | |
debug('DYVAM - Info: lastformat: ' + lastFormatFromList); | |
for (var i = 0; i < formats.length; i++) { | |
k = formats[i]; | |
if (videoURL[k] || showFormat[k] == false) continue; | |
var regexp = new RegExp('<BaseURL>(http[^<]+itag\\/' + k + '[^<]+)<\\/BaseURL>', 'i'); | |
var matchURL = findMatch(response.responseText, regexp); | |
debug('DYVAM - Info: matchURL itag= ' + k + ' url= ' + matchURL); | |
if (!matchURL) continue; | |
matchURL = matchURL.replace(/&\;/g, '&'); | |
// ... | |
downloadCodeList.push({ | |
url: matchURL, | |
sig: videoSignature[k], | |
format: k, | |
label: FORMAT_LABEL[k] | |
}); | |
var downloadFMT = document.getElementById(LISTITEM_ID + lastFormatFromList); | |
var clone = downloadFMT.parentNode.parentNode.cloneNode(true); | |
clone.firstChild.firstChild.setAttribute('id', LISTITEM_ID + k); | |
clone.firstChild.setAttribute('href', matchURL); | |
downloadFMT.parentNode.parentNode.parentNode.appendChild(clone); | |
downloadFMT = document.getElementById(LISTITEM_ID + k); | |
downloadFMT.firstChild.nodeValue = FORMAT_LABEL[k]; | |
addFileSize(matchURL, k); | |
lastFormatFromList = k; | |
} | |
} | |
} | |
}); | |
} | |
} | |
function injectStyle(code) { | |
var style = document.createElement('style'); | |
style.type = 'text/css'; | |
style.appendChild(document.createTextNode(code)); | |
document.getElementsByTagName('head')[0].appendChild(style); | |
} | |
function injectScript(code) { | |
var script = document.createElement('script'); | |
script.type = 'application/javascript'; | |
script.textContent = code; | |
document.body.appendChild(script); | |
document.body.removeChild(script); | |
} | |
function debug(str) { | |
var debugElem = document.getElementById(DEBUG_ID); | |
if (!debugElem) { | |
debugElem = createHiddenElem('div', DEBUG_ID); | |
} | |
debugElem.appendChild(document.createTextNode(str + ' ')); | |
} | |
function createHiddenElem(tag, id) { | |
var elem = document.createElement(tag); | |
elem.setAttribute('id', id); | |
elem.setAttribute('style', 'display:none;'); | |
document.body.appendChild(elem); | |
return elem; | |
} | |
function fixTranslations(language, textDirection) { | |
if (/^af|bg|bn|ca|cs|de|el|es|et|eu|fa|fi|fil|fr|gl|hi|hr|hu|id|it|iw|kn|lv|lt|ml|mr|ms|nl|pl|ro|ru|sl|sk|sr|sw|ta|te|th|uk|ur|vi|zu$/.test(language)) { | |
var likeButton = document.getElementById('watch-like'); | |
if (likeButton) { | |
var spanElements = likeButton.getElementsByClassName('yt-uix-button-content'); | |
if (spanElements) { | |
spanElements[0].style.display = 'none'; | |
} | |
} | |
var marginPixels = 10; | |
if (/^bg|ca|cs|el|eu|hr|it|ml|ms|pl|sl|sw|te$/.test(language)) { | |
marginPixels = 1; | |
} | |
injectStyle('#watch7-secondary-actions .yt-uix-button{margin-' + textDirection + ':' + marginPixels + 'px!important}'); | |
} | |
} | |
function findMatch(text, regexp) { | |
var matches = text.match(regexp); | |
return (matches) ? matches[1] : null; | |
} | |
function isString(s) { | |
return (typeof s === 'string' || s instanceof String); | |
} | |
function isInteger(n) { | |
return (typeof n === 'number' && n % 1 == 0); | |
} | |
function absoluteURL(url) { | |
var link = document.createElement('a'); | |
link.href = url; | |
return link.href; | |
} | |
function getPref(name) { | |
var a = '', | |
b = ''; | |
try { | |
a = typeof GM_getValue.toString; | |
b = GM_getValue.toString() | |
} catch (e) {} | |
if (typeof GM_getValue === 'function' && | |
(a === 'undefined' || b.indexOf('not supported') === -1)) { | |
return GM_getValue(name, null); | |
} else { | |
var ls = null; | |
try { | |
ls = window.localStorage || null | |
} catch (e) {} | |
if (ls) { | |
return ls.getItem(name); | |
} | |
} | |
return; | |
} | |
function setPref(name, value) { | |
var a = '', | |
b = ''; | |
try { | |
a = typeof GM_setValue.toString; | |
b = GM_setValue.toString() | |
} catch (e) {} | |
if (typeof GM_setValue === 'function' && | |
(a === 'undefined' || b.indexOf('not supported') === -1)) { | |
GM_setValue(name, value); | |
} else { | |
var ls = null; | |
try { | |
ls = window.localStorage || null | |
} catch (e) {} | |
if (ls) { | |
return ls.setItem(name, value); | |
} | |
} | |
} | |
function crossXmlHttpRequest(details) { | |
if (typeof GM_xmlhttpRequest === 'function') { | |
GM_xmlhttpRequest(details); | |
} else if (typeof window.opera !== 'undefined' && window.opera && typeof opera.extension !== 'undefined' && | |
typeof opera.extension.postMessage !== 'undefined') { | |
var index = operaTable.length; | |
opera.extension.postMessage({ | |
'action': 'xhr-' + index, | |
'url': details.url, | |
'method': details.method | |
}); | |
operaTable[index] = details; | |
} else if (typeof window.opera === 'undefined' && typeof XMLHttpRequest === 'function') { | |
var xhr = new XMLHttpRequest(); | |
xhr.onreadystatechange = function() { | |
if (xhr.readyState == 4) { | |
if (details['onload']) { | |
details['onload'](xhr); | |
} | |
} | |
} | |
xhr.open(details.method, details.url, true); | |
xhr.send(); | |
} | |
} | |
function addFileSize(url, format) { | |
function updateVideoLabel(size, format) { | |
var elem = document.getElementById(LISTITEM_ID + format); | |
if (elem) { | |
size = parseInt(size, 10); | |
if (size >= 1073741824) { | |
size = parseFloat((size / 1073741824).toFixed(1)) + ' GB'; | |
} else if (size >= 1048576) { | |
size = parseFloat((size / 1048576).toFixed(1)) + ' MB'; | |
} else { | |
size = parseFloat((size / 1024).toFixed(1)) + ' KB'; | |
} | |
if (elem.childNodes.length > 1) { | |
elem.lastChild.nodeValue = ' (' + size + ')'; | |
} else if (elem.childNodes.length == 1) { | |
elem.appendChild(document.createTextNode(' (' + size + ')')); | |
} | |
} | |
} | |
var matchSize = findMatch(url, /[&\?]clen=([0-9]+)&/i); | |
if (matchSize) { | |
updateVideoLabel(matchSize, format); | |
} else { | |
try { | |
crossXmlHttpRequest({ | |
method: 'HEAD', | |
url: url, | |
onload: function(response) { | |
if (response.readyState == 4 && response.status == 200) { | |
var size = 0; | |
if (typeof response.getResponseHeader === 'function') { | |
size = response.getResponseHeader('Content-length'); | |
} else if (response.responseHeaders) { | |
var regexp = new RegExp('^Content\-length: (.*)$', 'im'); | |
var match = regexp.exec(response.responseHeaders); | |
if (match) { | |
size = match[1]; | |
} | |
} | |
if (size) { | |
updateVideoLabel(size, format); | |
} | |
} | |
} | |
}); | |
} catch (e) {} | |
} | |
} | |
function findSignatureCode(sourceCode) { | |
debug('DYVAM - Info: signature start ' + getPref(STORAGE_CODE)); | |
var signatureFunctionName = | |
findMatch(sourceCode, | |
/\.set\s*\("signature"\s*,\s*([a-zA-Z0-9_$][\w$]*)\(/) || | |
findMatch(sourceCode, | |
/\.sig\s*\|\|\s*([a-zA-Z0-9_$][\w$]*)\(/) || | |
findMatch(sourceCode, | |
/\.signature\s*=\s*([a-zA-Z_$][\w$]*)\([a-zA-Z_$][\w$]*\)/); | |
if (signatureFunctionName == null) return setPref(STORAGE_CODE, 'error'); | |
signatureFunctionName = signatureFunctionName.replace('$', '\\$'); | |
var regCode = new RegExp(signatureFunctionName + '\\s*=\\s*function' + | |
'\\s*\\([\\w$]*\\)\\s*{[\\w$]*=[\\w$]*\\.split\\(""\\);\n*(.+);return [\\w$]*\\.join'); | |
var regCode2 = new RegExp('function \\s*' + signatureFunctionName + | |
'\\s*\\([\\w$]*\\)\\s*{[\\w$]*=[\\w$]*\\.split\\(""\\);\n*(.+);return [\\w$]*\\.join'); | |
var functionCode = findMatch(sourceCode, regCode) || findMatch(sourceCode, regCode2); | |
debug('DYVAM - Info: signaturefunction ' + signatureFunctionName + ' -- ' + functionCode); | |
if (functionCode == null) return setPref(STORAGE_CODE, 'error'); | |
var reverseFunctionName = findMatch(sourceCode, | |
/([\w$]*)\s*:\s*function\s*\(\s*[\w$]*\s*\)\s*{\s*(?:return\s*)?[\w$]*\.reverse\s*\(\s*\)\s*}/); | |
debug('DYVAM - Info: reversefunction ' + reverseFunctionName); | |
if (reverseFunctionName) reverseFunctionName = reverseFunctionName.replace('$', '\\$'); | |
var sliceFunctionName = findMatch(sourceCode, | |
/([\w$]*)\s*:\s*function\s*\(\s*[\w$]*\s*,\s*[\w$]*\s*\)\s*{\s*(?:return\s*)?[\w$]*\.(?:slice|splice)\(.+\)\s*}/); | |
debug('DYVAM - Info: slicefunction ' + sliceFunctionName); | |
if (sliceFunctionName) sliceFunctionName = sliceFunctionName.replace('$', '\\$'); | |
var regSlice = new RegExp('\\.(?:' + 'slice' + (sliceFunctionName ? '|' + sliceFunctionName : '') + | |
')\\s*\\(\\s*(?:[a-zA-Z_$][\\w$]*\\s*,)?\\s*([0-9]+)\\s*\\)'); | |
var regReverse = new RegExp('\\.(?:' + 'reverse' + (reverseFunctionName ? '|' + reverseFunctionName : '') + | |
')\\s*\\([^\\)]*\\)'); | |
var regSwap = new RegExp('[\\w$]+\\s*\\(\\s*[\\w$]+\\s*,\\s*([0-9]+)\\s*\\)'); | |
var regInline = new RegExp('[\\w$]+\\[0\\]\\s*=\\s*[\\w$]+\\[([0-9]+)\\s*%\\s*[\\w$]+\\.length\\]'); | |
var functionCodePieces = functionCode.split(';'); | |
var decodeArray = []; | |
for (var i = 0; i < functionCodePieces.length; i++) { | |
functionCodePieces[i] = functionCodePieces[i].trim(); | |
var codeLine = functionCodePieces[i]; | |
if (codeLine.length > 0) { | |
var arrSlice = codeLine.match(regSlice); | |
var arrReverse = codeLine.match(regReverse); | |
debug(i + ': ' + codeLine + ' --' + (arrSlice ? ' slice length ' + arrSlice.length : '') + ' ' + (arrReverse ? 'reverse' : '')); | |
if (arrSlice && arrSlice.length >= 2) { | |
var slice = parseInt(arrSlice[1], 10); | |
if (isInteger(slice)) { | |
decodeArray.push(-slice); | |
} else return setPref(STORAGE_CODE, 'error'); | |
} else if (arrReverse && arrReverse.length >= 1) { | |
decodeArray.push(0); | |
} else if (codeLine.indexOf('[0]') >= 0) { | |
if (i + 2 < functionCodePieces.length && | |
functionCodePieces[i + 1].indexOf('.length') >= 0 && | |
functionCodePieces[i + 1].indexOf('[0]') >= 0) { | |
var inline = findMatch(functionCodePieces[i + 1], regInline); | |
inline = parseInt(inline, 10); | |
decodeArray.push(inline); | |
i += 2; | |
} else return setPref(STORAGE_CODE, 'error'); | |
} else if (codeLine.indexOf(',') >= 0) { | |
var swap = findMatch(codeLine, regSwap); | |
swap = parseInt(swap, 10); | |
if (isInteger(swap) && swap > 0) { | |
decodeArray.push(swap); | |
} else return setPref(STORAGE_CODE, 'error'); | |
} else return setPref(STORAGE_CODE, 'error'); | |
} | |
} | |
if (decodeArray) { | |
setPref(STORAGE_URL, scriptURL); | |
setPref(STORAGE_CODE, decodeArray.toString()); | |
DECODE_RULE = decodeArray; | |
debug('DYVAM - Info: signature ' + decodeArray.toString() + ' ' + scriptURL); | |
for (var i = 0; i < downloadCodeList.length; i++) { | |
var elem = document.getElementById(LISTITEM_ID + downloadCodeList[i].format); | |
var url = downloadCodeList[i].url; | |
var sig = downloadCodeList[i].sig; | |
if (elem && url && sig) { | |
url = url.replace(/\&signature=[\w\.]+/, '&signature=' + decryptSignature(sig)); | |
elem.parentNode.setAttribute('href', url); | |
addFileSize(url, downloadCodeList[i].format); | |
} | |
} | |
} | |
} | |
function isValidSignatureCode(arr) { | |
if (!arr) return false; | |
if (arr == 'error') return true; | |
arr = arr.split(','); | |
for (var i = 0; i < arr.length; i++) { | |
if (!isInteger(parseInt(arr[i], 10))) return false; | |
} | |
return true; | |
} | |
function fetchSignatureScript(scriptURL) { | |
var storageURL = getPref(STORAGE_URL); | |
var storageCode = getPref(STORAGE_CODE); | |
if (!(/,0,|^0,|,0$|\-/.test(storageCode))) storageCode = null; | |
if (storageCode && isValidSignatureCode(storageCode) && storageURL && | |
scriptURL == absoluteURL(storageURL)) return; | |
try { | |
debug('DYVAM fetch ' + scriptURL); | |
isSignatureUpdatingStarted = true; | |
crossXmlHttpRequest({ | |
method: 'GET', | |
url: scriptURL, | |
onload: function(response) { | |
debug('DYVAM fetch status ' + response.status); | |
if (response.readyState === 4 && response.status === 200 && response.responseText) { | |
findSignatureCode(response.responseText); | |
} | |
} | |
}); | |
} catch (e) {} | |
} | |
function getDecodeRules(rules) { | |
var storageCode = getPref(STORAGE_CODE); | |
if (storageCode && storageCode != 'error' && isValidSignatureCode(storageCode)) { | |
var arr = storageCode.split(','); | |
for (var i = 0; i < arr.length; i++) { | |
arr[i] = parseInt(arr[i], 10); | |
} | |
rules = arr; | |
debug('DYVAM - Info: signature ' + arr.toString() + ' ' + scriptURL); | |
} | |
return rules; | |
} | |
function decryptSignature(sig) { | |
function swap(a, b) { | |
var c = a[0]; | |
a[0] = a[b % a.length]; | |
a[b] = c; | |
return a | |
}; | |
function decode(sig, arr) { | |
if (!isString(sig)) return null; | |
var sigA = sig.split(''); | |
for (var i = 0; i < arr.length; i++) { | |
var act = arr[i]; | |
if (!isInteger(act)) return null; | |
sigA = (act > 0) ? swap(sigA, act) : ((act == 0) ? sigA.reverse() : sigA.slice(-act)); | |
} | |
var result = sigA.join(''); | |
return result; | |
} | |
if (sig == null) return ''; | |
var arr = DECODE_RULE; | |
if (arr) { | |
var sig2 = decode(sig, arr); | |
if (sig2) return sig2; | |
} else { | |
setPref(STORAGE_URL, ''); | |
setPref(STORAGE_CODE, ''); | |
} | |
return sig; | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment