// ==UserScript==
// @name AdsBypasser
// @namespace AdsBypasser
// @description Bypass Ads
// @copyright 2012+, Wei-Cheng Pan (legnaleurc)
// @version 5.24.0
// @license BSD
// @homepageURL https://adsbypasser.github.io/
// @supportURL https://github.com/adsbypasser/adsbypasser/issues
// @icon https://raw.githubusercontent.com/adsbypasser/adsbypasser/v5.24.0/img/logo.png
// @grant unsafeWindow
// @grant GM_xmlhttpRequest
// @grant GM_addStyle
// @grant GM_getResourceText
// @grant GM_getResourceURL
// @grant GM_getValue
// @grant GM_openInTab
// @grant GM_registerMenuCommand
// @grant GM_setValue
// @run-at document-start
// @resource alignCenter https://raw.githubusercontent.com/adsbypasser/adsbypasser/v5.24.0/css/align_center.css
// @resource scaleImage https://raw.githubusercontent.com/adsbypasser/adsbypasser/v5.24.0/css/scale_image.css
// @resource bgImage https://raw.githubusercontent.com/adsbypasser/adsbypasser/v5.24.0/img/imagedoc-darknoise.png
// @include http://*
// @include https://*
// @downloadURL none
// ==/UserScript==
(function (context, factory) {
if (typeof module === 'object' && typeof module.exports === 'object') {
var bluebird = require('bluebird');
module.exports = factory(context, bluebird.Promise);
} else {
var P = null;
if (context.unsafeWindow.Future) {
P = function (fn) {
return context.unsafeWindow.Future.call(this, function (fr) {
fn(fr.resolve.bind(fr), fr.reject.bind(fr));
});
};
} else if (context.PromiseResolver) {
P = function (fn) {
return new context.Promise(function (pr) {
fn(pr.resolve.bind(pr), pr.reject.bind(pr));
});
};
} else {
P = context.Promise;
}
factory(context, P);
}
}(this, function (context, Promise) {
'use strict';
var _ = context._ = {};
function setupStack () {
if (Error.captureStackTrace) {
Error.captureStackTrace(this, this.constructor);
} else if (!this.hasOwnProperty('stack')) {
var stack = (new Error()).stack.split('\n').slice(2);
var e = stack[0].match(/^.*@(.*):(\d*)$/);
this.fileName = e[1];
this.lineNumber = parseInt(e[2], 10);
this.stack = stack.join('\n');
}
}
function AdsBypasserError (message) {
setupStack.call(this);
this.message = message;
}
AdsBypasserError.prototype = Object.create(Error.prototype);
AdsBypasserError.prototype.constructor = AdsBypasserError;
AdsBypasserError.prototype.name = 'AdsBypasserError';
AdsBypasserError.extend = function (protoProps, staticProps) {
var parent = this, child = function () {
setupStack.call(this);
protoProps.constructor.apply(this, arguments);
};
extend(child, parent, staticProps);
child.prototype = Object.create(parent.prototype);
extend(child.prototype, protoProps);
child.prototype.constructor = child;
child.super = parent.prototype;
return child;
};
AdsBypasserError.super = null;
_.AdsBypasserError = AdsBypasserError;
function any (c, fn) {
if (c.some) {
return c.some(fn);
}
if (typeof c.length === 'number') {
return Array.prototype.some.call(c, fn);
}
return Object.keys(c).some(function (k) {
return fn(c[k], k, c);
});
}
function all (c, fn) {
if (c.every) {
return c.every(fn);
}
if (typeof c.length === 'number') {
return Array.prototype.every.call(c, fn);
}
return Object.keys(c).every(function (k) {
return fn(c[k], k, c);
});
}
function each (c, fn) {
if (c.forEach) {
c.forEach(fn);
} else if (typeof c.length === 'number') {
Array.prototype.forEach.call(c, fn);
} else {
Object.keys(c).forEach(function (k) {
fn(c[k], k, c);
});
}
}
function map (c, fn) {
if (c.map) {
return c.map(fn);
}
if (typeof c.length === 'number') {
return Array.prototype.map.call(c, fn);
}
return Object.keys(c).map(function (k) {
return fn(c[k], k, c);
});
}
function extend(c) {
Array.prototype.slice.call(arguments, 1).forEach(function (source) {
if (!source) {
return;
}
_.C(source).each(function (v, k) {
c[k] = v;
});
});
return c;
}
function CollectionProxy (collection) {
this._c = collection;
}
CollectionProxy.prototype.size = function () {
if (typeof this._c.length === 'number') {
return this._c.length;
}
return Object.keys(c).length;
};
CollectionProxy.prototype.at = function (k) {
return this._c[k];
};
CollectionProxy.prototype.each = function (fn) {
each(this._c, fn);
return this;
};
CollectionProxy.prototype.find = function (fn) {
var result;
any(this._c, function (value, index, self) {
var tmp = fn(value, index, self);
if (tmp !== _.none) {
result = {
key: index,
value: value,
payload: tmp,
};
return true;
}
return false;
});
return result;
};
CollectionProxy.prototype.all = function (fn) {
return all(this._c, fn);
};
CollectionProxy.prototype.map = function (fn) {
return map(this._c, fn);
};
_.C = function (collection) {
return new CollectionProxy(collection);
};
_.T = function (s) {
if (typeof s === 'string') {
} else if (s instanceof String) {
s = s.toString();
} else {
throw new AdsBypasserError('template must be a string');
}
var T = {
'{{': '{',
'}}': '}',
};
return function () {
var args = Array.prototype.slice.call(arguments);
var kwargs = args[args.length-1];
return s.replace(/\{\{|\}\}|\{([^\}]+)\}/g, function (m, key) {
if (T.hasOwnProperty(m)) {
return T[m];
}
if (args.hasOwnProperty(key)) {
return args[key];
}
if (kwargs.hasOwnProperty(key)) {
return kwargs[key];
}
return m;
});
};
};
_.P = function (fn) {
if (typeof fn !== 'function') {
throw new _.AdsBypasserError('must give a function');
}
var slice = Array.prototype.slice;
var args = slice.call(arguments, 1);
return function () {
return fn.apply(this, args.concat(slice.call(arguments)));
};
};
_.D = function (fn) {
return new Promise(fn);
};
_.parseJSON = function (json) {
try {
return JSON.parse(json);
} catch (e) {
_.warn(e);
}
return _.none;
};
_.nop = function () {
};
_.none = _.nop;
function log (method, args) {
if (_._quiet) {
return;
}
args = Array.prototype.slice.call(args);
if (typeof args[0] === 'string' || args[0] instanceof String) {
args[0] = 'AdsBypasser: ' + args[0];
} else {
args.unshift('AdsBypasser:');
}
var f = console[method];
if (typeof f === 'function') {
f.apply(console, args);
}
}
_._quiet = false;
_.info = function () {
log('info', arguments);
};
_.warn = function () {
log('warn', arguments);
};
return _;
}));
(function (context, factory) {
if (typeof module === 'object' && typeof module.exports === 'object') {
module.exports = function (context) {
var core = require('./core.js');
return factory(context, core);
};
} else {
context.$ = factory(context, context._);
}
}(this, function (context, _) {
'use strict';
var window = context.window;
var document = window.document;
var DomNotFoundError = _.AdsBypasserError.extend({
name: 'DomNotFoundError',
constructor: function (selector) {
DomNotFoundError.super.constructor.call(this, _.T('`{0}` not found')(selector));
},
});
var $ = function (selector, context) {
if (!context || !context.querySelector) {
context = document;
}
var n = context.querySelector(selector);
if (!n) {
throw new DomNotFoundError(selector);
}
return n;
};
$.$ = function (selector, context) {
try {
return $(selector, context);
} catch (e) {
return null;
}
};
$.$$ = function (selector, context) {
if (!context || !context.querySelectorAll) {
context = document;
}
var ns = context.querySelectorAll(selector);
return _.C(ns);
};
$.toDOM = function(rawHTML) {
try {
var parser = new DOMParser();
var DOMHTML = parser.parseFromString(rawHTML, "text/html");
return DOMHTML;
} catch (e) {
throw new _.AdsBypasserError('could not parse HTML to DOM');
}
};
$.removeNodes = function (selector, context) {
$.$$(selector, context).each(function (e) {
e.parentNode.removeChild(e);
});
};
function searchScriptsByRegExp (pattern, context) {
var m = $.$$('script', context).find(function (s) {
var m = s.innerHTML.match(pattern);
if (!m) {
return _.none;
}
return m;
});
if (!m) {
return null;
}
return m.payload;
}
function searchScriptsByString (pattern, context) {
var m = $.$$('script', context).find(function (s) {
var m = s.innerHTML.indexOf(pattern);
if (m < 0) {
return _.none;
}
return m;
});
if (!m) {
return null;
}
return m.value.innerHTML;
}
$.searchScripts = function (pattern, context) {
if (pattern instanceof RegExp) {
return searchScriptsByRegExp(pattern, context);
} else if (typeof pattern === 'string') {
return searchScriptsByString(pattern, context);
} else {
return null;
}
};
return $;
}));
(function (context, factory) {
if (typeof module === 'object' && typeof module.exports === 'object') {
module.exports = function (context, GM) {
var core = require('./core.js');
return factory(context, GM, core);
};
} else {
factory(context, {
xmlhttpRequest: GM_xmlhttpRequest,
}, context._);
}
}(this, function (context, GM, _) {
'use strict';
var window = context.window;
var document = window.document;
var $ = context.$ || {};
function deepJoin (prefix, object) {
return _.C(object).map(function (v, k) {
var key = _.T('{0}[{1}]')(prefix, k);
if (typeof v === 'object') {
return deepJoin(key, v);
}
return _.T('{0}={1}').apply(this, [key, v].map(encodeURIComponent));
}).join('&');
}
function toQuery (data) {
var type = typeof data;
if (data === null || (type !== 'string' && type !== 'object')) {
return '';
}
if (type === 'string') {
return data;
}
if (data instanceof String) {
return data.toString();
}
return _.C(data).map(function (v, k) {
if (typeof v === 'object') {
return deepJoin(k, v);
}
return _.T('{0}={1}').apply(this, [k, v].map(encodeURIComponent));
}).join('&');
}
function ajax (method, url, data, headers) {
var l = document.createElement('a');
l.href = url;
var reqHost = l.hostname;
var overrideHeaders = {
Host: reqHost || window.location.host,
Origin: window.location.origin,
Referer: window.location.href,
'X-Requested-With': 'XMLHttpRequest',
};
_.C(overrideHeaders).each(function (v, k, c) {
if (headers[k] === _.none) {
delete headers[k];
} else {
headers[k] = v;
}
});
var xhr = null;
var promise = _.D(function (resolve, reject) {
xhr = GM.xmlhttpRequest({
method: method,
url: url,
data: data,
headers: headers,
onload: function (response) {
response = (typeof response.responseText !== 'undefined') ? response : this;
if (response.status !== 200) {
reject(response.responseText);
} else {
resolve(response.responseText);
}
},
onerror: function (response) {
response = (typeof response.responseText !== 'undefined') ? response : this;
reject(response.responseText);
},
});
});
promise.abort = function () {
xhr.abort();
};
return promise;
}
$.get = function (url, data, headers) {
data = toQuery(data);
data = data ? '?' + data : '';
headers = headers || {};
return ajax('GET', url + data, '', headers);
};
$.post = function (url, data, headers) {
data = toQuery(data);
var h = {
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'Content-Length': data.length,
};
if (headers) {
_.C(headers).each(function (v, k) {
h[k] = v;
});
}
return ajax('POST', url, data, h);
};
return $;
}));
(function (context, factory) {
if (typeof module === 'object' && typeof module.exports === 'object') {
module.exports = function (context) {
var core = require('./core.js');
return factory(context, core);
};
} else {
factory(context, context._);
}
}(this, function (context, _) {
'use strict';
var window = context.window;
var document = window.document;
var $ = context.$ || {};
$.setCookie = function (key, value) {
var now = new Date();
now.setTime(now.getTime() + 3600 * 1000);
var tpl = _.T('{0}={1};path=/;');
document.cookie = tpl(key, value, now.toUTCString());
};
$.getCookie = function (key) {
var c = _.C(document.cookie.split(';')).find(function (v) {
var k = v.replace(/^\s*(\w+)=.+$/, '$1');
if (k !== key) {
return _.none;
}
});
if (!c) {
return null;
}
c = c.value.replace(/^\s*\w+=([^;]+).+$/, '$1');
if (!c) {
return null;
}
return c;
};
$.resetCookies = function () {
var a = document.domain;
var b = document.domain.replace(/^www\./, '');
var c = document.domain.replace(/^(\w+\.)+?(\w+\.\w+)$/, '$2');
var d = (new Date(1e3)).toUTCString();
_.C(document.cookie.split(';')).each(function (v) {
var k = v.replace(/^\s*(\w+)=.+$/, '$1');
document.cookie = _.T('{0}=;expires={1};')(k, d);
document.cookie = _.T('{0}=;path=/;expires={1};')(k, d);
var e = _.T('{0}=;path=/;domain={1};expires={2};');
document.cookie = e(k, a, d);
document.cookie = e(k, b, d);
document.cookie = e(k, c, d);
});
};
return $;
}));
(function (context, factory) {
if (typeof module === 'object' && typeof module.exports === 'object') {
module.exports = function (context) {
var core = require('./core.js');
return factory(context, core);
};
} else {
factory(context, context._);
}
}(this, function (context, _) {
'use strict';
var window = context.window;
var document = window.document;
var $ = context.$ || {};
var patterns = [];
$.register = function (pattern) {
patterns.push(pattern);
};
function dispatchByObject (rule, url_6) {
var matched = {};
var passed = _.C(rule).all(function (pattern, part) {
if (pattern instanceof RegExp) {
matched[part] = url_6[part].match(pattern);
} else if (pattern instanceof Array) {
var r = _.C(pattern).find(function (p) {
var m = url_6[part].match(p);
return m || _.none;
});
matched[part] = r ? r.payload : null;
}
return !!matched[part];
});
return passed ? matched : null;
}
function dispatchByRegExp (rule, url_1) {
return url_1.match(rule);
}
function dispatchByArray (byLocation, rules, url_1, url_3, url_6) {
var tmp = _.C(rules).find(function (rule) {
var m = dispatch(byLocation, rule, url_1, url_3, url_6);
if (!m) {
return _.none;
}
return m;
});
return tmp ? tmp.payload : null;
}
function dispatchByString (rule, url_3) {
var scheme = /\*|https?|file|ftp|chrome-extension/;
var host = /\*|(\*\.)?([^\/*]+)/;
var path = /\/.*/;
var up = new RegExp(_.T('^({scheme})://({host})?({path})$')({
scheme: scheme.source,
host: host.source,
path: path.source,
}));
var matched = rule.match(up);
if (!matched) {
return null;
}
scheme = matched[1];
host = matched[2];
var wc = matched[3];
var sd = matched[4];
path = matched[5];
if (scheme === '*' && !/https?/.test(url_3.scheme)) {
return null;
} else if (scheme !== url_3.scheme) {
return null;
}
if (scheme !== 'file' && host !== '*') {
if (wc) {
up = url_3.host.indexOf(sd);
if (up < 0 || up + sd.length !== url_3.host.length) {
return null;
}
} else if (host !== url_3.host) {
return null;
}
}
path = new RegExp(_.T('^{0}$')(path.replace(/[*.\[\]?+#]/g, function (c) {
if (c === '*') {
return '.*';
}
return '\\' + c;
})));
if (!path.test(url_3.path)) {
return null;
}
return url_3;
}
function dispatchByFunction (rule, url_1, url_3, url_6) {
return rule(url_1, url_3, url_6);
}
function dispatch (byLocation, rule, url_1, url_3, url_6) {
if (rule instanceof Array) {
return dispatchByArray(byLocation, rule, url_1, url_3, url_6);
}
if (typeof rule === 'function') {
if (byLocation) {
return null;
}
return dispatchByFunction(rule, url_1, url_3, url_6);
}
if (rule instanceof RegExp) {
return dispatchByRegExp(rule, url_1);
}
if (typeof rule === 'string' || rule instanceof String) {
return dispatchByString(rule, url_3);
}
return dispatchByObject(rule, url_6);
}
$._findHandler = function (byLocation) {
var url_1 = window.location.toString();
var url_3 = {
scheme: window.location.protocol.slice(0, -1),
host: window.location.host,
path: window.location.pathname + window.location.search + window.location.hash,
};
var url_6 = {
scheme: window.location.protocol,
host: window.location.hostname,
port: window.location.port,
path: window.location.pathname,
query: window.location.search,
hash: window.location.hash,
};
var pattern = _.C(patterns).find(function (pattern) {
var m = dispatch(byLocation, pattern.rule, url_1, url_3, url_6);
if (!m) {
return _.none;
}
return m;
});
if (!pattern) {
return null;
}
var matched = pattern.payload;
pattern = pattern.value;
if (!pattern.start && !pattern.ready) {
return null;
}
return {
start: pattern.start ? _.P(pattern.start, matched) : _.nop,
ready: pattern.ready ? _.P(pattern.ready, matched) : _.nop,
};
};
return $;
}));
(function (context, factory) {
if (typeof module === 'object' && typeof module.exports === 'object') {
module.exports = function (context) {
var core = require('./core.js');
return factory(context, core);
};
} else {
factory(context, context._);
}
}(this, function (context, _) {
'use strict';
var window = context.window;
var document = window.document;
var $ = context.$ || {};
function go (path, params, method) {
method = method || 'post';
params = params || {};
var form = document.createElement('form');
form.method = method;
form.action = path;
_.C(params).each(function (value, key) {
var input = document.createElement('input');
input.type = 'hidden';
input.name = key;
input.value = value;
form.appendChild(input);
});
document.body.appendChild(form);
form.submit();
}
$.openLinkByPost = function (url, data) {
go(url, data, 'post');
};
$.openLink = function (to) {
if (!to) {
_.warn('false URL');
return;
}
var from = window.location.toString();
_.info(_.T('{0} -> {1}')(from, to));
window.top.location.replace(to);
};
$.openLinkWithReferer = function (to) {
if (!to) {
_.warn('false URL');
return;
}
var from = window.location.toString();
_.info(_.T('{0} -> {1}')(from, to));
var a = document.createElement('a');
a.href = to;
a.style.display = 'none';
document.body.appendChild(a);
a.click();
};
return $;
}));
(function (context, factory) {
if (typeof module === 'object' && typeof module.exports === 'object') {
module.exports = function (context) {
var core = require('./core.js');
var ajax = require('./ajax.js');
var $ = ajax(context);
return factory(context, core, $);
};
} else {
factory(context, context._, context.$);
}
}(this, function (context, _, $) {
'use strict';
var window = context.window;
var unsafeWindow = context.unsafeWindow || (0, eval)('this').window;
var document = window.document;
$.removeAllTimer = function () {
var handle = window.setInterval(_.nop, 10);
while (handle > 0) {
window.clearInterval(handle--);
}
handle = window.setTimeout(_.nop, 10);
while (handle > 0) {
window.clearTimeout(handle--);
}
};
$.captcha = function (imgSrc, cb) {
if (!$.config.externalServerSupport) {
return;
}
var a = document.createElement('canvas');
var b = a.getContext('2d');
var c = new Image();
c.src = imgSrc;
c.onload = function () {
a.width = c.width;
a.height = c.height;
b.drawImage(c, 0, 0);
var d = a.toDataURL();
var e = d.substr(d.indexOf(',') + 1);
$.post('http://www.wcpan.info/cgi-bin/captcha.cgi', {
i: e,
}, cb);
};
};
function clone (safe) {
if (safe === null || !(safe instanceof Object)) {
return safe;
}
if (safe instanceof String) {
return safe.toString();
}
if (safe instanceof Function) {
return exportFunction(safe, unsafeWindow, {
allowCrossOriginArguments: true,
});
}
if (safe instanceof Array) {
var unsafe = new unsafeWindow.Array();
for (var i = 0; i < safe.length; ++i) {
unsafe.push(clone(safe[i]));
}
return unsafe;
}
var unsafe = new unsafeWindow.Object();
_.C(safe).each(function (v, k) {
unsafe[k] = clone(v);
});
return unsafe;
}
var MAGIC_KEY = '__adsbypasser_reverse_proxy__';
$.window = (function () {
var isFirefox = typeof InstallTrigger !== 'undefined';
if (!isFirefox) {
return unsafeWindow;
}
var decorator = {
set: function (target, key, value) {
if (key === MAGIC_KEY) {
return false;
}
if (target === unsafeWindow && key === 'open') {
var d = Object.getOwnPropertyDescriptor(target, key);
d.value = clone(value);
Object.defineProperty(target, key, d);
} else {
target[key] = clone(value);
}
return true;
},
get: function (target, key) {
if (key === MAGIC_KEY) {
return target;
}
var value = target[key];
var type = typeof value;
if (value === null || (type !== 'function' && type !== 'object')) {
return value;
}
return new Proxy(value, decorator);
},
apply: function (target, self, args) {
args = Array.prototype.slice.call(args);
if (target === unsafeWindow.Object.defineProperty) {
args[0] = args[0][MAGIC_KEY];
}
if (target === unsafeWindow.Function.apply) {
self = self[MAGIC_KEY];
args[1] = Array.prototype.slice.call(args[1]);
}
var usargs = clone(args);
return target.apply(self, usargs);
},
construct: function (target, args) {
args = Array.prototype.slice.call(args);
args.unshift(undefined);
var usargs = clone(args);
var bind = unsafeWindow.Function.prototype.bind;
return new (bind.apply(target, usargs));
},
};
return new Proxy(unsafeWindow, decorator);
})();
return $;
}));
(function (context, factory) {
if (typeof module === 'object' && typeof module.exports === 'object') {
module.exports = function (context, GM) {
var _ = require('lodash');
var core = require('./core.js');
var misc = require('./misc.js');
var dispatcher = require('./dispatcher.js');
var modules = [misc, dispatcher].map(function (v) {
return v.call(null, context, GM);
});
var $ = _.assign.apply(null, modules);
return factory(context, GM, core, $);
};
} else {
factory(context, {
getValue: GM_getValue,
setValue: GM_setValue,
}, context._, context.$);
}
}(this, function (context, GM, _, $) {
'use strict';
var window = context.window;
$.config = {
set version (value) {
GM.setValue('version', value);
},
get version () {
return GM.getValue('version', 0);
},
set alignCenter (value) {
GM.setValue('align_center', value);
},
get alignCenter () {
return GM.getValue('align_center');
},
set changeBackground (value) {
GM.setValue('change_background', value);
},
get changeBackground () {
return GM.getValue('change_background');
},
set externalServerSupport (value) {
GM.setValue('external_server_support', value);
},
get externalServerSupport () {
return GM.getValue('external_server_support');
},
set redirectImage (value) {
GM.setValue('redirect_image', value);
},
get redirectImage () {
return GM.getValue('redirect_image');
},
set scaleImage (value) {
GM.setValue('scale_image', value);
},
get scaleImage () {
return GM.getValue('scale_image');
},
set logLevel (value) {
GM.setValue('log_level', 1 * value);
},
get logLevel () {
return GM.getValue('log_level');
},
};
fixup($.config);
function fixup (c) {
var patches = [
function (c) {
var ac = typeof c.alignCenter !== 'undefined';
if (typeof c.changeBackground === 'undefined') {
c.changeBackground = ac ? c.alignCenter : true;
}
if (typeof c.scaleImage === 'undefined') {
c.scaleImage = ac ? c.alignCenter : true;
}
if (!ac) {
c.alignCenter = true;
}
if (typeof c.redirectImage === 'undefined') {
c.redirectImage = true;
}
},
function (c) {
if (typeof c.externalServerSupport === 'undefined') {
c.externalServerSupport = false;
}
},
function (c) {
if (typeof c.logLevel === 'undefined') {
c.logLevel = 1;
}
},
];
while (c.version < patches.length) {
patches[c.version](c);
++c.version;
}
}
$.register({
rule: {
host: /^adsbypasser\.github\.io$/,
path: /^\/configure\.html$/,
},
ready: function () {
$.window.commit = function (data) {
data.version = $.config.version;
_.C(data).each(function (v, k) {
$.config[k] = v;
});
setTimeout(function () {
save(data);
}, 0);
};
$.window.render({
version: $.config.version,
options: {
alignCenter: {
type: 'checkbox',
value: $.config.alignCenter,
label: 'Align Center',
help: 'Align image to the center if possible. (default: enabled)',
},
changeBackground: {
type: 'checkbox',
value: $.config.changeBackground,
label: 'Change Background',
help: 'Use Firefox-like image background if possible. (default: enabled)',
},
redirectImage: {
type: 'checkbox',
value: $.config.redirectImage,
label: 'Redirect Image',
help: [
'Directly open image link if possible. (default: enabled)',
'If disabled, redirection will only works on link shortener sites.',
].join('
\n'),
},
scaleImage: {
type: 'checkbox',
value: $.config.scaleImage,
label: 'Scale Image',
help: 'When image loaded, scale it to fit window if possible. (default: enabled)',
},
externalServerSupport: {
type: 'checkbox',
value: $.config.externalServerSupport,
label: 'External Server Support',
help: [
'Send URL information to external server to enhance features (e.g.: captcha resolving). (default: disabled)',
'Affected sites:',
'setlinks.us (captcha)',
].join('
\n'),
},
logLevel: {
type: 'select',
value: $.config.logLevel,
menu: [
[0, '0 (quiet)'],
[1, '1 (default)'],
[2, '2 (verbose)'],
],
label: 'Log Level',
help: [
'Log level in developer console. (default: 1)',
'0 will not print anything in console.',
'1 will only print logs on affected sites.',
'2 will print on any sites.',
].join('
\n'),
},
},
});
},
});
return $;
}));
(function (context, factory) {
if (typeof module === 'object' && typeof module.exports === 'object') {
module.exports = function (context, GM) {
var _ = require('lodash');
var core = require('./core.js');
var dom = require('./dom.js');
var config = require('./config.js');
var link = require('./link.js');
var misc = require('./misc.js');
var modules = [dom, config, link, misc].map(function (v) {
return v.call(null, context, GM);
});
var $ = _.assign.apply(_, modules);
return factory(context, GM, core, $);
};
} else {
factory(context, {
getResourceText: GM_getResourceText,
addStyle: GM_addStyle,
getResourceURL: GM_getResourceURL,
}, context._, context.$);
}
}(this, function (context, GM, _, $) {
'use strict';
var window = context.window;
var document = window.document;
$.openImage = function (imgSrc) {
if ($.config.redirectImage) {
$.openLink(imgSrc);
}
};
function enableScrolling () {
var o = document.compatMode === 'CSS1Compat' ? document.documentElement : document.body;
o.style.overflow = '';
};
function toggleShrinking () {
this.classList.toggle('adsbypasser-shrinked');
}
function checkScaling () {
var nw = this.naturalWidth;
var nh = this.naturalHeight;
var cw = document.documentElement.clientWidth;
var ch = document.documentElement.clientHeight;
if ((nw > cw || nh > ch) && !this.classList.contains('adsbypasser-resizable')) {
this.classList.add('adsbypasser-resizable');
this.classList.add('adsbypasser-shrinked');
this.addEventListener('click', toggleShrinking);
} else {
this.removeEventListener('click', toggleShrinking);
this.classList.remove('adsbypasser-shrinked');
this.classList.remove('adsbypasser-resizable');
}
}
function scaleImage (i) {
var style = GM.getResourceText('scaleImage');
GM.addStyle(style);
if (i.naturalWidth && i.naturalHeight) {
checkScaling.call(i);
} else {
i.addEventListener('load', checkScaling);
}
var h;
window.addEventListener('resize', function () {
window.clearTimeout(h);
h = window.setTimeout(checkScaling.bind(i), 100);
});
}
function changeBackground () {
var bgImage = GM.getResourceURL('bgImage');
document.body.style.backgroundColor = '#222222';
document.body.style.backgroundImage = _.T('url(\'{0}\')')(bgImage);
}
function alignCenter () {
var style = GM.getResourceText('alignCenter');
GM.addStyle(style);
}
function injectStyle (d, i) {
$.removeNodes('style, link[rel=stylesheet]');
d.id = 'adsbypasser-wrapper';
i.id = 'adsbypasser-image';
}
$.replace = function (imgSrc) {
if (!$.config.redirectImage) {
return;
}
if (!imgSrc) {
_.warn('false url');
return;
}
_.info(_.T('replacing body with `{0}` ...')(imgSrc));
$.removeAllTimer();
enableScrolling();
document.body = document.createElement('body');
var d = document.createElement('div');
document.body.appendChild(d);
var i = document.createElement('img');
i.src = imgSrc;
d.appendChild(i);
if ($.config.alignCenter || $.config.scaleImage) {
injectStyle(d, i);
}
if ($.config.alignCenter) {
alignCenter();
}
if ($.config.changeBackground) {
changeBackground();
}
if ($.config.scaleImage) {
scaleImage(i);
}
};
return $;
}));
$.register({
rule: {
host: /^www\.4shared\.com$/,
path: /^\/(mp3|get|rar|zip|file|android|software|program)\//,
},
ready: function () {
'use strict';
$.get('http://www.4server.info/find.php', {
data: window.location.href,
}).then(function (data) {
var d = $.toDOM(data);
var c = $('meta[http-equiv=refresh]', d);
var b = c.content.match(/URL=(.+)$/);
var a = b[1];
$.openLink(a);
});
},
});
$.register({
rule: {
host: /^(www\.)?arab\.sh$/,
path: /^\/\w+$/,
},
ready: function () {
'use strict';
var f = $('form[name=F1]');
setTimeout(function() {
f.submit();
}, 20000);
},
});
(function() {
'use strict';
$.register({
rule: {
host: /^(www\.)?dl-protect\.com$/,
path: /\/[A-Z0-9]+/,
},
ready: function () {
if ($.$('#captcha')) {
return;
}
var f = $.$('form[name=ccerure]');
if (f) {
var observer = new MutationObserver(function (mutations) {
var iIn = $('input[id=in]');
for (var i = 0; i < mutations.length; i++) {
if (mutations[i].target.value && mutations[i].attributeName === 'value') {
observer.disconnect();
iIn.value = "Tracking too much hurts users' privacy";
if (!canFastRedirect()) {
return;
}
setTimeout(function() {
f.submit();
}, 600);
break;
}
}
});
var iIn = $('input[id=in]');
if (iIn.value) {
setTimeout(function() {
f.submit();
}, 600);
} else {
observer.observe(iIn, {
attributes: true,
});
}
return;
}
var l = $.$$('#slinks > a');
if (l.size() === 1) {
$.openLink(l.at(0).href);
}
},
});
function canFastRedirect () {
return !$.$('form[name=ccerure]').onsubmit && !$.$('form[name=ccerure] input[name=pwd]');
}
})();
$.register({
rule: {
host: /^(www\.)?embedupload\.com$/,
path: /^\/$/,
query: /^\?\w{2}=\w+$/
},
ready: function () {
'use strict';
var downloadPage = $('.categories a[target=_blank]');
$.openLink(downloadPage);
},
});
$.register({
rule: {
host: /^www\.fileproject\.com\.br$/,
path: /^\/files\/+/,
},
ready: function () {
'use strict';
var m = $.searchScripts(//);
$.openLink(m[1]);
},
});
$.register({
rule: {
host: /^(www\.)?(firedrive|putlocker)\.com$/,
path: /^\/file\/[0-9A-F]+$/,
},
ready: function () {
'use strict';
var c = $('#confirm_form');
c.submit();
},
});
$.register({
rule: {
host: /^(www\.)?jheberg\.net$/,
path: /^\/captcha\//,
},
ready: function () {
'use strict';
$('.dl-button').click();
},
});
$.register({
rule: {
host: /^(www\.)?jheberg\.net$/,
path: /^\/redirect\//,
},
ready: function () {
'use strict';
$.removeAllTimer();
var matches = $.searchScripts(/'slug':\s*'([^']+)',\s*'hoster':\s*'([^']+)'/);
var slug = matches[1];
var hoster = matches[2];
$.post('/get/link/', {
'slug': slug,
'hoster': hoster
}).then(function(response) {
var respJSON = _.parseJSON(response);
$.openLink(respJSON.url);
});
},
});
$.register({
rule: {
host: /^(www\.)?larashare\.com$/,
path: /^\/do\.php$/,
query: /id=\d+/,
},
start: function () {
'use strict';
$.openLink(document.location.href.replace('id=','down='));
},
});
$.register({
rule: {
host: /^(www\.)?mirrorcreator\.com$/,
path: /^\/showlink\.php$/,
},
ready: function () {
'use strict';
var a = $.$('#redirectlink a');
if (a) {
$.openLink(a.href);
return;
}
a = $('#redirectlink > div.redirecturl');
a = a.innerHTML;
if (!a.match(/^http/)) {
throw new _.AdsBypasserError('not a valid URL');
}
$.openLink(a);
},
});
$.register({
rule: {
host: /^www.mirrorupload.net$/,
},
ready: function () {
'use strict';
var accessForm = $('form[name=form_upload]');
var accessInput = document.createElement('input');
accessInput.type = 'hidden';
accessInput.name = 'access';
accessInput.value = Math.random();
accessForm.appendChild(accessInput);
accessForm.submit();
},
});
$.register({
rule: {
host: /^mylinkgen\.com$/,
path: /^\/p\/(.+)$/,
},
start: function (m) {
'use strict';
$.openLink('/g/' + m.path[1]);
},
});
$.register({
rule: {
host: /^mylinkgen\.com$/,
path: /^\/g\//,
},
ready: function () {
'use strict';
var a = $('#main-content a.btn.btn-default');
$.openLink(a.href);
},
});
$.register({
rule: {
host: /^(www\.)?vidto\.me$/,
},
ready: function () {
'use strict';
var f = $('#btn_download').form;
setTimeout(function() {
f.submit();
}, 6000);
},
});
$.register({
rule: [
{
host: /^1dl\.biz$/,
path: /^\/(\w)\.php$/,
query: /^\?([\d\/]+)$/,
},
{
host: /^img\.1dl\.biz$/,
path: /^\/(\w)\.php$/,
query: /^\?\w\/([\d\/]+)$/,
},
],
ready: function () {
'use strict';
var a = $('div.tor a, div.i-h a');
a.removeAttribute('target');
a.click();
},
});
$.register({
rule: {
host: /^1pics\.ru$/,
},
ready: function () {
'use strict';
var img = $('img[alt$="1Pics.Ru"]');
$.openImage(img.src);
},
});
$.register({
rule: {
host: /^www\.(2i\.(sk|cz)|2imgs\.com)$/,
},
ready: function () {
'use strict';
var img = $('#wrap3 img');
$.openImage(img.src);
},
});
$.register({
rule: [
{
host: /^a\.pomf\.se$/,
path: /^\/.+\.htm$/,
query: /^$/,
},
{
host: /^empireload\.com$/,
path: /^\/sexy\/.+\.htm$/,
query: /^$/,
},
],
ready: function () {
'use strict';
var a = $.$('body > a');
if (a) {
$.openImage(a.href);
return;
}
$.removeNodes('#boxes, iframe');
},
});
$.register({
rule: [
'http://*.abload.de/image.php?img=*',
'http://www.imageup.ru/*/*/*.html',
'http://itmages.ru/image/view/*/*', // different layout same handler
],
ready: function () {
'use strict';
var i = $('#image');
$.openImage(i.src);
},
});
$.register({
rule: {
host: /alabout\.com$/,
},
ready: function () {
'use strict';
$.$$('a').each(function (a) {
if (/http:\/\/(www\.)?alabout\.com\/j\.phtml\?url=/.test(a.href)) {
a.href = a.textContent;
}
});
},
});
$.register({
rule: {
host: /^freeimgup\.com$/,
path: /^\/xxx/,
query: /^\?v=([^&]+)/,
},
start: function (m) {
'use strict';
$.openImage('/xxx/images/' + m.query[1]);
},
});
$.register({
rule: {
host: /^(b4he|freeimgup|fullimg)\.com|fastpics\.net|ifap\.co$/,
query: /^\?v=([^&]+)/,
},
start: function (m) {
'use strict';
$.openImage('/images/' + m.query[1]);
},
});
$.register({
rule: {
host: /^bayimg\.com$/,
},
ready: function () {
'use strict';
var i = $('#mainImage');
$.openImage(i.src);
},
});
$.register({
rule: {
host: /^beeimg\.com$/,
},
ready: function () {
'use strict';
var img = $('img.img-responsive');
$.openImage(img.src);
},
});
$.register({
rule: 'http://www.bilder-space.de/*.htm',
ready: function () {
'use strict';
$.removeNodes('iframe');
var img = $('img.picture');
$.openImage(img.src);
},
});
$.register({
rule: 'http://www.bilder-upload.eu/show.php?file=*',
ready: function () {
'use strict';
var i = $('input[type=image]');
$.openImage(i.src);
},
});
$.register({
rule: 'http://blackcatpix.com/v.php?*',
ready: function () {
'use strict';
var img = $('td center img');
$.openImage(img.src);
},
});
$.register({
rule: 'http://www.casimages.com/img.php?*',
ready: function () {
'use strict';
var img = $('td a img');
$.openImage(img.src);
},
});
$.register({
rule: {
host: /^www\.x45x\.info|(imadul|mypixxx\.lonestarnaughtygirls)\.com|ghanaimages\.co|imgurban\.info|d69\.in$/,
query: /\?p[mt]=(.+)/,
},
start: function (m) {
'use strict';
$.openImage('/?di=' + m.query[1]);
},
});
$.register({
rule: 'http://javelite.tk/viewer.php?id=*',
ready: function () {
'use strict';
var i = $('table img');
$.openImage(i.src);
},
});
$.register({
rule: {
host: /^imgchili\.(com|net)|www\.pixhost\.org$/,
path: /^\/show\//,
},
ready: function () {
'use strict';
$.removeNodes('iframe, #ad');
try {
$('#all').style.display = '';
} catch (e) {
}
var o = $('#show_image');
$.openImage(o.src);
},
});
$.register({
rule: 'http://cubeupload.com/im/*',
ready: function () {
'use strict';
var img = $('img.galleryBigImg');
$.openImage(img.src);
},
});
$.register({
rule: {
host: /^(depic\.me|(www\.)?picamatic\.com)$/,
},
ready: function () {
'use strict';
var i = $('#pic');
$.openImage(i.src);
},
});
$.register({
rule: {
host: /^img(dino|tiger|zap)\.com$/,
path: /^\/viewer\.php$/,
query: /^\?file=/,
},
ready: function () {
'use strict';
var o = $('#cursor_lupa');
$.openImage(o.src);
},
});
$.register({
rule: 'http://*.directupload.net/file/*.htm',
ready: function () {
'use strict';
var i = $('#ImgFrame');
$.openImage(i.src);
},
});
$.register({
rule: {
host: /^emptypix\.com|overdream\.cz$/,
path: /^\/image\//,
},
ready: function () {
'use strict';
var img = $('#full_image');
$.openImage(img.src);
},
});
$.register({
rule: {
host: /^fastpic\.ru$/,
path: /^\/view\//,
},
ready: function () {
'use strict';
var img = $('#picContainer #image');
$.openImage(img.src);
},
});
$.register({
rule: 'http://www.fotolink.su/v.php?id=*',
ready: function () {
'use strict';
var i = $('#content img');
$.openImage(i.src);
},
});
(function () {
'use strict';
function run () {
var i = $('#img_obj');
$.openImage(i.src);
}
$.register({
rule: 'http://fotoo.pl/show.php?img=*.html',
ready: run,
});
$.register({
rule: {
host: /^www\.(fotoszok\.pl|imagestime)\.com$/,
path: /^\/show\.php\/.*\.html$/,
},
ready: run,
});
})();
$.register({
rule: 'http://www.fotosik.pl/pokaz_obrazek/pelny/*.html',
ready: function () {
'use strict';
var i = $('a.noborder img');
$.openImage(i.src);
},
});
$.register({
rule: {
host: /^freakimage\.com|www\.hostpic\.org$/,
path: /^\/view\.php$/,
query: /^\?filename=([^&]+)/,
},
start: function (m) {
'use strict';
$.openImage('/images/' + m.query[1]);
},
});
$.register({
rule: [
'http://funkyimg.com/viewer.php?img=*',
'http://funkyimg.com/view/*',
],
ready: function () {
'use strict';
var i = $('#viewer img');
$.openImage(i.src);
},
});
$.register({
rule: {
host: /^(www\.)?gallerynova\.se$/,
path: /^\/site\/v\//,
},
ready: function () {
'use strict';
var i = $('#myUniqueImg').parentNode;
$.openImage(i.href);
},
});
$.register({
rule: {
host: /^(www\.)?gallerynova\.se$/,
path: /^\/site\/viewImage\/(\w+)/,
},
ready: function (m) {
'use strict';
var confirm = $.searchScripts(/\$\("#confirmImage"\).val\("([^"]+)"\)/)[1];
$.post('/site/viewConfirmCode/' + m.path[1], {
confirm: confirm
}).then(function (rawJson) {
var json = _.parseJSON(rawJson);
var decodedHTML = document.createTextNode(json.content).data;
var imgURL = decodedHTML.match(//)[1];
$.openImage(imgURL);
});
},
});
(function () {
'use strict';
var hostRule = /^goimagehost\.com$/;
$.register({
rule: {
host: hostRule,
path: /^\/xxx\/images\//,
},
});
$.register({
rule: {
host: hostRule,
path: /^\/xxx\/(.+)/,
},
start: function (m) {
$.openImage('/xxx/images/' + m.path[1]);
},
});
$.register({
rule: {
host: hostRule,
query: /^\?v=(.+)/,
},
start: function (m) {
$.openImage('/xxx/images/' + m.query[1]);
},
});
})();
$.register({
rule: {
host: /www\.(h-animes|adultmove)\.info/,
path: /^\/.+\/.+\/.+\.html$/,
},
ready: function () {
'use strict';
var a = $('.dlbutton2 > a');
$.openImage(a.href);
},
});
$.register({
rule: 'http://hentaimg.com/mg/lndex-1.php?img=*',
ready: function () {
'use strict';
$.openLink('index-1.php' + window.location.search);
},
});
$.register({
rule: 'http://hentaimg.com/mg/index-1.php?img=*',
ready: function () {
'use strict';
var i = $('#content img');
$.openImage(i.src);
},
});
$.register({
rule: 'http://www.hostingpics.net/viewer.php?id=*',
ready: function () {
'use strict';
var i = $('#img_viewer');
$.openImage(i.src);
},
});
$.register({
rule: {
host: /^ichan\.org$/,
path: /^\/image\.php$/,
query: /path=(.+)$/,
},
start: function (m) {
'use strict';
$.openImage('/' + m.query[1]);
},
});
$.register({
rule: {
host: /ichan\.org$/,
},
ready: function () {
'use strict';
$.$$('a').each(function (a) {
if (a.href.indexOf('/url/http://') > -1) {
a.href = a.href.replace(/http:\/\/.+\/url\/(?=http:\/\/)/, '');
}
});
},
});
$.register({
rule: 'http://ifotos.pl/zobacz/*',
ready: function () {
'use strict';
var m = $('meta[property="og:image"]');
$.openImage(m.content);
},
});
$.register({
rule: {
host: /^ima\.so$/,
},
ready: function () {
'use strict';
var a = $('#image_block a');
$.openImage(a.href);
},
});
$.register({
rule: [
'http://image18.org/show/*',
'http://screenlist.ru/details.php?image_id=*',
'http://www.imagenetz.de/*/*.html',
],
ready: function () {
'use strict';
var img = $('#picture');
$.openImage(img.src);
},
});
$.register({
rule: {
host: /^image2you\.ru$/,
path: /^\/\d+\/\d+/,
},
ready: function () {
'use strict';
var i = $.$('div.t_tips2 div > img');
if (!i) {
$.openLinkByPost('', {
_confirm: '',
});
return;
}
$.openImage(i.src);
},
});
$.register({
rule: 'http://imagearn.com/image.php?id=*',
ready: function () {
'use strict';
var i = $('#img');
$.openImage(i.src);
},
});
$.register({
rule: 'http://www.imagebam.com/image/*',
ready: function () {
'use strict';
var o = $('#imageContainer img[id]');
$.replace(o.src);
},
});
$.register({
rule: {
host: /^imageban\.(ru|net)$/,
path: /^\/show\/\d{4}\/\d{2}\/\d{2}\/.+/,
},
ready: function () {
'use strict';
var i = $('#img_obj');
$.openImage(i.src);
},
});
$.register({
rule: {
host: /^imageheli\.com|imgtube\.net|pixliv\.com$/,
path: /^\/img-([a-zA-Z0-9\-]+)\..+$/,
},
ready: function () {
'use strict';
var a = $.$('a[rel="lightbox"]');
if (!a) {
$.openLinkByPost('', {
browser_fingerprint: '',
ads: '0',
});
return;
}
$.openImage(a.href);
},
});
$.register({
rule: 'http://www.imagehousing.com/image/*',
ready: function () {
'use strict';
var i = $('td.text_item img');
$.openImage(i.src);
},
});
$.register({
rule: 'http://imageno.com/*.html',
ready: function () {
'use strict';
var i = $('#image_div img');
$.openImage(i.src);
},
});
$.register({
rule: 'http://imagepix.org/image/*.html',
ready: function () {
'use strict';
var i = $('img[border="0"]');
$.openImage(i.src);
},
});
(function () {
'use strict';
function run () {
var o = $('#download_box img[id]');
$.openImage(o.src);
}
$.register({
rule: {
host: /^www\.imageporter\.com$/,
path: /^\/\w{12}\/.*\.html$/,
},
ready: run,
});
$.register({
rule: {
host: /^(www\.)?(image(carry|dunk|porter|switch)|pic(leet|turedip|tureturn)|imgspice)\.com|(piclambo|yankoimages)\.net$/,
},
ready: run,
});
})();
$.register({
rule: {
host: /^imagescream\.com$/,
path: /^\/img\/soft\//,
},
ready: function () {
'use strict';
var i = $('#shortURL-content img');
$.openImage(i.src);
},
});
$.register({
rule: {
host: /^(imagescream|anonpic|picturevip)\.com|all-poster\.ru$/,
query: /^\?v=/,
},
ready: function () {
'use strict';
var i = $('#imagen img');
$.openImage(i.src);
},
});
(function () {
'use strict';
var host = /^imageshack\.us$/;
$.register({
rule: {
host: host,
path: /^\/photo\/.+\/(.+)\/([^\/]+)/,
},
start: function (m) {
$.openImage(_.T('/f/{0}/{1}/')(m.path[1], m.path[2]));
},
});
$.register({
rule: {
host: host,
path: /^\/f\/.+\/[^\/]+/,
},
ready: function () {
var i = $('#fullimg');
$.openImage(i.src);
},
});
})();
$.register({
rule: 'http://imageshost.ru/photo/*/id*.html',
ready: function () {
'use strict';
var a = $('#bphoto a');
$.openImage(a.href);
},
});
(function () {
'use strict';
function run () {
$.window.jQuery.prototype.append = undefined;
var i = $('img.pic');
$.replace(i.src);
}
$.register({
rule: {
host: /^imagenpic\.com$/,
path: /^\/.*\/.+\.html$/,
},
ready: run,
});
$.register({
rule: {
host: [
/^image(twist|cherry)\.com$/,
/^imgtrex\.com$/,
],
},
ready: run,
});
})();
$.register({
rule: 'http://imageupper.com/i/?*',
ready: function () {
'use strict';
var i = $('#img');
$.openImage(i.src);
},
});
$.register({
rule: [
'http://*.imagevenue.com/img.php?*',
'http://hotchyx.com/d/adult-image-hosting-view-08.php?id=*',
'http://www.hostingfailov.com/photo/*',
],
ready: function () {
'use strict';
var i = $('#thepic');
$.openImage(i.src);
},
});
$.register({
rule: {
host: /^imagezilla\.net$/,
path: /^\/show\/(.+)$/,
},
start: function (m) {
'use strict';
$.openImage('/images2/' + m.path[1]);
},
});
$.register({
rule: {
host: /^imagik\.fr$/,
path: /^\/view(-rl)?\/(.+)/,
},
start: function (m) {
'use strict';
$.openImage('/uploads/' + m.path[2]);
},
});
$.register({
rule: 'http://img.3ezy.net/*.htm',
ready: function () {
'use strict';
var l = $('link[rel="image_src"]');
$.openImage(l.href);
},
});
$.register({
rule: {
host: /^img\.acianetmedia\.com$/,
path: /^\/(image\/)?[^.]+$/,
},
ready: function () {
'use strict';
var img = $('#full_image, #shortURL-content img');
$.openImage(img.src);
},
});
$.register({
rule: 'http://img1.imagilive.com/*/*',
ready: function () {
'use strict';
var a = $.$('#page a.button');
if (a) {
$.redirect(a.href);
return;
}
var i = $('#page > img:not([id])');
$.openImage(i.src);
},
});
$.register({
rule: {
host: /^img3x\.net$/,
},
ready: function () {
'use strict';
var f = $.$('form');
if (f) {
f.submit();
return;
}
f = $('#show_image');
$.openImage(f.src);
},
});
$.register({
rule: {
host: /^www\.img(babes|flare)\.com$/,
},
ready: function () {
'use strict';
var i = $('#this_image');
$.openImage(i.src);
},
});
$.register({
rule: {
host: /^imgbar\.net$/,
path: /^\/img_show\.php$/,
query: /^\?view_id=/,
},
ready: function () {
'use strict';
var i = $('center img');
$.openImage(i.src);
},
});
$.register({
rule: {
host: /^imgbar\.net$/,
},
ready: function () {
'use strict';
var i = $('div.panel.top form input[name=sid]');
$.openLink('/img_show.php?view_id=' + i.value);
},
});
$.register({
rule: {
host: /^imgbin\.me$/,
path: /^\/view\/([A-Z]+)$/,
},
start: function (m) {
'use strict';
var tpl = _.T('/image/{0}.jpg');
$.openImage(tpl(m.path[1]));
},
});
$.register({
rule: {
host: /^imgbox\.com$/,
path: /^\/[\d\w]+$/,
},
ready: function () {
'use strict';
$.removeNodes('iframe');
var i = $('#img');
$.openImage(i.src);
},
});
(function () {
'use strict';
var host = /^(img(fantasy|leech)|imagedomino)\.com$/;
$.register({
rule: {
host: host,
query: /^\?p=/,
},
ready: function () {
var i = $('#container-home img');
$.openImage(i.src);
},
});
$.register({
rule: {
host: host,
query: /^\?v=/,
},
ready: function () {
if ($.window.confirmAge) {
$.window.confirmAge(1);
return;
}
var i = $('#container-home img');
$.openImage(i.src);
},
});
})();
$.register({
rule: {
host: /^imglocker\.com$/,
path: [
/^(\/\w+)\/(.+)\.html$/,
/^(\/\w+)\/(.+)$/,
],
},
start: function (m) {
'use strict';
var url = _.T('//img.imglocker.com{0}_{1}');
$.openImage(url(m.path[1], m.path[2]));
},
});
(function () {
'use strict';
var pathRule = /^\/([0-9a-z]+)(\.|\/|$)/;
function helper (id, next) {
var f = $.$('form > input[name="next"]');
var i = $.$('img.pic');
if (!(next || f) && !i) {
_.info('do nothing');
} else if (next || f) {
$.openLinkByPost('', {
op: 'view',
id: id,
pre: 1,
next: next || f.value,
});
} else {
$.openImage(i.src);
}
}
$.register({
rule: {
host: [
/^img(paying|mega|zeus|monkey)\.com$/,
/^(www\.)?imgsee\.me$/,
/^imgclick\.net$/,
/^(uploadrr|imageeer|imzdrop)\.com$/,
/^chronos\.to$/,
],
path: pathRule,
},
ready: function (m) {
helper(m.path[1]);
},
});
$.register({
rule: {
host: /^imgrock\.net$/,
path: pathRule,
},
ready: function (m) {
var d = $.$('#imageviewir');
helper(m.path[1], d ? 'Continue to Image...' : null);
},
});
})();
(function () {
'use strict';
function handler () {
$.removeNodes('iframe');
var node = $.$('#continuetoimage > form input');
if (node) {
node.click();
node.click();
return;
}
var o = $('img[alt="image"]');
$.openImage(o.src);
}
$.register({
rule: {
host: [
/^(img(rill|next|savvy|\.spicyzilla|twyti|xyz|devil|seeds|tzar|ban)|image(corn|picsa)|www\.(imagefolks|imgblow)|hosturimage|img-(zone|planet))\.com$/,
/^(img(candy|master|-view|run)|imagelaser)\.net$/,
/^imgcloud\.co|pixup\.us$/,
/^(www\.)?\.imgult\.com$/,
/^bulkimg\.info$/,
/^(image\.adlock|imgspot|teenshot)\.org$/,
/^img\.yt$/,
/^vava\.in$/,
/^55888\.eu$/,
/^pixxx\.me$/,
/^(like\.)08lkk\.com$/,
],
path: /^\/img-.*\.html$/,
},
ready: handler,
});
$.register({
rule: {
host: /^imgking\.co$/,
path: /^\/img-.*\.htmls$/,
},
ready: handler,
});
$.register({
rule: {
host: /^08lkk\.com$/,
path: /^\/\d+\/img-.*\.html$/,
},
start: function () {
$.window.setTimeout = _.nop;
$.get(window.location.toString()).then(function (data) {
var a = $.toDOM(data);
var bbcode = $.$('#imagecodes input', a);
bbcode = bbcode.value.match(/.+\[IMG\]([^\[]+)\[\/IMG\].+/);
bbcode = bbcode[1];
bbcode = bbcode.replace('small', 'big');
$.openImage(bbcode);
});
},
});
})();
$.register({
rule: {
host: /^(imgsure|picexposed)\.com$/,
},
ready: function () {
'use strict';
var i = $('img.pic');
$.openImage(i.src);
},
});
$.register({
rule: 'http://imgtheif.com/image/*.html',
ready: function () {
'use strict';
var a = $('div.content-container a');
$.openImage(a.href);
},
});
$.register({
rule: {
host: /^imgvault\.pw$/,
path: /^\/view-image\//,
},
ready: function () {
'use strict';
var a = $('article div.span7 a[target="_blank"]');
$.openImage(a.href);
},
});
$.register({
rule: 'http://ipic.su/?page=img&pic=*',
ready: function () {
'use strict';
var i = $('#fz');
$.openImage(i.src);
},
});
$.register({
rule: {
host: /keptarolo\.hu$/,
path: /^(\/[^\/]+\/[^\/]+\.jpg)$/,
},
start: function (m) {
'use strict';
$.openImage('http://www.keptarolo.hu/kep' + m.path[1]);
},
});
$.register({
rule: {
host: /^lostpic\.net$/,
query: /^\?photo=\d+$/,
},
ready: function () {
'use strict';
var i = $('img.notinline.circle');
$.openImage(i.src);
},
});
(function () {
'use strict';
function helper (m) {
$.openImage('/images/' + m.query[1]);
}
$.register({
rule: {
host: [
/^(hentai-hosting|miragepics|funextra\.hostzi|imgrex|daily-img)\.com$/,
/^bilder\.nixhelp\.de$/,
/^imagecurl\.(com|org)$/,
/^imagevau\.eu$/,
/^img\.deli\.sh$/,
/^image(pong|back)\.info$/,
/^imgdream\.net$/,
/^photoup\.biz$/,
],
path: /^\/viewer\.php$/,
query: /file=([^&]+)/,
},
start: helper,
});
$.register({
rule: {
host: /^(dwimg|imgsin|www\.pictureshoster)\.com$/,
path: /^\/viewer\.php$/,
query: /file=([^&]+)/,
},
start: function (m) {
$.openImage('/files/' + m.query[1]);
},
});
$.register({
rule: {
host: /imageview\.me|244pix\.com|imgnip\.com|postimg\.net$/,
path: /^\/viewerr.*\.php$/,
query: /file=([^&]+)/,
},
start: helper,
});
$.register({
rule: [
'http://www.overpic.net/viewer.php?file=*',
],
ready: function () {
var i = $('#main_img');
$.openImage(i.src);
},
});
$.register({
rule: {
host: /(empireload|loadsanook)\.com$/,
query: /file=([^&]+)/,
},
start: function (m) {
$.openImage('files/' + m.query[1]);
},
});
})();
$.register({
rule: {
host: /^www\.mrjh\.org$/,
path: /^\/gallery\.php$/,
query: /^\?entry=(.+)$/,
},
ready: function (m) {
'use strict';
var url = m.query[1];
$.openImage('/' + url);
},
});
$.register({
rule: {
host: /^www\.noelshack\.com$/
},
ready: function () {
var i = $('#elt_to_aff');
$.openImage(i.src);
},
});
$.register({
rule: 'http://pic-money.ru/*.html',
ready: function () {
'use strict';
var f = document.forms[0];
var sig = $('input[name="sig"]', f).value;
var pic_id = $('input[name="pic_id"]', f).value;
var referer = $('input[name="referer"]', f).value;
var url = _.T('/pic.jpeg?pic_id={pic_id}&sig={sig}&referer={referer}');
$.openImage(url({
sig: sig,
pic_id: pic_id,
referer: referer,
}));
},
});
$.register({
rule: 'http://www.pic-upload.de/view-*.html',
ready: function () {
'use strict';
$.removeNodes('.advert');
var i = $('img.preview_picture_2b, img.original_picture_2b');
$.openImage(i.src);
},
});
$.register({
rule: {
host: /^pic(2profit|p2)\.com$/,
},
ready: function () {
'use strict';
var i = $('form > #d1 ~ input[name=bigimg]');
$.openImage(i.value);
},
});
$.register({
rule: {
host: /^pic(4|5)you.ru$/
},
ready: function () {
if ($.$('#d1 > img') != null) {
var URLparams = location.href.split("/", 5);
var next = URLparams[0] + '/' + URLparams[1] + '/' + URLparams[2] + '/' + URLparams[3] + '/' + URLparams[4] + '/1/';
$.setCookie('p4yclick','1');
$.openLink(next);
} else {
var i = $('#d1 img').src;
$.openImage(i);
}
},
});
$.register({
rule: {
host: /^(www\.)?piccash\.net$/
},
ready: function () {
var i = $('.container > img');
var m =i.onclick.toString().match(/mshow\('([^']+)'\);/);
$.openImage(m[1]);
},
});
$.register({
rule: [
'http://amateurfreak.org/share-*.html',
'http://amateurfreak.org/share.php?id=*',
'http://images.maxigame.by/share-*.html',
'http://picfox.org/*',
'http://www.euro-pic.eu/share.php?id=*',
'http://www.gratisimage.dk/share-*.html',
'http://xxx.freeimage.us/share.php?id=*',
'http://npicture.net/share-*.html',
'http://www.onlinepic.net/share.php?id=*',
'http://www.pixsor.com/share.php?id=*',
],
ready: function () {
'use strict';
var o = $('#iimg');
$.openImage(o.src);
},
});
$.register({
rule: 'http://picmoe.net/d.php?id=*',
ready: function () {
'use strict';
var i = $('img');
$.openImage(i.src);
},
});
$.register({
rule: [
'http://pics-money.ru/allpicfree/*',
'http://www.pics-money.ru/allimage/*',
],
});
$.register({
rule: {
host: /^pics-money\.ru$/,
path: /^\/v\.php$/,
},
ready: function () {
'use strict';
$.removeNodes('iframe');
var i = $('center img:not([id])');
$.openImage(i.src);
},
});
$.register({
rule: {
host: /^www\.pics-money\.ru$/,
},
ready: function () {
'use strict';
$.removeNodes('iframe');
var i = $('#d1 img');
i = i.onclick.toString();
i = i.match(/mshow\('(.+)'\)/);
i = i[1];
$.openImage(i);
},
});
$.register({
rule: 'http://picshare.geenza.com/pics/*',
ready: function () {
'use strict';
var i = $('#picShare_image_container');
$.openImage(i.src);
},
});
$.register({
rule: {
host: /^pixhub\.eu$/,
},
ready: function () {
'use strict';
$.removeNodes('iframe, .adultpage, #FFN_Banner_Holder');
var i = $('.image-show img');
$.openImage(i.src);
},
});
$.register({
rule: {
host: /^(www\.)?pixroute\.com$/
},
ready: function () {
'use strict';
var o = $('body > center > div > center:nth-child(12) > div > a > img');
$.openImage(o.src);
},
});
$.register({
rule: {
host: /^www\.pornimagex\.com$/,
path: /^\/image\/.*$/,
},
ready: function () {
'use strict';
var img = $('#fixed img.border2px');
$.openImage(img.src);
},
});
$.register({
rule: {
host: /^postimg\.org$/,
},
ready: function () {
'use strict';
var i = $('body > center > img');
$.openImage(i.src);
},
});
$.register({
rule: {
host: /^prntscr\.com$/
},
ready: function () {
'use strict';
var i = $('#screenshot-image');
$.openImage(i.src);
},
});
$.register({
rule: {
host: /^pronpic\.org$/,
},
ready: function () {
'use strict';
var img = $('table.new_table2:nth-child(2) img.link');
var url = img.src.replace('th_', '');
$.openImage(url);
},
});
$.register({
rule: {
host: /^(qrrro|greenpiccs)\.com$/,
path: /^(\/images\/.+)\.html$/,
},
start: function (m) {
'use strict';
$.openImage(m.path[1]);
},
});
(function () {
'use strict';
function ready () {
var i = $('img[class^=centred]');
$.openImage(i.src);
}
$.register({
rule: [
{
host: [
/^(image(decode|ontime)|(zonezeed|zelje|croft|myhot|dam|bok)image|picstwist|www\.imglemon|ericsony|imgpu|wpc8|uplimg|goimge)\.com$/,
/^(img(serve|coin|fap)|gallerycloud)\.net$/,
/^hotimages\.eu$/,
/^(imgstudio|dragimage|imageteam)\.org$/,
/^((i|hentai)\.)?imgslip\.com$/,
/^(i|xxx)\.hentaiyoutube\.com$/,
],
path: /^\/img-.*\.html$/,
},
{
host: /^imgrun\.net$/,
path: /^\/t\/img-.*\.html$/,
},
],
ready: ready,
});
$.register({
rule: {
host: /^www.img(adult|taxi).com$/,
path: /^\/img-.*\.html$/,
},
start: function () {
var c = $.getCookie('user');
if (c) {
return;
}
$.setCookie('user', 'true');
window.location.reload();
},
ready: ready,
});
$.register({
rule: {
host: /^08lkk\.com$/,
path: /^\/Photo\/img-.+\.html$/,
},
start: function () {
$.window.setTimeout = _.nop;
$.get(window.location.toString()).then(function (data) {
var a = $.toDOM(data);
var i = $('img[class^=centred]', a);
$.openImage(i.src);
});
},
});
})();
(function () {
'use strict';
$.register({
rule: {
host: /^www\.imagesnake\.com$/,
path: /^\/index\.php$/,
query: /^\?/,
},
ready: function () {
var a = $('#tablewraper a:nth-child(2)');
$.openImage(a.href);
},
});
function run () {
var i = $('#img_obj');
$.openImage(i.src);
}
$.register({
rule: {
host: /^www\.(imagesnake|freebunker|imgcarry)\.com$/,
path: /^\/show\//,
},
ready: run,
});
$.register({
rule: {
host: /^www\.imagefruit\.com$/,
path: /^\/(img|show)\/.+/,
},
ready: run,
});
})();
$.register({
rule: 'http://www.subirimagenes.com/*.html',
ready: function () {
'use strict';
var i = $('#ImagenVisualizada');
$.openImage(i.src);
},
});
$.register({
rule: 'http://tinypic.com/view.php?pic=*',
ready: function () {
'use strict';
var i = $('#imgElement');
$.openImage(i.src);
},
});
$.register({
rule: {
host: /^www\.turboimagehost\.com$/,
},
ready: function () {
'use strict';
var i = $('#imageid');
$.openImage(i.src);
},
});
$.register({
rule: 'http://vvcap.net/db/*.htp',
ready: function () {
'use strict';
var i = $('img');
$.replace(i.src);
},
});
$.register({
rule: {
host: /^x\.pixfarm\.net$/,
path: /^\/sexy\/\d+\/\d+\/.+\.html$/,
},
ready: function () {
'use strict';
var i = $('img');
$.openImage(i.src);
},
});
$.register({
rule: {
host: /\.yfrog\.com$/,
},
ready: function () {
'use strict';
if (/^\/z/.test(window.location.pathname)) {
var i = $('#the-image img');
$.openImage(i.src);
return;
}
var a = $.$('#continue-link a, #main_image');
if (a) {
$.openLink('/z' + window.location.pathname);
return;
}
},
});
$.register({
rule: {
host: /^01\.nl$/,
},
ready: function () {
'use strict';
var f = $('iframe#redirectframe');
$.openLink(f.src);
},
});
$.register({
rule: {
host: /^(www\.)?1be\.biz$/,
path: /^\/s\.php$/,
query: /^\?(.+)/,
},
start: function (m) {
'use strict';
$.openLink(m.query[1]);
},
});
$.register({
rule: {
host: /^(www\.)?1tiny\.net$/,
path: /\/\w+/
},
ready: function () {
'use strict';
var directUrl = $.searchScripts(/window\.location='([^']+)';/);
if (!directUrl) {
throw new _.AdsBypasserError('script content changed');
}
$.openLink(directUrl[1]);
},
});
$.register({
rule: {
host: /^2ty\.cc$/,
path: /^\/.+/,
},
ready: function () {
'use strict';
$.removeNodes('iframe');
var a = $('#close');
$.openLink(a.href);
},
});
$.register({
rule: {
host: /^(www\.)?3ra\.be$/,
},
ready: function () {
'use strict';
$.removeNodes('iframe');
var f = $.window.fc;
if (!f) {
throw new _.AdsBypasserError('window.fc is undefined');
}
f = f.toString();
f = f.match(/href="([^"]*)/);
if (!f) {
throw new _.AdsBypasserError('url pattern outdated');
}
$.openLink(f[1]);
},
});
$.register({
rule: {
host: /^(www\.)?4fun\.tw$/,
},
ready: function () {
'use strict';
var i = $('#original_url');
$.openLink(i.value);
},
});
$.register({
rule: {
host: /^ad2links\.com$/,
path: /^\/\w-.+$/,
},
ready: function () {
'use strict';
$.removeNodes('iframe');
$.openLinkByPost(window.location.toString(), {
image: 'Skip Ad.',
});
},
});
(function () {
'use strict';
$.register({
rule: {
host: /^ad7.biz$/,
path: /^\/\d+\/(.*)$/,
},
start: function (m) {
$.removeNodes('iframe');
var redirectLink = m.path[1];
if (!redirectLink.match(/^https?:\/\//)) {
redirectLink = "http://" + redirectLink;
}
$.openLink(redirectLink);
},
});
$.register({
rule: {
host: /^ad7.biz$/,
path: /^\/\w+$/,
},
ready: function () {
$.removeNodes('iframe');
var script = $.searchScripts('var r_url');
var url = script.match(/&url=([^&]+)/);
url = url[1];
$.openLink(url);
},
});
})();
$.register({
rule: {
host: /^(www\.)?adb\.ug$/,
path: /^(?!\/(?:privacy|terms|contact(\/.*)?|#.*)?$).*$/
},
ready: function () {
'use strict';
$.removeNodes('iframe');
var m = $.searchScripts(/top\.location\.href="([^"]+)"/);
if (m) {
$.openLink(m[1]);
return;
}
m = $.searchScripts(/\{_args.+\}\}/);
if (!m) {
throw new _.AdsBypasserError('script content changed');
}
m = eval('(' + m[0] + ')');
var url = window.location.pathname + '/skip_timer';
var i = setInterval(function () {
$.post(url, m).then(function (text) {
var jj = _.parseJSON(text);
if (!jj.errors && jj.messages) {
clearInterval(i);
$.openLink(jj.messages.url);
}
});
}, 1000);
},
});
(function () {
'use strict';
$.register({
rule: {
path: /\/locked$/,
query: /url=([^&]+)/,
},
start: function (m) {
$.resetCookies();
var url = decodeURIComponent(m.query[1]);
if (url.match(/^http/)) {
$.openLink(url);
} else {
$.openLink('/' + url);
}
},
});
$.register({
rule: function () {
var h = $.$('html[id="adfly_html"]');
var b = $.$('body[id="home"]');
if (h && b) {
return true;
} else {
return null;
}
},
ready: function () {
var h = $.$('#adfly_html'), b = $.$('#home');
if (!h || !b || h.nodeName !== 'HTML' || b.nodeName !== 'BODY') {
return;
}
$.removeNodes('iframe');
$.window.cookieCheck = _.nop;
h = $.window.eu;
if (!h) {
h = $('#adfly_bar');
$.window.close_bar();
return;
}
var a = h.indexOf('!HiTommy');
if (a >= 0) {
h = h.substring(0, a);
}
a = '';
b = '';
for (var i = 0; i < h.length; ++i) {
if (i % 2 === 0) {
a = a + h.charAt(i);
} else {
b = h.charAt(i) + b;
}
}
h = atob(a + b);
h = h.substr(2);
if (location.hash) {
h += location.hash;
}
$.openLinkWithReferer(h);
},
});
$.register({
rule: 'http://ad7.biz/*',
ready: function () {
$.removeNodes('iframe');
$.resetCookies();
var script = $.searchScripts('var r_url');
var url = script.match(/&url=([^&]+)/);
url = url[1];
$.openLinkWithReferer(url);
},
});
$.register({
rule: [
{
host: /vnl\.tuhoctoan\.net/,
path: /^\/id\/$/,
query: /\?l=([a-zA-Z0-9=]+)/,
},{
host: /tavor-cooperation\.de/,
path: /^\/cheat\/$/,
query: /\?link=([a-zA-Z0-9=]+)/
},
],
start: function (m) {
var l = atob(m.query[1]);
$.openLink(l);
},
});
})();
$.register({
rule: 'http://adfoc.us/*',
ready: function () {
'use strict';
var root = document.body;
var observer = new MutationObserver(function (mutations) {
var o = $.$('#showSkip');
if (o) {
observer.disconnect();
o = o.querySelector('a');
$.openLink(o.href);
}
});
observer.observe(root, {
childList: true,
subtree: true,
});
},
});
$.register({
rule: {
host: /^(www\.)?adjet\.biz$/,
},
ready: function () {
'use strict';
var m = $.searchScripts(/href=(\S+)/);
if (!m) {
throw new _.AdsBypasserError('site changed');
}
$.openLink(m[1]);
},
});
$.register({
rule: {
host: /^adlock\.org$/,
},
ready: function () {
'use strict';
var a = $.$('#xre a.xxr, #downloadButton1');
if (a) {
$.openLink(a.href);
return;
}
a = $.window.fileLocation;
if (a) {
$.openLink(a);
}
},
});
$.register({
rule: {
host: /^(www\.)?adlot\.us$/,
},
ready: function () {
'use strict';
$.removeNodes('iframe');
var script = $.searchScripts('form');
var p = /name='([^']+)' value='([^']+)'/g;
var opt = {
image: ' ',
};
var tmp = null;
while (tmp = p.exec(script)) {
opt[tmp[1]] = tmp[2];
}
$.openLinkByPost('', opt);
},
});
$.register({
rule: {
host: /^(www\.)?ah-informatique\.com$/,
path: /^\/ZipUrl/,
},
ready: function () {
'use strict';
var a = $('#zip3 a');
$.openLink(a.href);
},
});
$.register({
rule: {
host: /^aka\.gr$/
},
ready: function () {
'use strict';
var l = $('iframe#yourls-frame');
$.openLink(l.src);
},
});
$.register({
rule: {
host: /^(www\.)?allkeyshop\.com$/,
},
ready: function (m) {
'use strict';
var matches = $.searchScripts(/window\.location\.href = "([^"]+)"/);
$.openLink(matches[1]);
$.removeAllTimer();
},
});
$.register({
rule: {
host: /^anonymbucks\.com$/,
},
ready: function () {
'use strict';
var a = $('#boton-continuar');
a.click();
},
});
$.register({
rule: {
host: [
/^(awet|sortir)\.in$/,
/^st\.benfile\.com$/,
],
},
ready: function () {
'use strict';
var m = $.searchScripts(/window\.location="([^"]*)";/);
$.openLink(m[1]);
},
});
(function () {
'use strict';
$.register({
rule: {
host: /^bc\.vc$/,
path: /^.+(https?:\/\/.+)$/,
},
start: function (m) {
$.openLink(m.path[1] + document.location.search + document.location.hash);
},
});
function decompress (script, unzip) {
if (!unzip) {
return script;
}
var matches = script.match(/eval(.*)/);
matches = matches[1];
script = eval(matches);
return script;
}
function searchScript (unzip) {
var content = $.searchScripts('make_log');
if (content) {
return {
direct: false,
script: decompress(content, unzip),
};
}
content = $.searchScripts('click_log');
if (content) {
return {
direct: true,
script: decompress(content, unzip),
};
}
throw _.AdsBypasserError('script changed');
}
function knockServer (script, dirtyFix) {
var matches = script.match(/\$.post\('([^']*)'[^{]+(\{opt:'make_log'[^}]+\}\}),/i);
var make_url = matches[1];
var make_opts = eval('(' + matches[2] + ')');
var i = setInterval(function () {
$.post(make_url, make_opts).then(function (text) {
if (dirtyFix) {
text = text.match(/\{.+\}/)[0];
}
var jj = _.parseJSON(text);
if (jj.message) {
clearInterval(i);
$.openLink(jj.message.url);
}
});
}, 1000);
}
function knockServer2 (script) {
var post = $.window.$.post;
$.window.$.post = function (a, b, c) {
if (typeof c !== 'function') {
return;
}
setTimeout(function () {
var data = {
error: false,
message: {
url: '#',
},
};
c(JSON.stringify(data));
}, 1000);
};
var matches = script.match(/\$.post\('([^']*)'[^{]+(\{opt:'make_log'[^}]+\}\}),/i);
var make_url = matches[1];
var make_opts = eval('(' + matches[2] + ')');
function makeLog () {
make_opts.opt = 'make_log';
post(make_url, make_opts, function (text) {
var data = _.parseJSON(text);
_.info('make_log', data);
if (!data.message) {
checksLog();
return;
}
$.openLink(data.message.url);
});
}
function checkLog () {
make_opts.opt = 'check_log';
post(make_url, make_opts, function (text) {
var data = _.parseJSON(text);
_.info('check_log', data);
if (!data.message) {
checkLog();
return;
}
makeLog();
});
}
function checksLog () {
make_opts.opt = 'checks_log';
post(make_url, make_opts, function () {
_.info('checks_log');
checkLog();
});
}
checksLog();
}
$.register({
rule: {
host: /^bc\.vc$/,
path: /^\/.+/,
},
ready: function () {
$.removeNodes('iframe');
var result = searchScript(false);
if (!result.direct) {
knockServer2(result.script);
} else {
result = result.script.match(/top\.location\.href = '([^']+)'/);
if (!result) {
throw new _.AdsBypasserError('script changed');
}
result = result[1];
$.openLink(result);
}
},
});
function run (dirtyFix) {
$.removeNodes('iframe');
var result = searchScript(true);
if (!result.direct) {
knockServer(result.script,dirtyFix);
} else {
result = result.script.match(/top\.location\.href='([^']+)'/);
if (!result) {
throw new _.AdsBypasserError('script changed');
}
result = result[1];
$.openLink(result);
}
}
$.register({
rule: {
host: /^adcrun\.ch$/,
path: /^\/\w+$/,
},
ready: function () {
$.removeNodes('.user_content');
var rSurveyLink = /http\.open\("GET", "api_ajax\.php\?sid=\d*&ip=[^&]*&longurl=([^"]+)" \+ first_time, (?:true|false)\);/;
var l = $.searchScripts(rSurveyLink);
if (l) {
$.openLink(l[1]);
return;
}
run(true);
},
});
$.register({
rule: {
host: [
/^1tk\.us$/,
/^gx\.si$/,
/^adwat\.ch$/,
/^(fly2url|urlwiz|xafox)\.com$/,
/^(zpoz|ultry)\.net$/,
/^(wwy|myam)\.me$/,
/^ssl\.gs$/,
/^link\.tl$/,
/^hit\.us$/,
/^shortit\.in$/,
/^(adbla|tl7)\.us$/,
/^www\.adjet\.eu$/,
/^srk\.gs$/,
/^cun\.bz$/,
/^miniurl\.tk$/,
/^vizzy\.es$/,
/^kazan\.vc$/,
],
path: /^\/.+/,
},
ready: run,
});
$.register({
rule: {
host: /^adtr\.im|ysear\.ch|xip\.ir$/,
path: /^\/.+/,
},
ready: function () {
var a = $.$('div.fly_head a.close');
var f = $.$('iframe.fly_frame');
if (a && f) {
$.openLink(f.src);
} else {
run();
}
},
});
$.register({
rule: {
host: /^ad5\.eu$/,
path: /^\/[^.]+$/,
},
ready: function() {
$.removeNodes('iframe');
var s = searchScript(true);
var m = s.script.match(/(