AdsBypasser

Bypass Ads

当前为 2015-01-26 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name AdsBypasser
  3. // @namespace AdsBypasser
  4. // @description Bypass Ads
  5. // @copyright 2012+, Wei-Cheng Pan (legnaleurc)
  6. // @version 5.13.1
  7. // @license BSD
  8. // @homepageURL https://adsbypasser.github.io/
  9. // @supportURL https://github.com/adsbypasser/adsbypasser/issues
  10. // @icon https://raw.githubusercontent.com/adsbypasser/adsbypasser/v5.13.1/img/logo.png
  11. // @grant unsafeWindow
  12. // @grant GM_xmlhttpRequest
  13.  
  14. // @grant GM_addStyle
  15. // @grant GM_getResourceText
  16. // @grant GM_getResourceURL
  17.  
  18. // @grant GM_getValue
  19. // @grant GM_openInTab
  20. // @grant GM_registerMenuCommand
  21. // @grant GM_setValue
  22. // @run-at document-start
  23.  
  24. // @resource alignCenter https://raw.githubusercontent.com/adsbypasser/adsbypasser/v5.13.1/css/align_center.css
  25. // @resource scaleImage https://raw.githubusercontent.com/adsbypasser/adsbypasser/v5.13.1/css/scale_image.css
  26. // @resource bgImage https://raw.githubusercontent.com/adsbypasser/adsbypasser/v5.13.1/img/imagedoc-darknoise.png
  27.  
  28. // @include http://*
  29. // @include https://*
  30. // ==/UserScript==
  31.  
  32. (function (global, factory) {
  33. if (typeof module === 'object' && typeof module.exports === 'object') {
  34. var bluebird = require('bluebird');
  35. module.exports = factory(global, bluebird.Promise);
  36. } else {
  37. factory(global, global.Promise || function (fn) {
  38. return global.unsafeWindow.Future.call(this, function (fr) {
  39. fn(fr.resolve.bind(fr), fr.reject.bind(fr));
  40. });
  41. });
  42. }
  43. }(this, function (global, Promise) {
  44. 'use strict';
  45. var _ = global._ = {};
  46. function setupStack () {
  47. if (Error.captureStackTrace) {
  48. Error.captureStackTrace(this, this.constructor);
  49. } else if (!this.hasOwnProperty('stack')) {
  50. var stack = (new Error()).stack.split('\n').slice(2);
  51. var e = stack[0].match(/^.*@(.*):(\d*)$/);
  52. this.fileName = e[1];
  53. this.lineNumber = parseInt(e[2], 10);
  54. this.stack = stack.join('\n');
  55. }
  56. }
  57. function AdsBypasserError (message) {
  58. setupStack.call(this);
  59. this.message = message;
  60. }
  61. AdsBypasserError.prototype = Object.create(Error.prototype);
  62. AdsBypasserError.prototype.constructor = AdsBypasserError;
  63. AdsBypasserError.prototype.name = 'AdsBypasserError';
  64. AdsBypasserError.extend = function (protoProps, staticProps) {
  65. var parent = this, child = function () {
  66. setupStack.call(this);
  67. protoProps.constructor.apply(this, arguments);
  68. };
  69. extend(child, parent, staticProps);
  70. child.prototype = Object.create(parent.prototype);
  71. extend(child.prototype, protoProps);
  72. child.prototype.constructor = child;
  73. child.super = parent.prototype;
  74. return child;
  75. };
  76. AdsBypasserError.super = null;
  77. _.AdsBypasserError = AdsBypasserError;
  78. function any (c, fn) {
  79. if (c.some) {
  80. return c.some(fn);
  81. }
  82. if (typeof c.length === 'number') {
  83. return Array.prototype.some.call(c, fn);
  84. }
  85. return Object.keys(c).some(function (k) {
  86. return fn(c[k], k, c);
  87. });
  88. }
  89. function all (c, fn) {
  90. if (c.every) {
  91. return c.every(fn);
  92. }
  93. if (typeof c.length === 'number') {
  94. return Array.prototype.every.call(c, fn);
  95. }
  96. return Object.keys(c).every(function (k) {
  97. return fn(c[k], k, c);
  98. });
  99. }
  100. function each (c, fn) {
  101. if (c.forEach) {
  102. c.forEach(fn);
  103. } else if (typeof c.length === 'number') {
  104. Array.prototype.forEach.call(c, fn);
  105. } else {
  106. Object.keys(c).forEach(function (k) {
  107. fn(c[k], k, c);
  108. });
  109. }
  110. }
  111. function map (c, fn) {
  112. if (c.map) {
  113. return c.map(fn);
  114. }
  115. if (typeof c.length === 'number') {
  116. return Array.prototype.map.call(c, fn);
  117. }
  118. return Object.keys(c).map(function (k) {
  119. return fn(c[k], k, c);
  120. });
  121. }
  122. function extend(c) {
  123. Array.prototype.slice.call(arguments, 1).forEach(function (source) {
  124. if (!source) {
  125. return;
  126. }
  127. _.C(source).each(function (v, k) {
  128. c[k] = v;
  129. });
  130. });
  131. return c;
  132. }
  133. function CollectionProxy (collection) {
  134. this._c = collection;
  135. }
  136. CollectionProxy.prototype.size = function () {
  137. if (typeof this._c.length === 'number') {
  138. return this._c.length;
  139. }
  140. return Object.keys(c).length;
  141. };
  142. CollectionProxy.prototype.at = function (k) {
  143. return this._c[k];
  144. };
  145. CollectionProxy.prototype.each = function (fn) {
  146. each(this._c, fn);
  147. return this;
  148. };
  149. CollectionProxy.prototype.find = function (fn) {
  150. var result;
  151. any(this._c, function (value, index, self) {
  152. var tmp = fn(value, index, self);
  153. if (tmp !== _.nop) {
  154. result = {
  155. key: index,
  156. value: value,
  157. payload: tmp,
  158. };
  159. return true;
  160. }
  161. return false;
  162. });
  163. return result;
  164. };
  165. CollectionProxy.prototype.all = function (fn) {
  166. return all(this._c, fn);
  167. };
  168. CollectionProxy.prototype.map = function (fn) {
  169. return map(this._c, fn);
  170. };
  171. _.C = function (collection) {
  172. return new CollectionProxy(collection);
  173. };
  174. _.T = function (s) {
  175. if (typeof s === 'string') {
  176. } else if (s instanceof String) {
  177. s = s.toString();
  178. } else {
  179. throw new AdsBypasserError('template must be a string');
  180. }
  181. var T = {
  182. '{{': '{',
  183. '}}': '}',
  184. };
  185. return function () {
  186. var args = Array.prototype.slice.call(arguments);
  187. var kwargs = args[args.length-1];
  188. return s.replace(/\{\{|\}\}|\{([^\}]+)\}/g, function (m, key) {
  189. if (T.hasOwnProperty(m)) {
  190. return T[m];
  191. }
  192. if (args.hasOwnProperty(key)) {
  193. return args[key];
  194. }
  195. if (kwargs.hasOwnProperty(key)) {
  196. return kwargs[key];
  197. }
  198. return m;
  199. });
  200. };
  201. };
  202. _.P = function (fn) {
  203. if (typeof fn !== 'function') {
  204. throw new _.AdsBypasserError('must give a function');
  205. }
  206. var slice = Array.prototype.slice;
  207. var args = slice.call(arguments, 1);
  208. return function () {
  209. return fn.apply(this, args.concat(slice.call(arguments)));
  210. };
  211. };
  212. _.D = function (fn) {
  213. return new Promise(fn);
  214. };
  215. _.nop = function () {
  216. };
  217. function log (method, args) {
  218. args = Array.prototype.slice.call(args);
  219. if (typeof args[0] === 'string' || args[0] instanceof String) {
  220. args[0] = 'AdsBypasser: ' + args[0];
  221. } else {
  222. args.unshift('AdsBypasser:');
  223. }
  224. var f = console[method];
  225. if (typeof f === 'function') {
  226. f.apply(console, args);
  227. }
  228. }
  229. _.info = function () {
  230. log('info', arguments);
  231. };
  232. _.warn = function () {
  233. log('warn', arguments);
  234. };
  235. return _;
  236. }));
  237.  
  238. (function (global, factory) {
  239. if (typeof module === 'object' && typeof module.exports === 'object') {
  240. module.exports = function (global) {
  241. var core = require('./core.js');
  242. return factory(global, core);
  243. };
  244. } else {
  245. global.$ = factory(global, global._);
  246. }
  247. }(this, function (global, _) {
  248. 'use strict';
  249. var window = global.window;
  250. var document = window.document;
  251. var DomNotFoundError = _.AdsBypasserError.extend({
  252. name: 'DomNotFoundError',
  253. constructor: function (selector) {
  254. DomNotFoundError.super.constructor.call(this, _.T('`{0}` not found')(selector));
  255. },
  256. });
  257. var $ = function (selector, context) {
  258. if (!context || !context.querySelector) {
  259. context = document;
  260. }
  261. var n = context.querySelector(selector);
  262. if (!n) {
  263. throw new DomNotFoundError(selector);
  264. }
  265. return n;
  266. };
  267. $.$ = function (selector, context) {
  268. try {
  269. return $(selector, context);
  270. } catch (e) {
  271. return null;
  272. }
  273. };
  274. $.$$ = function (selector, context) {
  275. if (!context || !context.querySelectorAll) {
  276. context = document;
  277. }
  278. var ns = context.querySelectorAll(selector);
  279. return _.C(ns);
  280. };
  281. $.toDOM = function(rawHTML) {
  282. try {
  283. var parser = new DOMParser();
  284. var DOMHTML = parser.parseFromString(rawHTML, "text/html");
  285. return DOMHTML;
  286. } catch (e) {
  287. throw new _.AdsBypasserError('could not parse HTML to DOM');
  288. }
  289. };
  290. $.removeNodes = function (selector, context) {
  291. $.$$(selector, context).each(function (e) {
  292. e.parentNode.removeChild(e);
  293. });
  294. };
  295. function searchScriptsByRegExp (pattern, context) {
  296. var m = $.$$('script', context).find(function (s) {
  297. var m = s.innerHTML.match(pattern);
  298. if (!m) {
  299. return _.nop;
  300. }
  301. return m;
  302. });
  303. if (!m) {
  304. return null;
  305. }
  306. return m.payload;
  307. }
  308. function searchScriptsByString (pattern, context) {
  309. var m = $.$$('script', context).find(function (s) {
  310. var m = s.innerHTML.indexOf(pattern);
  311. if (m < 0) {
  312. return _.nop;
  313. }
  314. return m;
  315. });
  316. if (!m) {
  317. return null;
  318. }
  319. return m.value.innerHTML;
  320. }
  321. $.searchScripts = function (pattern, context) {
  322. if (pattern instanceof RegExp) {
  323. return searchScriptsByRegExp(pattern, context);
  324. } else if (typeof pattern === 'string') {
  325. return searchScriptsByString(pattern, context);
  326. } else {
  327. return null;
  328. }
  329. };
  330. return $;
  331. }));
  332.  
  333. (function (global, factory) {
  334. if (typeof module === 'object' && typeof module.exports === 'object') {
  335. module.exports = function (global, GM) {
  336. var core = require('./core.js');
  337. return factory(global, GM, core);
  338. };
  339. } else {
  340. factory(global, {
  341. xmlhttpRequest: GM_xmlhttpRequest,
  342. }, global._);
  343. }
  344. }(this, function (global, GM, _) {
  345. 'use strict';
  346. var window = global.window;
  347. var document = window.document;
  348. var $ = global.$ || {};
  349. function deepJoin (prefix, object) {
  350. return _.C(object).map(function (v, k) {
  351. var key = _.T('{0}[{1}]')(prefix, k);
  352. if (typeof v === 'object') {
  353. return deepJoin(key, v);
  354. }
  355. return _.T('{0}={1}').apply(this, [key, v].map(encodeURIComponent));
  356. }).join('&');
  357. }
  358. function toQuery (data) {
  359. var type = typeof data;
  360. if (data === null || (type !== 'string' && type !== 'object')) {
  361. return '';
  362. }
  363. if (type === 'string') {
  364. return data;
  365. }
  366. if (data instanceof String) {
  367. return data.toString();
  368. }
  369. return _.C(data).map(function (v, k) {
  370. if (typeof v === 'object') {
  371. return deepJoin(k, v);
  372. }
  373. return _.T('{0}={1}').apply(this, [k, v].map(encodeURIComponent));
  374. }).join('&');
  375. }
  376. function ajax (method, url, data, headers) {
  377. var l = document.createElement('a');
  378. l.href = url;
  379. var reqHost = l.hostname;
  380. headers.Host = reqHost || window.location.host;
  381. headers.Origin = window.location.origin;
  382. headers.Referer = window.location.href;
  383. headers['X-Requested-With'] = 'XMLHttpRequest';
  384. var xhr = null;
  385. var promise = _.D(function (resolve, reject) {
  386. xhr = GM.xmlhttpRequest({
  387. method: method,
  388. url: url,
  389. data: data,
  390. headers: headers,
  391. onload: function (response) {
  392. response = (typeof this.responseText !== 'undefined') ? this : response;
  393. if (response.status !== 200) {
  394. reject(response.responseText);
  395. } else {
  396. resolve(response.responseText);
  397. }
  398. },
  399. onerror: function (response) {
  400. response = (typeof this.responseText !== 'undefined') ? this : response;
  401. reject(response.responseText);
  402. },
  403. });
  404. });
  405. promise.abort = function () {
  406. xhr.abort();
  407. };
  408. return promise;
  409. }
  410. $.get = function (url, data, headers) {
  411. data = toQuery(data);
  412. data = data ? '?' + data : '';
  413. headers = headers || {};
  414. return ajax('GET', url + data, '', headers);
  415. };
  416. $.post = function (url, data, headers) {
  417. data = toQuery(data);
  418. var h = {
  419. 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
  420. 'Content-Length': data.length,
  421. };
  422. if (headers) {
  423. _.C(headers).each(function (v, k) {
  424. h[k] = v;
  425. });
  426. }
  427. return ajax('POST', url, data, h);
  428. };
  429. return $;
  430. }));
  431.  
  432. (function (global, factory) {
  433. if (typeof module === 'object' && typeof module.exports === 'object') {
  434. module.exports = function (global) {
  435. var core = require('./core.js');
  436. return factory(global, core);
  437. };
  438. } else {
  439. factory(global, global._);
  440. }
  441. }(this, function (global, _) {
  442. 'use strict';
  443. var window = global.window;
  444. var document = window.document;
  445. var $ = global.$ || {};
  446. $.setCookie = function (key, value) {
  447. var now = new Date();
  448. now.setTime(now.getTime() + 3600 * 1000);
  449. var tpl = _.T('{0}={1};path=/;');
  450. document.cookie = tpl(key, value, now.toUTCString());
  451. };
  452. $.getCookie = function (key) {
  453. var c = _.C(document.cookie.split(';')).find(function (v) {
  454. var k = v.replace(/^\s*(\w+)=.+$/, '$1');
  455. if (k !== key) {
  456. return _.nop;
  457. }
  458. });
  459. if (!c) {
  460. return null;
  461. }
  462. c = c.value.replace(/^\s*\w+=([^;]+).+$/, '$1');
  463. if (!c) {
  464. return null;
  465. }
  466. return c;
  467. };
  468. $.resetCookies = function () {
  469. var a = document.domain;
  470. var b = document.domain.replace(/^www\./, '');
  471. var c = document.domain.replace(/^(\w+\.)+?(\w+\.\w+)$/, '$2');
  472. var d = (new Date(1e3)).toUTCString();
  473. _.C(document.cookie.split(';')).each(function (v) {
  474. var k = v.replace(/^\s*(\w+)=.+$/, '$1');
  475. document.cookie = _.T('{0}=;expires={1};')(k, d);
  476. document.cookie = _.T('{0}=;path=/;expires={1};')(k, d);
  477. var e = _.T('{0}=;path=/;domain={1};expires={2};');
  478. document.cookie = e(k, a, d);
  479. document.cookie = e(k, b, d);
  480. document.cookie = e(k, c, d);
  481. });
  482. };
  483. return $;
  484. }));
  485.  
  486. (function (global, factory) {
  487. if (typeof module === 'object' && typeof module.exports === 'object') {
  488. module.exports = function (global) {
  489. var core = require('./core.js');
  490. return factory(global, core);
  491. };
  492. } else {
  493. factory(global, global._);
  494. }
  495. }(this, function (global, _) {
  496. 'use strict';
  497. var window = global.window;
  498. var document = window.document;
  499. var $ = global.$ || {};
  500. var patterns = [];
  501. $.register = function (pattern) {
  502. patterns.push(pattern);
  503. };
  504. function dispatchByObject (rule, url_6) {
  505. var matched = {};
  506. var passed = _.C(rule).all(function (pattern, part) {
  507. if (pattern instanceof RegExp) {
  508. matched[part] = url_6[part].match(pattern);
  509. } else if (pattern instanceof Array) {
  510. var r = _.C(pattern).find(function (p) {
  511. var m = url_6[part].match(p);
  512. return m || _.nop;
  513. });
  514. matched[part] = r ? r.payload : null;
  515. }
  516. return !!matched[part];
  517. });
  518. return passed ? matched : null;
  519. }
  520. function dispatchByRegExp (rule, url_1) {
  521. return url_1.match(rule);
  522. }
  523. function dispatchByArray (byLocation, rules, url_1, url_3, url_6) {
  524. var tmp = _.C(rules).find(function (rule) {
  525. var m = dispatch(byLocation, rule, url_1, url_3, url_6);
  526. if (!m) {
  527. return _.nop;
  528. }
  529. return m;
  530. });
  531. return tmp ? tmp.payload : null;
  532. }
  533. function dispatchByString (rule, url_3) {
  534. var scheme = /\*|https?|file|ftp|chrome-extension/;
  535. var host = /\*|(\*\.)?([^\/*]+)/;
  536. var path = /\/.*/;
  537. var up = new RegExp(_.T('^({scheme})://({host})?({path})$')({
  538. scheme: scheme.source,
  539. host: host.source,
  540. path: path.source,
  541. }));
  542. var matched = rule.match(up);
  543. if (!matched) {
  544. return null;
  545. }
  546. scheme = matched[1];
  547. host = matched[2];
  548. var wc = matched[3];
  549. var sd = matched[4];
  550. path = matched[5];
  551. if (scheme === '*' && !/https?/.test(url_3.scheme)) {
  552. return null;
  553. } else if (scheme !== url_3.scheme) {
  554. return null;
  555. }
  556. if (scheme !== 'file' && host !== '*') {
  557. if (wc) {
  558. up = url_3.host.indexOf(sd);
  559. if (up < 0 || up + sd.length !== url_3.host.length) {
  560. return null;
  561. }
  562. } else if (host !== url_3.host) {
  563. return null;
  564. }
  565. }
  566. path = new RegExp(_.T('^{0}$')(path.replace(/[*.\[\]?+#]/g, function (c) {
  567. if (c === '*') {
  568. return '.*';
  569. }
  570. return '\\' + c;
  571. })));
  572. if (!path.test(url_3.path)) {
  573. return null;
  574. }
  575. return url_3;
  576. }
  577. function dispatchByFunction (rule, url_1, url_3, url_6) {
  578. return rule(url_1, url_3, url_6);
  579. }
  580. function dispatch (byLocation, rule, url_1, url_3, url_6) {
  581. if (rule instanceof Array) {
  582. return dispatchByArray(byLocation, rule, url_1, url_3, url_6);
  583. }
  584. if (!byLocation) {
  585. if (typeof rule !== 'function') {
  586. return null;
  587. }
  588. return dispatchByFunction(rule, url_1, url_3, url_6);
  589. }
  590. if (rule instanceof RegExp) {
  591. return dispatchByRegExp(rule, url_1);
  592. }
  593. if (typeof rule === 'string' || rule instanceof String) {
  594. return dispatchByString(rule, url_3);
  595. }
  596. if (typeof rule === 'function') {
  597. return null;
  598. }
  599. return dispatchByObject(rule, url_6);
  600. }
  601. $._findHandler = function (byLocation) {
  602. var url_1 = window.location.toString();
  603. var url_3 = {
  604. scheme: window.location.protocol.slice(0, -1),
  605. host: window.location.host,
  606. path: window.location.pathname + window.location.search + window.location.hash,
  607. };
  608. var url_6 = {
  609. scheme: window.location.protocol,
  610. host: window.location.hostname,
  611. port: window.location.port,
  612. path: window.location.pathname,
  613. query: window.location.search,
  614. hash: window.location.hash,
  615. };
  616. var pattern = _.C(patterns).find(function (pattern) {
  617. var m = dispatch(byLocation, pattern.rule, url_1, url_3, url_6);
  618. if (!m) {
  619. return _.nop;
  620. }
  621. return m;
  622. });
  623. if (!pattern) {
  624. return null;
  625. }
  626. var matched = pattern.payload;
  627. pattern = pattern.value;
  628. if (!pattern.start && !pattern.ready) {
  629. return null;
  630. }
  631. return {
  632. start: pattern.start ? _.P(pattern.start, matched) : _.nop,
  633. ready: pattern.ready ? _.P(pattern.ready, matched) : _.nop,
  634. };
  635. };
  636. return $;
  637. }));
  638.  
  639. (function (global, factory) {
  640. if (typeof module === 'object' && typeof module.exports === 'object') {
  641. module.exports = function (global) {
  642. var core = require('./core.js');
  643. return factory(global, core);
  644. };
  645. } else {
  646. factory(global, global._);
  647. }
  648. }(this, function (global, _) {
  649. 'use strict';
  650. var window = global.window;
  651. var document = window.document;
  652. var $ = global.$ || {};
  653. function go (path, params, method) {
  654. method = method || 'post';
  655. var form = document.createElement('form');
  656. form.method = method;
  657. form.action = path;
  658. _.C(params).each(function (value, key) {
  659. var input = document.createElement('input');
  660. input.type = 'hidden';
  661. input.name = key;
  662. input.value = value;
  663. form.appendChild(input);
  664. });
  665. document.body.appendChild(form);
  666. form.submit();
  667. }
  668. $.openLinkByPost = function (url, data) {
  669. go(url, data, 'post');
  670. };
  671. $.openLink = function (to) {
  672. if (!to) {
  673. _.warn('false URL');
  674. return;
  675. }
  676. var from = window.location.toString();
  677. _.info(_.T('{0} -> {1}')(from, to));
  678. window.top.location.replace(to);
  679. };
  680. $.openLinkWithReferer = function (to) {
  681. if (!to) {
  682. _.warn('false URL');
  683. return;
  684. }
  685. var from = window.location.toString();
  686. _.info(_.T('{0} -> {1}')(from, to));
  687. var a = document.createElement('a');
  688. a.href = to;
  689. a.style.display = 'none';
  690. document.body.appendChild(a);
  691. a.click();
  692. };
  693. return $;
  694. }));
  695.  
  696. (function (global, factory) {
  697. if (typeof module === 'object' && typeof module.exports === 'object') {
  698. module.exports = function (global) {
  699. var core = require('./core.js');
  700. var ajax = require('./ajax.js');
  701. var $ = ajax(global);
  702. return factory(global, core, $);
  703. };
  704. } else {
  705. factory(global, global._, global.$);
  706. }
  707. }(this, function (global, _, $) {
  708. 'use strict';
  709. var window = global.window;
  710. var unsafeWindow = global.unsafeWindow;
  711. var document = window.document;
  712. $.removeAllTimer = function () {
  713. var handle = window.setInterval(_.nop, 10);
  714. while (handle > 0) {
  715. window.clearInterval(handle--);
  716. }
  717. handle = window.setTimeout(_.nop, 10);
  718. while (handle > 0) {
  719. window.clearTimeout(handle--);
  720. }
  721. };
  722. $.captcha = function (imgSrc, cb) {
  723. if (!config.externalServerSupport) {
  724. return;
  725. }
  726. var a = document.createElement('canvas');
  727. var b = a.getContext('2d');
  728. var c = new Image();
  729. c.src = imgSrc;
  730. c.onload = function () {
  731. a.width = c.width;
  732. a.height = c.height;
  733. b.drawImage(c, 0, 0);
  734. var d = a.toDataURL();
  735. var e = d.substr(d.indexOf(',') + 1);
  736. $.post('http://www.wcpan.info/cgi-bin/captcha.cgi', {
  737. i: e,
  738. }, cb);
  739. };
  740. };
  741. function injectClone (vaccine) {
  742. return cloneInto(vaccine, unsafeWindow, {
  743. cloneFunctions: true,
  744. wrapReflectors: true,
  745. });
  746. }
  747. function injectFunction (vaccine) {
  748. return exportFunction(vaccine, unsafeWindow, {
  749. allowCrossOriginArguments: true,
  750. });
  751. }
  752. function injectReference () {
  753. return new unsafeWindow.Object();
  754. }
  755. function inject (vaccine) {
  756. var type = typeof vaccine;
  757. if (type === 'function') {
  758. return injectFunction(vaccine);
  759. } else if (type === 'undefined') {
  760. return injectReference();
  761. } else if (vaccine !== null && type === 'object') {
  762. return injectClone(vaccine);
  763. } else {
  764. return vaccine;
  765. }
  766. }
  767. var MAGIC_KEY = '__adsbypasser_metamagic__';
  768. $.window = (function () {
  769. var isFirefox = typeof InstallTrigger !== 'undefined';
  770. if (!isFirefox) {
  771. return unsafeWindow;
  772. }
  773. var decorator = {
  774. set: function (target, key, value) {
  775. if (key === MAGIC_KEY) {
  776. return;
  777. }
  778. target[key] = inject(value);
  779. },
  780. get: function (target, key) {
  781. if (key === MAGIC_KEY) {
  782. return target;
  783. }
  784. var value = target[key];
  785. var type = typeof value;
  786. if (value === null || (type !== 'function' && type !== 'object')) {
  787. return value;
  788. }
  789. return new Proxy(value, decorator);
  790. },
  791. apply: function (target, self, args) {
  792. if (typeof self !== 'undefined' && self[MAGIC_KEY] === unsafeWindow.Object && target.name === 'defineProperty') {
  793. args[0] = args[0][MAGIC_KEY];
  794. }
  795. var usargs = new unsafeWindow.Array();
  796. _.C(args).each(function (v, i) {
  797. usargs.push(inject(v));
  798. });
  799. return target.apply(self, usargs);
  800. },
  801. construct: function (target, args) {
  802. args = Array.prototype.slice.call(args);
  803. args.unshift(undefined);
  804. var bind = unsafeWindow.Function.prototype.bind;
  805. return new (bind.apply(target, inject(args)));
  806. },
  807. };
  808. return new Proxy(unsafeWindow, decorator);
  809. })();
  810. return $;
  811. }));
  812.  
  813. (function (global, factory) {
  814. if (typeof module === 'object' && typeof module.exports === 'object') {
  815. module.exports = function (global, GM) {
  816. var _ = require('lodash');
  817. var core = require('./core.js');
  818. var misc = require('./misc.js');
  819. var handler = require('./handler.js');
  820. var modules = [misc, handler].map(function (v) {
  821. return v.call(null, global, GM);
  822. });
  823. var $ = _.assign.apply(null, modules);
  824. return factory(global, GM, core, $);
  825. };
  826. } else {
  827. factory(global, {
  828. getValue: GM_getValue,
  829. setValue: GM_setValue,
  830. }, global._, global.$);
  831. }
  832. }(this, function (global, GM, _, $) {
  833. 'use strict';
  834. var window = global.window;
  835. $.config = {
  836. set version (value) {
  837. GM.setValue('version', value);
  838. },
  839. get version () {
  840. return GM.getValue('version', 0);
  841. },
  842. set alignCenter (value) {
  843. GM.setValue('align_center', value);
  844. },
  845. get alignCenter () {
  846. return GM.getValue('align_center');
  847. },
  848. set changeBackground (value) {
  849. GM.setValue('change_background', value);
  850. },
  851. get changeBackground () {
  852. return GM.getValue('change_background');
  853. },
  854. set externalServerSupport (value) {
  855. GM.setValue('external_server_support', value);
  856. },
  857. get externalServerSupport () {
  858. GM.getValue('external_server_support');
  859. },
  860. set redirectImage (value) {
  861. GM.setValue('redirect_image', value);
  862. },
  863. get redirectImage () {
  864. return GM.getValue('redirect_image');
  865. },
  866. set scaleImage (value) {
  867. GM.setValue('scale_image', value);
  868. },
  869. get scaleImage () {
  870. return GM.getValue('scale_image');
  871. },
  872. };
  873. fixup($.config);
  874. function fixup (c) {
  875. var patches = [
  876. function (c) {
  877. var ac = typeof c.alignCenter !== 'undefined';
  878. if (typeof c.changeBackground === 'undefined') {
  879. c.changeBackground = ac ? c.alignCenter : true;
  880. }
  881. if (typeof c.scaleImage === 'undefined') {
  882. c.scaleImage = ac ? c.alignCenter : true;
  883. }
  884. if (!ac) {
  885. c.alignCenter = true;
  886. }
  887. if (typeof c.redirectImage === 'undefined') {
  888. c.redirectImage = true;
  889. }
  890. },
  891. function (c) {
  892. if (typeof c.externalServerSupport === 'undefined') {
  893. c.externalServerSupport = false;
  894. }
  895. },
  896. ];
  897. while (c.version < patches.length) {
  898. patches[c.version](c);
  899. ++c.version;
  900. }
  901. }
  902. $.register({
  903. rule: {
  904. host: /^adsbypasser\.github\.io$/,
  905. path: /^\/configure\.html$/,
  906. },
  907. ready: function () {
  908. $.window.commit = function (data) {
  909. data.version = $.config.version;
  910. _.C(data).each(function (v, k) {
  911. $.config[k] = v;
  912. });
  913. setTimeout(function () {
  914. save(data);
  915. }, 0);
  916. };
  917. $.window.render({
  918. version: $.config.version,
  919. options: {
  920. alignCenter: {
  921. type: 'checkbox',
  922. value: $.config.alignCenter,
  923. label: 'Align Center',
  924. help: 'Align image to the center if possible. (default: enabled)',
  925. },
  926. changeBackground: {
  927. type: 'checkbox',
  928. value: $.config.changeBackground,
  929. label: 'Change Background',
  930. help: 'Use Firefox-like image background if possible. (default: enabled)',
  931. },
  932. redirectImage: {
  933. type: 'checkbox',
  934. value: $.config.redirectImage,
  935. label: 'Redirect Image',
  936. help: [
  937. 'Directly open image link if possible. (default: enabled)',
  938. 'If disabled, redirection will only works on link shortener sites.',
  939. ].join('<br/>\n'),
  940. },
  941. scaleImage: {
  942. type: 'checkbox',
  943. value: $.config.scaleImage,
  944. label: 'Scale Image',
  945. help: 'When image loaded, scale it to fit window if possible. (default: enabled)',
  946. },
  947. externalServerSupport: {
  948. type: 'checkbox',
  949. value: $.config.externalServerSupport,
  950. label: 'External Server Support',
  951. help: [
  952. 'Send URL information to external server to enhance features (e.g.: captcha resolving). (default: disabled)',
  953. 'Affected sites:',
  954. 'urlz.so (captcha)',
  955. ].join('<br/>\n'),
  956. },
  957. },
  958. });
  959. },
  960. });
  961. return $;
  962. }));
  963.  
  964. (function (global, factory) {
  965. if (typeof module === 'object' && typeof module.exports === 'object') {
  966. module.exports = function (global, GM) {
  967. var _ = require('lodash');
  968. var core = require('./core.js');
  969. var dom = require('./dom.js');
  970. var config = require('./config.js');
  971. var link = require('./link.js');
  972. var misc = require('./misc.js');
  973. var modules = [dom, config, link, misc].map(function (v) {
  974. return v.call(null, global, GM);
  975. });
  976. var $ = _.assign.apply(_, modules);
  977. return factory(global, GM, core, $);
  978. };
  979. } else {
  980. factory(global, {
  981. getResourceText: GM_getResourceText,
  982. addStyle: GM_addStyle,
  983. getResourceURL: GM_getResourceURL,
  984. }, global._, global.$);
  985. }
  986. }(this, function (global, GM, _, $) {
  987. 'use strict';
  988. var window = global.window;
  989. var document = window.document;
  990. $.openImage = function (imgSrc) {
  991. if ($.config.redirectImage) {
  992. $.openLink(imgSrc);
  993. }
  994. };
  995. function enableScrolling () {
  996. var o = document.compatMode === 'CSS1Compat' ? document.documentElement : document.body;
  997. o.style.overflow = '';
  998. };
  999. function toggleShrinking () {
  1000. this.classList.toggle('adsbypasser-shrinked');
  1001. }
  1002. function checkScaling () {
  1003. var nw = this.naturalWidth;
  1004. var nh = this.naturalHeight;
  1005. var cw = document.documentElement.clientWidth;
  1006. var ch = document.documentElement.clientHeight;
  1007. if ((nw > cw || nh > ch) && !this.classList.contains('adsbypasser-resizable')) {
  1008. this.classList.add('adsbypasser-resizable');
  1009. this.classList.add('adsbypasser-shrinked');
  1010. this.addEventListener('click', toggleShrinking);
  1011. } else {
  1012. this.removeEventListener('click', toggleShrinking);
  1013. this.classList.remove('adsbypasser-shrinked');
  1014. this.classList.remove('adsbypasser-resizable');
  1015. }
  1016. }
  1017. function scaleImage (i) {
  1018. var style = GM.getResourceText('scaleImage');
  1019. GM.addStyle(style);
  1020. if (i.naturalWidth && i.naturalHeight) {
  1021. checkScaling.call(i);
  1022. } else {
  1023. i.addEventListener('load', checkScaling);
  1024. }
  1025. var h;
  1026. window.addEventListener('resize', function () {
  1027. window.clearTimeout(h);
  1028. h = window.setTimeout(checkScaling.bind(i), 100);
  1029. });
  1030. }
  1031. function changeBackground () {
  1032. var bgImage = GM.getResourceURL('bgImage');
  1033. document.body.style.backgroundColor = '#222222';
  1034. document.body.style.backgroundImage = _.T('url(\'{0}\')')(bgImage);
  1035. }
  1036. function alignCenter () {
  1037. var style = GM.getResourceText('alignCenter');
  1038. GM.addStyle(style);
  1039. }
  1040. function injectStyle (d, i) {
  1041. $.removeNodes('style, link[rel=stylesheet]');
  1042. d.id = 'adsbypasser-wrapper';
  1043. i.id = 'adsbypasser-image';
  1044. }
  1045. $.replace = function (imgSrc) {
  1046. if (!$.config.redirectImage) {
  1047. return;
  1048. }
  1049. if (!imgSrc) {
  1050. _.warn('false url');
  1051. return;
  1052. }
  1053. _.info(_.T('replacing body with `{0}` ...')(imgSrc));
  1054. $.removeAllTimer();
  1055. enableScrolling();
  1056. document.body = document.createElement('body');
  1057. var d = document.createElement('div');
  1058. document.body.appendChild(d);
  1059. var i = document.createElement('img');
  1060. i.src = imgSrc;
  1061. d.appendChild(i);
  1062. if ($.config.alignCenter || $.config.scaleImage) {
  1063. injectStyle(d, i);
  1064. }
  1065. if ($.config.alignCenter) {
  1066. alignCenter();
  1067. }
  1068. if ($.config.changeBackground) {
  1069. changeBackground();
  1070. }
  1071. if ($.config.scaleImage) {
  1072. scaleImage(i);
  1073. }
  1074. };
  1075. return $;
  1076. }));
  1077.  
  1078. $.register({
  1079. rule: {
  1080. host: /^www\.4shared\.com$/,
  1081. path: /^\/(mp3|get|rar|zip|file|android|software|program)\//,
  1082. },
  1083. ready: function () {
  1084. 'use strict';
  1085. $.get('http://www.4server.info/find.php', {
  1086. data: window.location.href,
  1087. }).then(function (data) {
  1088. var d = $.toDOM(data);
  1089. var c = $('meta[http-equiv=refresh]', d);
  1090. var b = c.content.match(/URL=(.+)$/);
  1091. var a = b[1];
  1092. $.openLink(a);
  1093. });
  1094. },
  1095. });
  1096.  
  1097. (function() {
  1098. 'use strict';
  1099. $.register({
  1100. rule: {
  1101. host: /^(www\.)?dl-protect\.com$/,
  1102. path: /\/[A-Z0-9]+/,
  1103. },
  1104. ready: function () {
  1105. var f = $.$('form[name=ccerure]');
  1106. if (f) {
  1107. var observer = new MutationObserver(function (mutations) {
  1108. var iIn = $('input[id=in]');
  1109. for (var i = 0; i < mutations.length; i++) {
  1110. if (mutations[i].target.value && mutations[i].attributeName === 'value') {
  1111. observer.disconnect();
  1112. iIn.value = "Tracking too much hurts users' privacy";
  1113. if (!canFastRedirect()) {
  1114. return;
  1115. }
  1116. setTimeout(function() {
  1117. f.submit();
  1118. }, 600);
  1119. break;
  1120. }
  1121. }
  1122. });
  1123. var iIn = $('input[id=in]');
  1124. if (iIn.value) {
  1125. setTimeout(function() {
  1126. f.submit();
  1127. }, 600);
  1128. } else {
  1129. observer.observe(iIn, {
  1130. attributes: true,
  1131. });
  1132. }
  1133. return;
  1134. }
  1135. var l = $.$$('#slinks > a');
  1136. if (l.size() === 1) {
  1137. $.openLink(l.at(0).href);
  1138. }
  1139. },
  1140. });
  1141. function canFastRedirect () {
  1142. return !$.$('form[name=ccerure]').onsubmit && !$.$('form[name=ccerure] input[name=pwd]');
  1143. }
  1144. })();
  1145.  
  1146. $.register({
  1147. rule: {
  1148. host: /^(www\.)?embedupload\.com$/,
  1149. path: /^\/$/,
  1150. query: /^\?\w{2}=\w+$/
  1151. },
  1152. ready: function () {
  1153. 'use strict';
  1154. var downloadPage = $('.categories a[target=_blank]');
  1155. $.openLink(downloadPage);
  1156. },
  1157. });
  1158.  
  1159. $.register({
  1160. rule: {
  1161. host: /^(www\.)?(firedrive|putlocker)\.com$/,
  1162. path: /^\/file\/[0-9A-F]+$/,
  1163. },
  1164. ready: function () {
  1165. 'use strict';
  1166. var c = $('#confirm_form');
  1167. c.submit();
  1168. },
  1169. });
  1170.  
  1171. $.register({
  1172. rule: {
  1173. host: /^(www\.)?jheberg\.net$/,
  1174. path: /^\/captcha\//,
  1175. },
  1176. ready: function () {
  1177. 'use strict';
  1178. $('.dl-button').click();
  1179. },
  1180. });
  1181. $.register({
  1182. rule: {
  1183. host: /^(www\.)?jheberg\.net$/,
  1184. path: /^\/redirect\//,
  1185. },
  1186. ready: function () {
  1187. 'use strict';
  1188. $.removeAllTimer();
  1189. var matches = $.searchScripts(/'slug':\s*'([^']+)',\s*'hoster':\s*'([^']+)'/);
  1190. var slug = matches[1];
  1191. var hoster = matches[2];
  1192. $.post('/get/link/', {
  1193. 'slug': slug,
  1194. 'hoster': hoster
  1195. }).then(function(response) {
  1196. var respJSON = JSON.parse(response);
  1197. $.openLink(respJSON.url);
  1198. });
  1199. },
  1200. });
  1201.  
  1202. $.register({
  1203. rule: {
  1204. host: /^(www\.)?mirrorcreator\.com$/,
  1205. path: /^\/showlink\.php$/,
  1206. },
  1207. ready: function () {
  1208. 'use strict';
  1209. var a = $.$('#redirectlink a');
  1210. if (a) {
  1211. $.openLink(a.href);
  1212. return;
  1213. }
  1214. a = $('#redirectlink > div.redirecturl');
  1215. a = a.innerHTML;
  1216. if (!a.match(/^http/)) {
  1217. throw new _.AdsBypasserError('not a valid URL');
  1218. }
  1219. $.openLink(a);
  1220. },
  1221. });
  1222.  
  1223. $.register({
  1224. rule: {
  1225. host: /^www.mirrorupload.net$/,
  1226. },
  1227. ready: function () {
  1228. 'use strict';
  1229. var accessForm = $('form[name=form_upload]');
  1230. var accessInput = document.createElement('input');
  1231. accessInput.type = 'hidden';
  1232. accessInput.name = 'access';
  1233. accessInput.value = Math.random();
  1234. accessForm.appendChild(accessInput);
  1235. accessForm.submit();
  1236. },
  1237. });
  1238.  
  1239. $.register({
  1240. rule: {
  1241. host: /^1dl\.biz$/,
  1242. path: /^\/(\w)\.php$/,
  1243. query: /^\?(\d+)$/,
  1244. },
  1245. ready: function () {
  1246. 'use strict';
  1247. var a = $('div.tor a');
  1248. a.click();
  1249. },
  1250. });
  1251.  
  1252. $.register({
  1253. rule: {
  1254. host: /^1pics\.ru$/,
  1255. },
  1256. ready: function () {
  1257. 'use strict';
  1258. var img = $('img[alt$="1Pics.Ru"]');
  1259. $.openImage(img.src);
  1260. },
  1261. });
  1262.  
  1263. $.register({
  1264. rule: {
  1265. host: /^www\.(2i\.(sk|cz)|2imgs\.com)$/,
  1266. },
  1267. ready: function () {
  1268. 'use strict';
  1269. var img = $('#wrap3 img');
  1270. $.openImage(img.src);
  1271. },
  1272. });
  1273.  
  1274. $.register({
  1275. rule: [
  1276. 'http://*.abload.de/image.php?img=*',
  1277. 'http://fastpic.ru/view/*.html',
  1278. 'http://www.imageup.ru/*/*/*.html',
  1279. 'http://itmages.ru/image/view/*/*', // different layout same handler
  1280. ],
  1281. ready: function () {
  1282. 'use strict';
  1283. var i = $('#image');
  1284. $.openImage(i.src);
  1285. },
  1286. });
  1287.  
  1288. $.register({
  1289. rule: {
  1290. host: /alabout\.com$/,
  1291. },
  1292. ready: function () {
  1293. 'use strict';
  1294. $.$$('a').each(function (a) {
  1295. if (/http:\/\/(www\.)?alabout\.com\/j\.phtml\?url=/.test(a.href)) {
  1296. a.href = a.textContent;
  1297. }
  1298. });
  1299. },
  1300. });
  1301.  
  1302. $.register({
  1303. rule: {
  1304. host: /^freeimgup\.com$/,
  1305. path: /^\/xxx/,
  1306. query: /^\?v=([^&]+)/,
  1307. },
  1308. start: function (m) {
  1309. 'use strict';
  1310. $.openImage('/xxx/images/' + m.query[1]);
  1311. },
  1312. });
  1313. $.register({
  1314. rule: {
  1315. host: /^(b4he|freeimgup|fullimg)\.com|fastpics\.net|ifap\.co$/,
  1316. query: /^\?v=([^&]+)/,
  1317. },
  1318. start: function (m) {
  1319. 'use strict';
  1320. $.openImage('/images/' + m.query[1]);
  1321. },
  1322. });
  1323.  
  1324. $.register({
  1325. rule: {
  1326. host: /^bayimg\.com$/,
  1327. },
  1328. ready: function () {
  1329. 'use strict';
  1330. var i = $('#mainImage');
  1331. $.openImage(i.src);
  1332. },
  1333. });
  1334.  
  1335. $.register({
  1336. rule: {
  1337. host: /^beeimg\.com$/,
  1338. },
  1339. ready: function () {
  1340. 'use strict';
  1341. var img = $('img.img-responsive');
  1342. $.openImage(img.src);
  1343. },
  1344. });
  1345.  
  1346. $.register({
  1347. rule: 'http://www.bilder-space.de/*.htm',
  1348. ready: function () {
  1349. 'use strict';
  1350. $.removeNodes('iframe');
  1351. var img = $('img.picture');
  1352. $.openImage(img.src);
  1353. },
  1354. });
  1355.  
  1356. $.register({
  1357. rule: 'http://www.bilder-upload.eu/show.php?file=*',
  1358. ready: function () {
  1359. 'use strict';
  1360. var i = $('input[type=image]');
  1361. $.openImage(i.src);
  1362. },
  1363. });
  1364.  
  1365. $.register({
  1366. rule: 'http://blackcatpix.com/v.php?*',
  1367. ready: function () {
  1368. 'use strict';
  1369. var img = $('td center img');
  1370. $.openImage(img.src);
  1371. },
  1372. });
  1373.  
  1374. $.register({
  1375. rule: 'http://www.casimages.com/img.php?*',
  1376. ready: function () {
  1377. 'use strict';
  1378. var img = $('td a img');
  1379. $.openImage(img.src);
  1380. },
  1381. });
  1382.  
  1383. $.register({
  1384. rule: {
  1385. host: /^www\.x45x\.info|(imadul|mypixxx\.lonestarnaughtygirls)\.com|ghanaimages\.co|imgurban\.info|d69\.in$/,
  1386. query: /\?p[mt]=(.+)/,
  1387. },
  1388. start: function (m) {
  1389. 'use strict';
  1390. $.openImage('/?di=' + m.query[1]);
  1391. },
  1392. });
  1393.  
  1394. $.register({
  1395. rule: 'http://javelite.tk/viewer.php?id=*',
  1396. ready: function () {
  1397. 'use strict';
  1398. var i = $('table img');
  1399. $.openImage(i.src);
  1400. },
  1401. });
  1402.  
  1403. $.register({
  1404. rule: {
  1405. host: /^imgchili\.(com|net)|www\.pixhost\.org$/,
  1406. path: /^\/show\//,
  1407. },
  1408. ready: function () {
  1409. 'use strict';
  1410. $.removeNodes('iframe, #ad');
  1411. try {
  1412. $('#all').style.display = '';
  1413. } catch (e) {
  1414. }
  1415. var o = $('#show_image');
  1416. $.openImage(o.src);
  1417. },
  1418. });
  1419.  
  1420. $.register({
  1421. rule: 'http://cubeupload.com/im/*',
  1422. ready: function () {
  1423. 'use strict';
  1424. var img = $('img.galleryBigImg');
  1425. $.openImage(img.src);
  1426. },
  1427. });
  1428.  
  1429. $.register({
  1430. rule: {
  1431. host: /^(depic\.me|(www\.)?picamatic\.com)$/,
  1432. },
  1433. ready: function () {
  1434. 'use strict';
  1435. var i = $('#pic');
  1436. $.openImage(i.src);
  1437. },
  1438. });
  1439.  
  1440. $.register({
  1441. rule: {
  1442. host: /^img(dino|tiger|zap)\.com$/,
  1443. path: /^\/viewer\.php$/,
  1444. query: /^\?file=/,
  1445. },
  1446. ready: function () {
  1447. 'use strict';
  1448. var o = $('#cursor_lupa');
  1449. $.openImage(o.src);
  1450. },
  1451. });
  1452.  
  1453. $.register({
  1454. rule: 'http://*.directupload.net/file/*.htm',
  1455. ready: function () {
  1456. 'use strict';
  1457. var i = $('#ImgFrame');
  1458. $.openImage(i.src);
  1459. },
  1460. });
  1461.  
  1462. $.register({
  1463. rule: {
  1464. host: /^emptypix\.com|overdream\.cz$/,
  1465. path: /^\/image\//,
  1466. },
  1467. ready: function () {
  1468. 'use strict';
  1469. var img = $('#full_image');
  1470. $.openImage(img.src);
  1471. },
  1472. });
  1473.  
  1474. $.register({
  1475. rule: 'http://www.fotolink.su/v.php?id=*',
  1476. ready: function () {
  1477. 'use strict';
  1478. var i = $('#content img');
  1479. $.openImage(i.src);
  1480. },
  1481. });
  1482.  
  1483. (function () {
  1484. 'use strict';
  1485. function run () {
  1486. var i = $('#img_obj');
  1487. $.openImage(i.src);
  1488. }
  1489. $.register({
  1490. rule: 'http://fotoo.pl/show.php?img=*.html',
  1491. ready: run,
  1492. });
  1493. $.register({
  1494. rule: {
  1495. host: /^www\.(fotoszok\.pl|imagestime)\.com$/,
  1496. path: /^\/show\.php\/.*\.html$/,
  1497. },
  1498. ready: run,
  1499. });
  1500. })();
  1501.  
  1502. $.register({
  1503. rule: 'http://www.fotosik.pl/pokaz_obrazek/pelny/*.html',
  1504. ready: function () {
  1505. 'use strict';
  1506. var i = $('a.noborder img');
  1507. $.openImage(i.src);
  1508. },
  1509. });
  1510.  
  1511. $.register({
  1512. rule: {
  1513. host: /^freakimage\.com|www\.hostpic\.org$/,
  1514. path: /^\/view\.php$/,
  1515. query: /^\?filename=([^&]+)/,
  1516. },
  1517. start: function (m) {
  1518. 'use strict';
  1519. $.openImage('/images/' + m.query[1]);
  1520. },
  1521. });
  1522.  
  1523. $.register({
  1524. rule: [
  1525. 'http://funkyimg.com/viewer.php?img=*',
  1526. 'http://funkyimg.com/view/*',
  1527. ],
  1528. ready: function () {
  1529. 'use strict';
  1530. var i = $('#viewer img');
  1531. $.openImage(i.src);
  1532. },
  1533. });
  1534.  
  1535. $.register({
  1536. rule: {
  1537. host: /^(www\.)?gallerynova\.se$/,
  1538. path: /^\/site\/v\//,
  1539. },
  1540. ready: function () {
  1541. 'use strict';
  1542. var i = $('#myUniqueImg').parentNode;
  1543. $.openImage(i.href);
  1544. },
  1545. });
  1546. $.register({
  1547. rule: {
  1548. host: /^(www\.)?gallerynova\.se$/,
  1549. path: /^\/site\/viewImage\/(\w+)/,
  1550. },
  1551. ready: function (m) {
  1552. 'use strict';
  1553. var confirm = $.searchScripts(/\$\("#confirmImage"\).val\("([^"]+)"\)/)[1];
  1554. $.post('/site/viewConfirmCode/' + m.path[1], {
  1555. confirm: confirm
  1556. }).then(function (rawJson) {
  1557. var json = JSON.parse(rawJson);
  1558. var decodedHTML = document.createTextNode(json.content).data;
  1559. var imgURL = decodedHTML.match(/<a href="([^"]+)" target="_blank">/)[1];
  1560. $.openImage(imgURL);
  1561. });
  1562. },
  1563. });
  1564.  
  1565. (function () {
  1566. 'use strict';
  1567. var hostRule = /^goimagehost\.com$/;
  1568. $.register({
  1569. rule: {
  1570. host: hostRule,
  1571. path: /^\/xxx\/images\//,
  1572. },
  1573. });
  1574. $.register({
  1575. rule: {
  1576. host: hostRule,
  1577. path: /^\/xxx\/(.+)/,
  1578. },
  1579. start: function (m) {
  1580. $.openImage('/xxx/images/' + m.path[1]);
  1581. },
  1582. });
  1583. $.register({
  1584. rule: {
  1585. host: hostRule,
  1586. query: /^\?v=(.+)/,
  1587. },
  1588. start: function (m) {
  1589. $.openImage('/xxx/images/' + m.query[1]);
  1590. },
  1591. });
  1592. })();
  1593.  
  1594. $.register({
  1595. rule: {
  1596. host: /www\.(h-animes|adultmove)\.info/,
  1597. path: /^\/.+\/.+\/.+\.html$/,
  1598. },
  1599. ready: function () {
  1600. 'use strict';
  1601. var a = $('.dlbutton2 > a');
  1602. $.openImage(a.href);
  1603. },
  1604. });
  1605.  
  1606. $.register({
  1607. rule: 'http://hentaimg.com/mg/lndex-1.php?img=*',
  1608. ready: function () {
  1609. 'use strict';
  1610. $.openLink('index-1.php' + window.location.search);
  1611. },
  1612. });
  1613. $.register({
  1614. rule: 'http://hentaimg.com/mg/index-1.php?img=*',
  1615. ready: function () {
  1616. 'use strict';
  1617. var i = $('#content img');
  1618. $.openImage(i.src);
  1619. },
  1620. });
  1621.  
  1622. $.register({
  1623. rule: 'http://www.hostingpics.net/viewer.php?id=*',
  1624. ready: function () {
  1625. 'use strict';
  1626. var i = $('#img_viewer');
  1627. $.openImage(i.src);
  1628. },
  1629. });
  1630.  
  1631. $.register({
  1632. rule: {
  1633. host: /^ichan\.org$/,
  1634. path: /^\/image\.php$/,
  1635. query: /path=(.+)$/,
  1636. },
  1637. start: function (m) {
  1638. 'use strict';
  1639. $.openImage('/' + m.query[1]);
  1640. },
  1641. });
  1642. $.register({
  1643. rule: {
  1644. host: /ichan\.org$/,
  1645. },
  1646. ready: function () {
  1647. 'use strict';
  1648. $.$$('a').each(function (a) {
  1649. if (a.href.indexOf('/url/http://') > -1) {
  1650. a.href = a.href.replace(/http:\/\/.+\/url\/(?=http:\/\/)/, '');
  1651. }
  1652. });
  1653. },
  1654. });
  1655.  
  1656. $.register({
  1657. rule: 'http://ifotos.pl/zobacz/*',
  1658. ready: function () {
  1659. 'use strict';
  1660. var m = $('meta[property="og:image"]');
  1661. $.openImage(m.content);
  1662. },
  1663. });
  1664.  
  1665. $.register({
  1666. rule: {
  1667. host: /^ima\.so$/,
  1668. },
  1669. ready: function () {
  1670. 'use strict';
  1671. var a = $('#image_block a');
  1672. $.openImage(a.href);
  1673. },
  1674. });
  1675.  
  1676. $.register({
  1677. rule: [
  1678. 'http://image18.org/show/*',
  1679. 'http://screenlist.ru/details.php?image_id=*',
  1680. 'http://www.imagenetz.de/*/*.html',
  1681. ],
  1682. ready: function () {
  1683. 'use strict';
  1684. var img = $('#picture');
  1685. $.openImage(img.src);
  1686. },
  1687. });
  1688.  
  1689. $.register({
  1690. rule: {
  1691. host: /^image2you\.ru$/,
  1692. path: /^\/\d+\/\d+/,
  1693. },
  1694. ready: function () {
  1695. 'use strict';
  1696. var i = $.$('div.t_tips2 div > img');
  1697. if (!i) {
  1698. $.openLinkByPost('', {
  1699. _confirm: '',
  1700. });
  1701. return;
  1702. }
  1703. $.openImage(i.src);
  1704. },
  1705. });
  1706.  
  1707. $.register({
  1708. rule: 'http://imagearn.com/image.php?id=*',
  1709. ready: function () {
  1710. 'use strict';
  1711. var i = $('#img');
  1712. $.openImage(i.src);
  1713. },
  1714. });
  1715.  
  1716. $.register({
  1717. rule: 'http://www.imagebam.com/image/*',
  1718. ready: function () {
  1719. 'use strict';
  1720. var o = $('#imageContainer img[id]');
  1721. $.replace(o.src);
  1722. },
  1723. });
  1724.  
  1725. $.register({
  1726. rule: {
  1727. host: /^imageban\.(ru|net)$/,
  1728. path: /^\/show\/\d{4}\/\d{2}\/\d{2}\/.+/,
  1729. },
  1730. ready: function () {
  1731. 'use strict';
  1732. var i = $('#img_obj');
  1733. $.openImage(i.src);
  1734. },
  1735. });
  1736.  
  1737. $.register({
  1738. rule: {
  1739. host: /^imageheli\.com|imgtube\.net|pixliv\.com$/,
  1740. path: /^\/img-([a-zA-Z0-9\-]+)\..+$/,
  1741. },
  1742. ready: function () {
  1743. 'use strict';
  1744. var a = $.$('a[rel="lightbox"]');
  1745. if (!a) {
  1746. $.openLinkByPost('', {
  1747. browser_fingerprint: '',
  1748. ads: '0',
  1749. });
  1750. return;
  1751. }
  1752. $.openImage(a.href);
  1753. },
  1754. });
  1755.  
  1756. $.register({
  1757. rule: 'http://www.imagehousing.com/image/*',
  1758. ready: function () {
  1759. 'use strict';
  1760. var i = $('td.text_item img');
  1761. $.openImage(i.src);
  1762. },
  1763. });
  1764.  
  1765. $.register({
  1766. rule: 'http://imageno.com/*.html',
  1767. ready: function () {
  1768. 'use strict';
  1769. var i = $('#image_div img');
  1770. $.openImage(i.src);
  1771. },
  1772. });
  1773.  
  1774. $.register({
  1775. rule: 'http://imagepix.org/image/*.html',
  1776. ready: function () {
  1777. 'use strict';
  1778. var i = $('img[border="0"]');
  1779. $.openImage(i.src);
  1780. },
  1781. });
  1782.  
  1783. (function () {
  1784. 'use strict';
  1785. function run () {
  1786. var o = $('#download_box img[id]');
  1787. $.openImage(o.src);
  1788. }
  1789. $.register({
  1790. rule: {
  1791. host: /^www\.imageporter\.com$/,
  1792. path: /^\/\w{12}\/.*\.html$/,
  1793. },
  1794. ready: run,
  1795. });
  1796. $.register({
  1797. rule: {
  1798. host: /^(www\.)?(image(carry|dunk|porter|switch)|pic(leet|turedip|tureturn)|imgspice)\.com|(piclambo|yankoimages)\.net$/,
  1799. },
  1800. ready: run,
  1801. });
  1802. })();
  1803.  
  1804. $.register({
  1805. rule: {
  1806. host: /^imagescream\.com$/,
  1807. path: /^\/img\/soft\//,
  1808. },
  1809. ready: function () {
  1810. 'use strict';
  1811. var i = $('#shortURL-content img');
  1812. $.openImage(i.src);
  1813. },
  1814. });
  1815. $.register({
  1816. rule: {
  1817. host: /^(imagescream|anonpic|picturevip)\.com$/,
  1818. query: /^\?v=/,
  1819. },
  1820. ready: function () {
  1821. 'use strict';
  1822. var i = $('#imagen img');
  1823. $.openImage(i.src);
  1824. },
  1825. });
  1826.  
  1827. (function () {
  1828. 'use strict';
  1829. var host = /^imageshack\.us$/;
  1830. $.register({
  1831. rule: {
  1832. host: host,
  1833. path: /^\/photo\/.+\/(.+)\/([^\/]+)/,
  1834. },
  1835. start: function (m) {
  1836. $.openImage(_.T('/f/{0}/{1}/')(m.path[1], m.path[2]));
  1837. },
  1838. });
  1839. $.register({
  1840. rule: {
  1841. host: host,
  1842. path: /^\/f\/.+\/[^\/]+/,
  1843. },
  1844. ready: function () {
  1845. var i = $('#fullimg');
  1846. $.openImage(i.src);
  1847. },
  1848. });
  1849. })();
  1850.  
  1851. $.register({
  1852. rule: 'http://imageshost.ru/photo/*/id*.html',
  1853. ready: function () {
  1854. 'use strict';
  1855. var a = $('#bphoto a');
  1856. $.openImage(a.href);
  1857. },
  1858. });
  1859.  
  1860. (function () {
  1861. 'use strict';
  1862. function run () {
  1863. $.window.jQuery.prototype.append = undefined;
  1864. var i = $('img.pic');
  1865. $.replace(i.src);
  1866. }
  1867. $.register({
  1868. rule: {
  1869. host: /^imagenpic\.com$/,
  1870. path: /^\/.*\/.+\.html$/,
  1871. },
  1872. ready: run,
  1873. });
  1874. $.register({
  1875. rule: {
  1876. host: /^image(twist|cherry)\.com$/,
  1877. },
  1878. ready: run,
  1879. });
  1880. })();
  1881.  
  1882. $.register({
  1883. rule: 'http://imageupper.com/i/?*',
  1884. ready: function () {
  1885. 'use strict';
  1886. var i = $('#img');
  1887. $.openImage(i.src);
  1888. },
  1889. });
  1890.  
  1891. $.register({
  1892. rule: [
  1893. 'http://*.imagevenue.com/img.php?*',
  1894. 'http://hotchyx.com/d/adult-image-hosting-view-08.php?id=*',
  1895. 'http://www.hostingfailov.com/photo/*',
  1896. ],
  1897. ready: function () {
  1898. 'use strict';
  1899. var i = $('#thepic');
  1900. $.openImage(i.src);
  1901. },
  1902. });
  1903.  
  1904. $.register({
  1905. rule: {
  1906. host: /^imagezilla\.net$/,
  1907. path: /^\/show\/(.+)$/,
  1908. },
  1909. start: function (m) {
  1910. 'use strict';
  1911. $.openImage('/images2/' + m.path[1]);
  1912. },
  1913. });
  1914.  
  1915. $.register({
  1916. rule: {
  1917. host: /^imagik\.fr$/,
  1918. path: /^\/view(-rl)?\/(.+)/,
  1919. },
  1920. start: function (m) {
  1921. 'use strict';
  1922. $.openImage('/uploads/' + m.path[2]);
  1923. },
  1924. });
  1925.  
  1926. $.register({
  1927. rule: 'http://img.3ezy.net/*.htm',
  1928. ready: function () {
  1929. 'use strict';
  1930. var l = $('link[rel="image_src"]');
  1931. $.openImage(l.href);
  1932. },
  1933. });
  1934.  
  1935. $.register({
  1936. rule: {
  1937. host: /^img\.acianetmedia\.com$/,
  1938. path: /^\/(image\/)?[^.]+$/,
  1939. },
  1940. ready: function () {
  1941. 'use strict';
  1942. var img = $('#full_image, #shortURL-content img');
  1943. $.openImage(img.src);
  1944. },
  1945. });
  1946.  
  1947. $.register({
  1948. rule: 'http://img1.imagilive.com/*/*',
  1949. ready: function () {
  1950. 'use strict';
  1951. var a = $.$('#page a.button');
  1952. if (a) {
  1953. $.redirect(a.href);
  1954. return;
  1955. }
  1956. var i = $('#page > img:not([id])');
  1957. $.openImage(i.src);
  1958. },
  1959. });
  1960.  
  1961. $.register({
  1962. rule: {
  1963. host: /^img3x\.net$/,
  1964. },
  1965. ready: function () {
  1966. 'use strict';
  1967. var f = $.$('form');
  1968. if (f) {
  1969. f.submit();
  1970. return;
  1971. }
  1972. f = $('#show_image');
  1973. $.openImage(f.src);
  1974. },
  1975. });
  1976.  
  1977. $.register({
  1978. rule: {
  1979. host: /^www\.img(babes|flare)\.com$/,
  1980. },
  1981. ready: function () {
  1982. 'use strict';
  1983. var i = $('#this_image');
  1984. $.openImage(i.src);
  1985. },
  1986. });
  1987.  
  1988. $.register({
  1989. rule: {
  1990. host: /^imgbar\.net$/,
  1991. path: /^\/img_show\.php$/,
  1992. query: /^\?view_id=/,
  1993. },
  1994. ready: function () {
  1995. 'use strict';
  1996. var i = $('center img');
  1997. $.openImage(i.src);
  1998. },
  1999. });
  2000. $.register({
  2001. rule: {
  2002. host: /^imgbar\.net$/,
  2003. },
  2004. ready: function () {
  2005. 'use strict';
  2006. var i = $('div.panel.top form input[name=sid]');
  2007. $.openLink('/img_show.php?view_id=' + i.value);
  2008. },
  2009. });
  2010.  
  2011. $.register({
  2012. rule: {
  2013. host: /^imgbin\.me$/,
  2014. path: /^\/view\/([A-Z]+)$/,
  2015. },
  2016. start: function (m) {
  2017. 'use strict';
  2018. var tpl = _.T('/image/{0}.jpg');
  2019. $.openImage(tpl(m.path[1]));
  2020. },
  2021. });
  2022.  
  2023. $.register({
  2024. rule: {
  2025. host: /^imgbox\.com$/,
  2026. path: /^\/[\d\w]+$/,
  2027. },
  2028. ready: function () {
  2029. 'use strict';
  2030. $.removeNodes('iframe');
  2031. var i = $('#img');
  2032. $.openImage(i.src);
  2033. },
  2034. });
  2035.  
  2036. (function () {
  2037. 'use strict';
  2038. var host = /^(img(fantasy|leech)|imagedomino)\.com$/;
  2039. $.register({
  2040. rule: {
  2041. host: host,
  2042. query: /^\?p=/,
  2043. },
  2044. ready: function () {
  2045. var i = $('#container-home img');
  2046. $.openImage(i.src);
  2047. },
  2048. });
  2049. $.register({
  2050. rule: {
  2051. host: host,
  2052. query: /^\?v=/,
  2053. },
  2054. ready: function () {
  2055. if ($.window.confirmAge) {
  2056. $.window.confirmAge(1);
  2057. return;
  2058. }
  2059. var i = $('#container-home img');
  2060. $.openImage(i.src);
  2061. },
  2062. });
  2063. })();
  2064.  
  2065. $.register({
  2066. rule: {
  2067. host: /^imglocker\.com$/,
  2068. path: [
  2069. /^(\/\w+)\/(.+)\.html$/,
  2070. /^(\/\w+)\/(.+)$/,
  2071. ],
  2072. },
  2073. start: function (m) {
  2074. 'use strict';
  2075. var url = _.T('//img.imglocker.com{0}_{1}');
  2076. $.openImage(url(m.path[1], m.path[2]));
  2077. },
  2078. });
  2079.  
  2080. (function () {
  2081. 'use strict';
  2082. var pathRule = /^\/([0-9a-z]+)(\.|\/|$)/;
  2083. function helper (id, next) {
  2084. var f = $.$('form > input[name="next"]');
  2085. var i = $.$('img.pic');
  2086. if (!(next || f) && !i) {
  2087. _.info('do nothing');
  2088. } else if (next || f) {
  2089. $.openLinkByPost('', {
  2090. op: 'view',
  2091. id: id,
  2092. pre: 1,
  2093. next: next || f.value,
  2094. });
  2095. } else {
  2096. $.openImage(i.src);
  2097. }
  2098. }
  2099. $.register({
  2100. rule: {
  2101. host: [
  2102. /^((img(paying|mega))|imzdrop)\.com$/,
  2103. /^(www\.)?imgsee\.me$/,
  2104. /^imgclick\.net$/,
  2105. /^(uploadrr|imageeer)\.com$/,
  2106. ],
  2107. path: pathRule,
  2108. },
  2109. ready: function (m) {
  2110. helper(m.path[1]);
  2111. },
  2112. });
  2113. $.register({
  2114. rule: {
  2115. host: /^imgrock\.net$/,
  2116. path: pathRule,
  2117. },
  2118. ready: function (m) {
  2119. var d = $.$('#imageviewir');
  2120. helper(m.path[1], d ? 'Continue to Image...' : null);
  2121. },
  2122. });
  2123. })();
  2124.  
  2125. (function () {
  2126. 'use strict';
  2127. function handler () {
  2128. $.removeNodes('iframe');
  2129. var node = $.$('#continuetoimage > form input');
  2130. if (node) {
  2131. node.click();
  2132. node.click();
  2133. return;
  2134. }
  2135. var o = $('img[alt="image"]');
  2136. $.openImage(o.src);
  2137. }
  2138. $.register({
  2139. rule: {
  2140. host: [
  2141. /^(img(rill|next|savvy|\.spicyzilla|twyti|xyz|devil|seeds)|image(corn|picsa)|www\.(imagefolks|imgblow)|hosturimage|img-zone|08lkk)\.com$/,
  2142. /^img(candy|master|-view|run)\.net$/,
  2143. /^imgcloud\.co|pixup\.us$/,
  2144. /^(www\.)?\.imgult\.com$/,
  2145. /^bulkimg\.info$/,
  2146. /^(image\.adlock|imgspot|teenshot)\.org$/,
  2147. /^img\.yt$/,
  2148. /^vava\.in$/,
  2149. /^55888\.eu$/,
  2150. /^pixxx\.me$/,
  2151. ],
  2152. path: /^\/img-.*\.html$/,
  2153. },
  2154. ready: handler,
  2155. });
  2156. $.register({
  2157. rule: {
  2158. host: /^imgking\.co$/,
  2159. path: /^\/img-.*\.htmls$/,
  2160. },
  2161. ready: handler,
  2162. });
  2163. $.register({
  2164. rule: {
  2165. host: /^08lkk\.com$/,
  2166. path: /^\/\d+\/img-.*\.html$/,
  2167. },
  2168. start: function () {
  2169. $.window.setTimeout = _.nop;
  2170. $.get(window.location.toString()).then(function (data) {
  2171. var a = $.toDOM(data);
  2172. var bbcode = $.$('#imagecodes input', a);
  2173. bbcode = bbcode.value.match(/.+\[IMG\]([^\[]+)\[\/IMG\].+/);
  2174. bbcode = bbcode[1];
  2175. bbcode = bbcode.replace('small', 'big');
  2176. $.openImage(bbcode);
  2177. });
  2178. },
  2179. });
  2180. })();
  2181.  
  2182. $.register({
  2183. rule: {
  2184. host: /^(imgsure|picexposed)\.com$/,
  2185. },
  2186. ready: function () {
  2187. 'use strict';
  2188. var i = $('img.pic');
  2189. $.openImage(i.src);
  2190. },
  2191. });
  2192.  
  2193. $.register({
  2194. rule: 'http://imgtheif.com/image/*.html',
  2195. ready: function () {
  2196. 'use strict';
  2197. var a = $('div.content-container a');
  2198. $.openImage(a.href);
  2199. },
  2200. });
  2201.  
  2202. $.register({
  2203. rule: {
  2204. host: /^imgvault\.pw$/,
  2205. path: /^\/view-image\//,
  2206. },
  2207. ready: function () {
  2208. 'use strict';
  2209. var a = $('article div.span7 a[target="_blank"]');
  2210. $.openImage(a.href);
  2211. },
  2212. });
  2213.  
  2214. $.register({
  2215. rule: 'http://ipic.su/?page=img&pic=*',
  2216. ready: function () {
  2217. 'use strict';
  2218. var i = $('#fz');
  2219. $.openImage(i.src);
  2220. },
  2221. });
  2222.  
  2223. $.register({
  2224. rule: {
  2225. host: /keptarolo\.hu$/,
  2226. path: /^(\/[^\/]+\/[^\/]+\.jpg)$/,
  2227. },
  2228. start: function (m) {
  2229. 'use strict';
  2230. $.openImage('http://www.keptarolo.hu/kep' + m.path[1]);
  2231. },
  2232. });
  2233.  
  2234. $.register({
  2235. rule: {
  2236. host: /^lostpic\.net$/,
  2237. query: /^\?photo=\d+$/,
  2238. },
  2239. ready: function () {
  2240. 'use strict';
  2241. var i = $('img.notinline.circle');
  2242. $.openImage(i.src);
  2243. },
  2244. });
  2245.  
  2246. (function () {
  2247. 'use strict';
  2248. function helper (m) {
  2249. $.openImage('/images/' + m.query[1]);
  2250. }
  2251. $.register({
  2252. rule: {
  2253. host: [
  2254. /^(hentai-hosting|miragepics|funextra\.hostzi|img(rex|banana))\.com$/,
  2255. /^bilder\.nixhelp\.de$/,
  2256. /^imagecurl\.(com|org)$/,
  2257. /^imagevau\.eu$/,
  2258. /^img\.deli\.sh$/,
  2259. /^imgking\.us$/,
  2260. /^image(pong|back)\.info$/,
  2261. /^imgdream\.net$/,
  2262. /^photoup\.biz$/,
  2263. ],
  2264. path: /^\/viewer\.php$/,
  2265. query: /file=([^&]+)/,
  2266. },
  2267. start: helper,
  2268. });
  2269. $.register({
  2270. rule: {
  2271. host: /^(dwimg|imgsin|www\.pictureshoster)\.com$/,
  2272. path: /^\/viewer\.php$/,
  2273. query: /file=([^&]+)/,
  2274. },
  2275. start: function (m) {
  2276. $.openImage('/files/' + m.query[1]);
  2277. },
  2278. });
  2279. $.register({
  2280. rule: {
  2281. host: /imageview\.me|244pix\.com|imgnip\.com|postimg\.net$/,
  2282. path: /^\/viewerr.*\.php$/,
  2283. query: /file=([^&]+)/,
  2284. },
  2285. start: helper,
  2286. });
  2287. $.register({
  2288. rule: {
  2289. host: /^catpic\.biz$/,
  2290. path: /^(\/\w)?\/viewer\.php$/,
  2291. query: /file=([^&]+)/,
  2292. },
  2293. start: function (m) {
  2294. var url = _.T('{0}/images/{1}');
  2295. $.openImage(url(m.path[1] || '', m.query[1]));
  2296. },
  2297. });
  2298. $.register({
  2299. rule: [
  2300. 'http://www.overpic.net/viewer.php?file=*',
  2301. ],
  2302. ready: function () {
  2303. var i = $('#main_img');
  2304. $.openImage(i.src);
  2305. },
  2306. });
  2307. $.register({
  2308. rule: {
  2309. host: /empireload\.com$/,
  2310. path: /^\/sexy\/Images\/links\.php$/,
  2311. query: /file=([^&]+)/,
  2312. },
  2313. start: function (m) {
  2314. $.openImage('files/' + m.query[1]);
  2315. },
  2316. });
  2317. })();
  2318.  
  2319. $.register({
  2320. rule: {
  2321. host: /^www\.mrjh\.org$/,
  2322. path: /^\/gallery\.php$/,
  2323. query: /^\?entry=(.+)$/,
  2324. },
  2325. ready: function (m) {
  2326. 'use strict';
  2327. var url = m.query[1];
  2328. $.openImage('/' + url);
  2329. },
  2330. });
  2331.  
  2332. $.register({
  2333. rule: {
  2334. host: /^www\.noelshack\.com$/
  2335. },
  2336. ready: function () {
  2337. var i = $('#elt_to_aff');
  2338. $.openImage(i.src);
  2339. },
  2340. });
  2341.  
  2342. $.register({
  2343. rule: 'http://pic-money.ru/*.html',
  2344. ready: function () {
  2345. 'use strict';
  2346. var f = document.forms[0];
  2347. var sig = $('input[name="sig"]', f).value;
  2348. var pic_id = $('input[name="pic_id"]', f).value;
  2349. var referer = $('input[name="referer"]', f).value;
  2350. var url = _.T('/pic.jpeg?pic_id={pic_id}&sig={sig}&referer={referer}');
  2351. $.openImage(url({
  2352. sig: sig,
  2353. pic_id: pic_id,
  2354. referer: referer,
  2355. }));
  2356. },
  2357. });
  2358.  
  2359. $.register({
  2360. rule: 'http://www.pic-upload.de/view-*.html',
  2361. ready: function () {
  2362. 'use strict';
  2363. $.removeNodes('.advert');
  2364. var i = $('img.preview_picture_2b, img.original_picture_2b');
  2365. $.openImage(i.src);
  2366. },
  2367. });
  2368.  
  2369. $.register({
  2370. rule: {
  2371. host: /^pic(2profit|p2)\.com$/,
  2372. },
  2373. ready: function () {
  2374. 'use strict';
  2375. var i = $('form > #d1 ~ input[name=bigimg]');
  2376. $.openImage(i.value);
  2377. },
  2378. });
  2379.  
  2380. $.register({
  2381. rule: {
  2382. host: /^pic(4|5)you.ru$/
  2383. },
  2384. ready: function () {
  2385. if ($.$('#d1 > img') != null) {
  2386. var URLparams = location.href.split("/", 5);
  2387. var next = URLparams[0] + '/' + URLparams[1] + '/' + URLparams[2] + '/' + URLparams[3] + '/' + URLparams[4] + '/1/';
  2388. $.setCookie('p4yclick','1');
  2389. $.openLink(next);
  2390. } else {
  2391. var i = $('#d1 img').src;
  2392. $.openImage(i);
  2393. }
  2394. },
  2395. });
  2396.  
  2397. $.register({
  2398. rule: {
  2399. host: /^(www\.)?piccash\.net$/
  2400. },
  2401. ready: function () {
  2402. var i = $('.container > img');
  2403. var m =i.onclick.toString().match(/mshow\('([^']+)'\);/);
  2404. $.openImage(m[1]);
  2405. },
  2406. });
  2407.  
  2408. $.register({
  2409. rule: [
  2410. 'http://amateurfreak.org/share-*.html',
  2411. 'http://amateurfreak.org/share.php?id=*',
  2412. 'http://images.maxigame.by/share-*.html',
  2413. 'http://picfox.org/*',
  2414. 'http://www.euro-pic.eu/share.php?id=*',
  2415. 'http://www.gratisimage.dk/share-*.html',
  2416. 'http://xxx.freeimage.us/share.php?id=*',
  2417. 'http://npicture.net/share-*.html',
  2418. 'http://www.onlinepic.net/share.php?id=*',
  2419. 'http://www.pixsor.com/share.php?id=*',
  2420. ],
  2421. ready: function () {
  2422. 'use strict';
  2423. var o = $('#iimg');
  2424. $.openImage(o.src);
  2425. },
  2426. });
  2427.  
  2428. $.register({
  2429. rule: 'http://picmoe.net/d.php?id=*',
  2430. ready: function () {
  2431. 'use strict';
  2432. var i = $('img');
  2433. $.openImage(i.src);
  2434. },
  2435. });
  2436.  
  2437. $.register({
  2438. rule: [
  2439. 'http://pics-money.ru/allpicfree/*',
  2440. 'http://www.pics-money.ru/allimage/*',
  2441. ],
  2442. });
  2443. $.register({
  2444. rule: {
  2445. host: /^pics-money\.ru$/,
  2446. path: /^\/v\.php$/,
  2447. },
  2448. ready: function () {
  2449. 'use strict';
  2450. $.removeNodes('iframe');
  2451. var i = $('center img:not([id])');
  2452. $.openImage(i.src);
  2453. },
  2454. });
  2455. $.register({
  2456. rule: {
  2457. host: /^www\.pics-money\.ru$/,
  2458. },
  2459. ready: function () {
  2460. 'use strict';
  2461. $.removeNodes('iframe');
  2462. var i = $('#d1 img');
  2463. i = i.onclick.toString();
  2464. i = i.match(/mshow\('(.+)'\)/);
  2465. i = i[1];
  2466. $.openImage(i);
  2467. },
  2468. });
  2469.  
  2470. $.register({
  2471. rule: 'http://picshare.geenza.com/pics/*',
  2472. ready: function () {
  2473. 'use strict';
  2474. var i = $('#picShare_image_container');
  2475. $.openImage(i.src);
  2476. },
  2477. });
  2478.  
  2479. $.register({
  2480. rule: {
  2481. host: /^pixhub\.eu$/,
  2482. },
  2483. ready: function () {
  2484. 'use strict';
  2485. $.removeNodes('iframe, .adultpage, #FFN_Banner_Holder');
  2486. var i = $('.image-show img');
  2487. $.openImage(i.src);
  2488. },
  2489. });
  2490.  
  2491. $.register({
  2492. rule: {
  2493. host: /^(www\.)?pixroute\.com$/
  2494. },
  2495. ready: function () {
  2496. 'use strict';
  2497. var o = $('body > center > div > center:nth-child(12) > div > a > img');
  2498. $.openImage(o.src);
  2499. },
  2500. });
  2501.  
  2502. $.register({
  2503. rule: {
  2504. host: /^www\.pornimagex\.com$/,
  2505. path: /^\/image\/.*$/,
  2506. },
  2507. ready: function () {
  2508. 'use strict';
  2509. var img = $('#fixed img.border2px');
  2510. $.openImage(img.src);
  2511. },
  2512. });
  2513.  
  2514. $.register({
  2515. rule: {
  2516. host: /^postimg\.org$/,
  2517. },
  2518. ready: function () {
  2519. 'use strict';
  2520. var i = $('body > center > img');
  2521. $.openImage(i.src);
  2522. },
  2523. });
  2524.  
  2525. $.register({
  2526. rule: {
  2527. host: /^prntscr\.com$/
  2528. },
  2529. ready: function () {
  2530. 'use strict';
  2531. var i = $('#screenshot-image');
  2532. $.openImage(i.src);
  2533. },
  2534. });
  2535.  
  2536. $.register({
  2537. rule: {
  2538. host: /^pronpic\.org$/,
  2539. },
  2540. ready: function () {
  2541. 'use strict';
  2542. var img = $('table.new_table2:nth-child(2) img.link');
  2543. var url = img.src.replace('th_', '');
  2544. $.openImage(url);
  2545. },
  2546. });
  2547.  
  2548. $.register({
  2549. rule: {
  2550. host: /^qrrro\.com$/,
  2551. path: /^(\/images\/.+)\.html$/,
  2552. },
  2553. start: function (m) {
  2554. 'use strict';
  2555. $.openImage(m.path[1]);
  2556. },
  2557. });
  2558.  
  2559. (function () {
  2560. 'use strict';
  2561. function ready () {
  2562. var i = $('img[class^=centred]');
  2563. $.openImage(i.src);
  2564. }
  2565. $.register({
  2566. rule: [
  2567. {
  2568. host: [
  2569. /^(image(decode|ontime)|(zonezeed|zelje|croft|myhot|dam)image|pic(\.apollon-fervor|stwist)|www\.imglemon|ericsony|imgpu|wpc8)\.com$/,
  2570. /^(img(serve|coin|fap)|gallerycloud)\.net$/,
  2571. /^hotimages\.eu$/,
  2572. /^(imgstudio|dragimage|image(look|team))\.org$/,
  2573. ],
  2574. path: /^\/img-.*\.html$/,
  2575. },
  2576. {
  2577. host: /^imgrun\.net$/,
  2578. path: /^\/t\/img-.*\.html$/,
  2579. },
  2580. ],
  2581. ready: ready,
  2582. });
  2583. $.register({
  2584. rule: {
  2585. host: /^www.img(adult|taxi).com$/,
  2586. path: /^\/img-.*\.html$/,
  2587. },
  2588. start: function () {
  2589. var c = $.getCookie('user');
  2590. if (c) {
  2591. return;
  2592. }
  2593. $.setCookie('user', 'true');
  2594. window.location.reload();
  2595. },
  2596. ready: ready,
  2597. });
  2598. $.register({
  2599. rule: {
  2600. host: /^08lkk\.com$/,
  2601. path: /^\/Photo\/img-.+\.html$/,
  2602. },
  2603. start: function () {
  2604. $.window.setTimeout = _.nop;
  2605. $.get(window.location.toString()).then(function (data) {
  2606. var a = $.toDOM(data);
  2607. var i = $('img[class^=centred]', a);
  2608. $.openImage(i.src);
  2609. });
  2610. },
  2611. });
  2612. })();
  2613.  
  2614. (function () {
  2615. 'use strict';
  2616. $.register({
  2617. rule: {
  2618. host: /^www\.imagesnake\.com$/,
  2619. path: /^\/index\.php$/,
  2620. query: /^\?/,
  2621. },
  2622. ready: function () {
  2623. var a = $('#tablewraper a:nth-child(2)');
  2624. $.openImage(a.href);
  2625. },
  2626. });
  2627. function run () {
  2628. var i = $('#img_obj');
  2629. $.openImage(i.src);
  2630. }
  2631. $.register({
  2632. rule: {
  2633. host: /^www\.(imagesnake|freebunker|imgcarry)\.com$/,
  2634. path: /^\/show\//,
  2635. },
  2636. ready: run,
  2637. });
  2638. $.register({
  2639. rule: {
  2640. host: /^www\.imagefruit\.com$/,
  2641. path: /^\/(img|show)\/.+/,
  2642. },
  2643. ready: run,
  2644. });
  2645. })();
  2646.  
  2647. $.register({
  2648. rule: 'http://www.subirimagenes.com/*.html',
  2649. ready: function () {
  2650. 'use strict';
  2651. var i = $('#ImagenVisualizada');
  2652. $.openImage(i.src);
  2653. },
  2654. });
  2655.  
  2656. $.register({
  2657. rule: 'http://tinypic.com/view.php?pic=*',
  2658. ready: function () {
  2659. 'use strict';
  2660. var i = $('#imgElement');
  2661. $.openImage(i.src);
  2662. },
  2663. });
  2664.  
  2665. $.register({
  2666. rule: {
  2667. host: /^www\.turboimagehost\.com$/,
  2668. },
  2669. ready: function () {
  2670. 'use strict';
  2671. var i = $('#imageid');
  2672. $.openImage(i.src);
  2673. },
  2674. });
  2675.  
  2676. $.register({
  2677. rule: 'http://vvcap.net/db/*.htp',
  2678. ready: function () {
  2679. 'use strict';
  2680. var i = $('img');
  2681. $.replace(i.src);
  2682. },
  2683. });
  2684.  
  2685. $.register({
  2686. rule: {
  2687. host: /^x\.pixfarm\.net$/,
  2688. path: /^\/sexy\/\d+\/\d+\/.+\.html$/,
  2689. },
  2690. ready: function () {
  2691. 'use strict';
  2692. var i = $('img');
  2693. $.openImage(i.src);
  2694. },
  2695. });
  2696.  
  2697. $.register({
  2698. rule: {
  2699. host: /\.yfrog\.com$/,
  2700. },
  2701. ready: function () {
  2702. 'use strict';
  2703. if (/^\/z/.test(window.location.pathname)) {
  2704. var i = $('#the-image img');
  2705. $.openImage(i.src);
  2706. return;
  2707. }
  2708. var a = $.$('#continue-link a, #main_image');
  2709. if (a) {
  2710. $.openLink('/z' + window.location.pathname);
  2711. return;
  2712. }
  2713. },
  2714. });
  2715.  
  2716. $.register({
  2717. rule: {
  2718. host: /^01\.nl$/,
  2719. },
  2720. ready: function () {
  2721. 'use strict';
  2722. var f = $('iframe#redirectframe');
  2723. $.openLink(f.src);
  2724. },
  2725. });
  2726.  
  2727. $.register({
  2728. rule: {
  2729. host: /^(www\.)?1be\.biz$/,
  2730. path: /^\/s\.php$/,
  2731. query: /^\?(.+)/,
  2732. },
  2733. start: function (m) {
  2734. 'use strict';
  2735. $.openLink(m.query[1]);
  2736. },
  2737. });
  2738.  
  2739. $.register({
  2740. rule: {
  2741. host: /^(www\.)?1tiny\.net$/,
  2742. path: /\/\w+/
  2743. },
  2744. ready: function () {
  2745. 'use strict';
  2746. var directUrl = $.searchScripts(/window\.location='([^']+)';/);
  2747. if (!directUrl) {
  2748. throw new _.AdsBypasserError('script content changed');
  2749. }
  2750. $.openLink(directUrl[1]);
  2751. },
  2752. });
  2753.  
  2754. $.register({
  2755. rule: {
  2756. host: /^2ty\.cc$/,
  2757. path: /^\/.+/,
  2758. },
  2759. ready: function () {
  2760. 'use strict';
  2761. $.removeNodes('iframe');
  2762. var a = $('#close');
  2763. $.openLink(a.href);
  2764. },
  2765. });
  2766.  
  2767. $.register({
  2768. rule: {
  2769. host: /^(www\.)?3ra\.be$/,
  2770. },
  2771. ready: function () {
  2772. 'use strict';
  2773. $.removeNodes('iframe');
  2774. var f = $.window.fc;
  2775. if (!f) {
  2776. throw new _.AdsBypasserError('window.fc is undefined');
  2777. }
  2778. f = f.toString();
  2779. f = f.match(/href="([^"]*)/);
  2780. if (!f) {
  2781. throw new _.AdsBypasserError('url pattern outdated');
  2782. }
  2783. $.openLink(f[1]);
  2784. },
  2785. });
  2786.  
  2787. $.register({
  2788. rule: {
  2789. host: /^(www\.)?4fun\.tw$/,
  2790. },
  2791. ready: function () {
  2792. 'use strict';
  2793. var i = $('#original_url');
  2794. $.openLink(i.value);
  2795. },
  2796. });
  2797.  
  2798. (function () {
  2799. 'use strict';
  2800. $.register({
  2801. rule: {
  2802. host: /^ad7.biz$/,
  2803. path: /^\/\d+\/(.*)$/,
  2804. },
  2805. start: function (m) {
  2806. $.removeNodes('iframe');
  2807. var redirectLink = m.path[1];
  2808. if (!redirectLink.match(/^https?:\/\//)) {
  2809. redirectLink = "http://" + redirectLink;
  2810. }
  2811. $.openLink(redirectLink);
  2812. },
  2813. });
  2814. $.register({
  2815. rule: {
  2816. host: /^ad7.biz$/,
  2817. path: /^\/\w+$/,
  2818. },
  2819. ready: function () {
  2820. $.removeNodes('iframe');
  2821. var script = $.searchScripts('var r_url');
  2822. var url = script.match(/&url=([^&]+)/);
  2823. url = url[1];
  2824. $.openLink(url);
  2825. },
  2826. });
  2827. })();
  2828.  
  2829. $.register({
  2830. rule: {
  2831. host: /^(www\.)?adb\.ug$/,
  2832. path: /^(?!\/(?:privacy|terms|contact(\/.*)?|#.*)?$).*$/
  2833. },
  2834. ready: function () {
  2835. 'use strict';
  2836. $.removeNodes('iframe');
  2837. var m = $.searchScripts(/top\.location\.href="([^"]+)"/);
  2838. if (m) {
  2839. $.openLink(m[1]);
  2840. return;
  2841. }
  2842. m = $.searchScripts(/\{_args.+\}\}/);
  2843. if (!m) {
  2844. throw new _.AdsBypasserError('script content changed');
  2845. }
  2846. m = eval('(' + m[0] + ')');
  2847. var url = window.location.pathname + '/skip_timer';
  2848. var i = setInterval(function () {
  2849. $.post(url, m).then(function (text) {
  2850. var jj = JSON.parse(text);
  2851. if (!jj.errors && jj.messages) {
  2852. clearInterval(i);
  2853. $.openLink(jj.messages.url);
  2854. }
  2855. });
  2856. }, 1000);
  2857. },
  2858. });
  2859.  
  2860. (function () {
  2861. 'use strict';
  2862. $.register({
  2863. rule: {
  2864. path: /\/locked$/,
  2865. query: /url=([^&]+)/,
  2866. },
  2867. start: function (m) {
  2868. $.resetCookies();
  2869. $.openLink('/' + m.query[1]);
  2870. },
  2871. });
  2872. $.register({
  2873. rule: function () {
  2874. var h = $.$('html[id="adfly_html"]');
  2875. var b = $.$('body[id="home"]');
  2876. if (h && b) {
  2877. return true;
  2878. } else {
  2879. return null;
  2880. }
  2881. },
  2882. ready: function () {
  2883. var h = $.$('#adfly_html'), b = $.$('#home');
  2884. if (!h || !b || h.nodeName !== 'HTML' || b.nodeName !== 'BODY') {
  2885. return;
  2886. }
  2887. $.removeNodes('iframe');
  2888. $.window.cookieCheck = _.nop;
  2889. h = $.window.eu;
  2890. if (!h) {
  2891. h = $('#adfly_bar');
  2892. $.window.close_bar();
  2893. return;
  2894. }
  2895. var a = h.indexOf('!HiTommy');
  2896. if (a >= 0) {
  2897. h = h.substring(0, a);
  2898. }
  2899. a = '';
  2900. b = '';
  2901. for (var i = 0; i < h.length; ++i) {
  2902. if (i % 2 === 0) {
  2903. a = a + h.charAt(i);
  2904. } else {
  2905. b = h.charAt(i) + b;
  2906. }
  2907. }
  2908. h = atob(a + b);
  2909. h = h.substr(2);
  2910. if (location.hash) {
  2911. h += location.hash;
  2912. }
  2913. $.openLinkWithReferer(h);
  2914. },
  2915. });
  2916. $.register({
  2917. rule: 'http://ad7.biz/*',
  2918. ready: function () {
  2919. $.removeNodes('iframe');
  2920. $.resetCookies();
  2921. var script = $.searchScripts('var r_url');
  2922. var url = script.match(/&url=([^&]+)/);
  2923. url = url[1];
  2924. $.openLinkWithReferer(url);
  2925. },
  2926. });
  2927. })();
  2928.  
  2929. $.register({
  2930. rule: 'http://adfoc.us/*',
  2931. ready: function () {
  2932. 'use strict';
  2933. var root = document.body;
  2934. var observer = new MutationObserver(function (mutations) {
  2935. var o = $.$('#showSkip');
  2936. if (o) {
  2937. observer.disconnect();
  2938. o = o.querySelector('a');
  2939. $.openLink(o.href);
  2940. }
  2941. });
  2942. observer.observe(root, {
  2943. childList: true,
  2944. subtree: true,
  2945. });
  2946. },
  2947. });
  2948.  
  2949. $.register({
  2950. rule: {
  2951. host: /^(www\.)?adjet\.biz$/,
  2952. },
  2953. ready: function () {
  2954. 'use strict';
  2955. var m = $.searchScripts(/href=(\S+)/);
  2956. if (!m) {
  2957. throw new _.AdsBypasserError('site changed');
  2958. }
  2959. $.openLink(m[1]);
  2960. },
  2961. });
  2962.  
  2963. $.register({
  2964. rule: {
  2965. host: /^adlock\.org$/,
  2966. },
  2967. ready: function () {
  2968. 'use strict';
  2969. var a = $.$('#xre a.xxr, #downloadButton1');
  2970. if (a) {
  2971. $.openLink(a.href);
  2972. return;
  2973. }
  2974. a = $.window.fileLocation;
  2975. if (a) {
  2976. $.openLink(a);
  2977. }
  2978. },
  2979. });
  2980.  
  2981. $.register({
  2982. rule: {
  2983. host: /^(www\.)?adlot\.us$/,
  2984. },
  2985. ready: function () {
  2986. 'use strict';
  2987. $.removeNodes('iframe');
  2988. var script = $.searchScripts('form');
  2989. var p = /name='([^']+)' value='([^']+)'/g;
  2990. var opt = {
  2991. image: ' ',
  2992. };
  2993. var tmp = null;
  2994. while (tmp = p.exec(script)) {
  2995. opt[tmp[1]] = tmp[2];
  2996. }
  2997. $.openLinkByPost('', opt);
  2998. },
  2999. });
  3000.  
  3001. $.register({
  3002. rule: {
  3003. host: /^(www\.)?ah-informatique\.com$/,
  3004. path: /^\/ZipUrl/,
  3005. },
  3006. ready: function () {
  3007. 'use strict';
  3008. var a = $('#zip3 a');
  3009. $.openLink(a.href);
  3010. },
  3011. });
  3012.  
  3013. $.register({
  3014. rule: {
  3015. host: /^aka\.gr$/
  3016. },
  3017. ready: function () {
  3018. 'use strict';
  3019. var l = $('iframe#yourls-frame');
  3020. $.openLink(l.src);
  3021. },
  3022. });
  3023.  
  3024. $.register({
  3025. rule: {
  3026. host: /^anonymbucks\.com$/,
  3027. },
  3028. ready: function () {
  3029. 'use strict';
  3030. var a = $('#boton-continuar');
  3031. a.click();
  3032. },
  3033. });
  3034.  
  3035. (function () {
  3036. 'use strict';
  3037. $.register({
  3038. rule: {
  3039. host: /^bc\.vc$/,
  3040. path: /^.+(https?:\/\/.+)$/,
  3041. },
  3042. start: function (m) {
  3043. $.openLink(m.path[1] + document.location.search + document.location.hash);
  3044. },
  3045. });
  3046. function decompress (script, unzip) {
  3047. if (!unzip) {
  3048. return script;
  3049. }
  3050. var matches = script.match(/eval(.*)/);
  3051. matches = matches[1];
  3052. script = eval(matches);
  3053. return script;
  3054. }
  3055. function searchScript (unzip) {
  3056. var content = $.searchScripts('make_log');
  3057. if (content) {
  3058. return {
  3059. direct: false,
  3060. script: decompress(content, unzip),
  3061. };
  3062. }
  3063. content = $.searchScripts('click_log');
  3064. if (content) {
  3065. return {
  3066. direct: true,
  3067. script: decompress(content, unzip),
  3068. };
  3069. }
  3070. throw _.AdsBypasserError('script changed');
  3071. }
  3072. function knockServer (script, dirtyFix) {
  3073. var matches = script.match(/\$.post\('([^']*)'[^{]+(\{opt:'make_log'[^}]+\}\}),/i);
  3074. var make_url = matches[1];
  3075. var make_opts = eval('(' + matches[2] + ')');
  3076. var i = setInterval(function () {
  3077. $.post(make_url, make_opts).then(function (text) {
  3078. if (dirtyFix) {
  3079. text = text.match(/\{.+\}/)[0];
  3080. }
  3081. var jj = JSON.parse(text);
  3082. if (jj.message) {
  3083. clearInterval(i);
  3084. $.openLink(jj.message.url);
  3085. }
  3086. });
  3087. }, 1000);
  3088. }
  3089. function knockServer2 (script) {
  3090. var post = $.window.$.post;
  3091. $.window.$.post = function (a, b, c) {
  3092. if (typeof c !== 'function') {
  3093. return;
  3094. }
  3095. setTimeout(function () {
  3096. var data = {
  3097. error: false,
  3098. message: {
  3099. url: '#',
  3100. },
  3101. };
  3102. c(JSON.stringify(data));
  3103. }, 1000);
  3104. };
  3105. var matches = script.match(/\$.post\('([^']*)'[^{]+(\{opt:'make_log'[^}]+\}\}),/i);
  3106. var make_url = matches[1];
  3107. var make_opts = eval('(' + matches[2] + ')');
  3108. function makeLog () {
  3109. make_opts.opt = 'make_log';
  3110. post(make_url, make_opts, function (text) {
  3111. var data = JSON.parse(text);
  3112. _.info('make_log', data);
  3113. if (!data.message) {
  3114. checksLog();
  3115. return;
  3116. }
  3117. $.openLink(data.message.url);
  3118. });
  3119. }
  3120. function checkLog () {
  3121. make_opts.opt = 'check_log';
  3122. post(make_url, make_opts, function (text) {
  3123. var data = JSON.parse(text);
  3124. _.info('check_log', data);
  3125. if (!data.message) {
  3126. checkLog();
  3127. return;
  3128. }
  3129. makeLog();
  3130. });
  3131. }
  3132. function checksLog () {
  3133. make_opts.opt = 'checks_log';
  3134. post(make_url, make_opts, function () {
  3135. _.info('checks_log');
  3136. checkLog();
  3137. });
  3138. }
  3139. checksLog();
  3140. }
  3141. $.register({
  3142. rule: {
  3143. host: /^bc\.vc$/,
  3144. path: /^\/.+/,
  3145. },
  3146. ready: function () {
  3147. $.removeNodes('iframe');
  3148. var result = searchScript(false);
  3149. if (!result.direct) {
  3150. knockServer2(result.script);
  3151. } else {
  3152. result = result.script.match(/top\.location\.href = '([^']+)'/);
  3153. if (!result) {
  3154. throw new _.AdsBypasserError('script changed');
  3155. }
  3156. result = result[1];
  3157. $.openLink(result);
  3158. }
  3159. },
  3160. });
  3161. function run (dirtyFix) {
  3162. $.removeNodes('iframe');
  3163. var result = searchScript(true);
  3164. if (!result.direct) {
  3165. knockServer(result.script,dirtyFix);
  3166. } else {
  3167. result = result.script.match(/top\.location\.href='([^']+)'/);
  3168. if (!result) {
  3169. throw new _.AdsBypasserError('script changed');
  3170. }
  3171. result = result[1];
  3172. $.openLink(result);
  3173. }
  3174. }
  3175. $.register({
  3176. rule: {
  3177. host: /^adcrun\.ch$/,
  3178. path: /^\/\w+$/,
  3179. },
  3180. ready: function () {
  3181. $.removeNodes('.user_content');
  3182. var rSurveyLink = /http\.open\("GET", "api_ajax\.php\?sid=\d*&ip=[^&]*&longurl=([^"]+)" \+ first_time, (?:true|false)\);/;
  3183. var l = $.searchScripts(rSurveyLink);
  3184. if (l) {
  3185. $.openLink(l[1]);
  3186. return;
  3187. }
  3188. run(true);
  3189. },
  3190. });
  3191. $.register({
  3192. rule: {
  3193. host: [
  3194. /^1tk\.us$/,
  3195. /^gx\.si$/,
  3196. /^adwat\.ch$/,
  3197. /^(fly2url|urlwiz|xafox)\.com$/,
  3198. /^(zpoz|ultry)\.net$/,
  3199. /^(wwy|myam)\.me$/,
  3200. /^ssl\.gs$/,
  3201. /^link\.tl$/,
  3202. /^hit\.us$/,
  3203. /^shortit\.in$/,
  3204. /^(adbla|tl7)\.us$/,
  3205. /^www\.adjet\.eu$/,
  3206. /^srk\.gs$/,
  3207. /^cun\.bz$/,
  3208. /^miniurl\.tk$/,
  3209. /^vizzy\.es$/,
  3210. /^kazan\.vc$/,
  3211. ],
  3212. path: /^\/.+/,
  3213. },
  3214. ready: run,
  3215. });
  3216. $.register({
  3217. rule: {
  3218. host: /^adtr\.im|ysear\.ch|xip\.ir$/,
  3219. path: /^\/.+/,
  3220. },
  3221. ready: function () {
  3222. var a = $.$('div.fly_head a.close');
  3223. var f = $.$('iframe.fly_frame');
  3224. if (a && f) {
  3225. $.openLink(f.src);
  3226. } else {
  3227. run();
  3228. }
  3229. },
  3230. });
  3231. $.register({
  3232. rule: {
  3233. host: /^ad5\.eu$/,
  3234. path: /^\/[^.]+$/,
  3235. },
  3236. ready: function() {
  3237. $.removeNodes('iframe');
  3238. var s = searchScript(true);
  3239. var m = s.script.match(/(<form name="form1"method="post".*(?!<\\form>)<\/form>)/);
  3240. if (!m) {return;}
  3241. m = m[1];
  3242. var tz = -(new Date().getTimezoneOffset()/60);
  3243. m = m.replace("'+timezone+'",tz);
  3244. var d = document.createElement('div');
  3245. d.setAttribute('id','AdsBypasserFTW');
  3246. d.setAttribute('style', 'display:none;');
  3247. d.innerHTML = m;
  3248. document.body.appendChild(d);
  3249. $('#AdsBypasserFTW > form[name=form1]').submit();
  3250. },
  3251. });
  3252. $.register({
  3253. rule: {
  3254. host: /^tr5\.in$/,
  3255. path: /^\/.+/,
  3256. },
  3257. ready: function () {
  3258. run(true);
  3259. },
  3260. });
  3261. })();
  3262.  
  3263. $.register({
  3264. rule: 'http://www.bild.me/bild.php?file=*',
  3265. ready: function () {
  3266. 'use strict';
  3267. var i = $('#Bild');
  3268. $.openLink(i.src);
  3269. },
  3270. });
  3271.  
  3272. $.register({
  3273. rule: 'http://bildr.no/view/*',
  3274. ready: function () {
  3275. 'use strict';
  3276. var i = $('img.bilde');
  3277. $.openLink(i.src);
  3278. },
  3279. });
  3280.  
  3281. $.register({
  3282. rule: {
  3283. host: /^(www\.)?([a-zA-Z0-9]+\.)?binbox\.io$/,
  3284. path: /\/o\/([a-zA-Z0-9]+)/,
  3285. },
  3286. ready: function (m) {
  3287. 'use strict';
  3288. var direct_link = window.atob(m.path[1]);
  3289. $.openLink(direct_link);
  3290. },
  3291. });
  3292.  
  3293. $.register({
  3294. rule: {
  3295. host: /^(www\.)?(buz|vzt)url\.com$/,
  3296. },
  3297. ready: function () {
  3298. 'use strict';
  3299. var frame = $('frame[scrolling=yes]');
  3300. $.openLink(frame.src);
  3301. },
  3302. });
  3303.  
  3304. $.register({
  3305. rule: {
  3306. host: /^(cf|ex|xt)\d\.(me|co)$/,
  3307. },
  3308. ready: function (m) {
  3309. 'use strict';
  3310. $.removeNodes('iframe');
  3311. var a = $('#skip_button');
  3312. $.openLink(a.href);
  3313. },
  3314. });
  3315.  
  3316. $.register({
  3317. rule: {
  3318. host: /^cf\.ly$/,
  3319. path: /^\/[^\/]+$/,
  3320. },
  3321. start: function (m) {
  3322. 'use strict';
  3323. $.removeNodes('iframe');
  3324. $.openLink('/skip' + m.path[0]);
  3325. },
  3326. });
  3327.  
  3328. $.register({
  3329. rule: {
  3330. host: /^(www\.)?cli\.gs$/,
  3331. },
  3332. ready: function () {
  3333. 'use strict';
  3334. var a = $('a.RedirectLink');
  3335. $.openLink(a.href);
  3336. },
  3337. });
  3338.  
  3339. $.register({
  3340. rule: {
  3341. host: /^(www\.)?clictune\.com$/,
  3342. path: /^\/id=\d+/,
  3343. },
  3344. ready: function () {
  3345. 'use strict';
  3346. $.removeNodes('iframe');
  3347. var linkHolder = $('#compteur');
  3348. var matches = linkHolder.innerHTML.match(/<a href=".*url=([^&"]+).*>/);
  3349. var url = decodeURIComponent(matches[1]);
  3350. $.openLink(url);
  3351. },
  3352. });
  3353.  
  3354. $.register({
  3355. rule: {
  3356. host: /^(www\.)?(coin-ads\.com|shortin\.tk)$/,
  3357. path: /^\/.+/,
  3358. },
  3359. ready: function () {
  3360. 'use strict';
  3361. var m = $.searchScripts(/window\.location\.replace/);
  3362. if (m) {
  3363. return;
  3364. }
  3365. m = $.searchScripts(/countdownArea\.innerHTML = "([^"]+)"/);
  3366. if (!m) {
  3367. throw new _.AdsBypasserError('pattern changed');
  3368. }
  3369. m = m[1];
  3370. var d = $.$('#area');
  3371. if (d) {
  3372. d.innerHTML = m;
  3373. d = $('.skip', d);
  3374. d.click();
  3375. return;
  3376. }
  3377. d = $('#site');
  3378. $.openLink(d.src);
  3379. },
  3380. });
  3381.  
  3382. $.register({
  3383. rule: {
  3384. host: /^(?:(\w+)\.)?(coinurl\.com|cur\.lv)$/,
  3385. path: /^\/([-\w]+)$/
  3386. },
  3387. ready: function (m) {
  3388. 'use strict';
  3389. $.removeNodes('iframe');
  3390. var host = 'http://cur.lv/redirect_curlv.php';
  3391. var param = m.host[1] === undefined ? {
  3392. code: m.path[1],
  3393. } : {
  3394. zone: m.host[1],
  3395. name: m.path[1],
  3396. };
  3397. $.get(host, param).then(function(mainFrameContent) {
  3398. try {
  3399. var docMainFrame = $.toDOM(mainFrameContent);
  3400. } catch (e) {
  3401. throw new _.AdsBypasserError('main frame changed');
  3402. }
  3403. var rExtractLink = /onclick="open_url\('([^']+)',\s*'go'\)/;
  3404. var innerFrames = $.$$('frameset > frame', docMainFrame).each(function (currFrame) {
  3405. var currFrameAddr = window.location.origin + '/' + currFrame.getAttribute('src');
  3406. $.get(currFrameAddr).then(function(currFrameContent) {
  3407. var aRealLink = rExtractLink.exec(currFrameContent);
  3408. if (aRealLink === undefined || aRealLink[1] === undefined) {
  3409. return;
  3410. }
  3411. var realLink = aRealLink[1];
  3412. $.openLink(realLink);
  3413. });
  3414. });
  3415. });
  3416. },
  3417. });
  3418.  
  3419. $.register({
  3420. rule: {
  3421. host: /^comyonet\.com$/,
  3422. },
  3423. ready: function () {
  3424. 'use strict';
  3425. var input = $('input[name="enter"]');
  3426. input.click();
  3427. },
  3428. });
  3429.  
  3430. $.register({
  3431. rule: {
  3432. host: /^(www\.)?dapat\.in$/,
  3433. },
  3434. ready: function () {
  3435. 'use strict';
  3436. var f = $('iframe[name=pagetext]');
  3437. $.openLink(f.src);
  3438. },
  3439. });
  3440.  
  3441. $.register({
  3442. rule: {
  3443. host: /^(www\.)?dd\.ma$/,
  3444. },
  3445. ready: function (m) {
  3446. 'use strict';
  3447. var i = $.$('#mainframe');
  3448. if (i) {
  3449. $.openLink(i.src);
  3450. return;
  3451. }
  3452. var a = $('#btn_open a');
  3453. $.openLink(a.href);
  3454. },
  3455. });
  3456.  
  3457. $.register({
  3458. rule: 'http://www.dumppix.com/viewer.php?*',
  3459. ready: function () {
  3460. 'use strict';
  3461. var i = $.$('#boring');
  3462. if (i) {
  3463. $.openLink(i.src);
  3464. return;
  3465. }
  3466. i = $('table td:nth-child(1) a');
  3467. $.openLink(i.href);
  3468. },
  3469. });
  3470.  
  3471. $.register({
  3472. rule: {
  3473. host: /^durl\.me$/,
  3474. },
  3475. ready: function () {
  3476. 'use strict';
  3477. var a = $('a[class="proceedBtn"]');
  3478. $.openLink(a.href);
  3479. },
  3480. });
  3481.  
  3482. $.register({
  3483. rule: {
  3484. host: /easyurl\.net|(atu|clickthru|redirects|readthis)\.ca|goshrink\.com$/,
  3485. },
  3486. ready: function () {
  3487. 'use strict';
  3488. var f = $('frame[name=main]');
  3489. $.openLink(f.src);
  3490. },
  3491. });
  3492.  
  3493. $.register({
  3494. rule: {
  3495. host: /empireload\.com$/,
  3496. path: /^\/plugin\.php$/,
  3497. query: /^\?id=linkout&url=([^&]+)$/,
  3498. },
  3499. start: function (m) {
  3500. $.openLink(m.query[1]);
  3501. },
  3502. });
  3503.  
  3504. $.register({
  3505. rule: {
  3506. host: [
  3507. /^ethi\.in$/,
  3508. /^st\.wardhanime\.net$/,
  3509. ],
  3510. path: /^\/i\/\d+$/,
  3511. },
  3512. ready: function () {
  3513. 'use strict';
  3514. var a = $('#wrapper > [class^="tombo"] > a[target="_blank"]');
  3515. $.openLink(a.href);
  3516. },
  3517. });
  3518.  
  3519. $.register({
  3520. rule: {
  3521. host: /^(www\.)?filoops.info$/
  3522. },
  3523. ready: function () {
  3524. 'use strict';
  3525. var a = $('#text > center a, #text > div[align=center] a');
  3526. $.openLink(a.href);
  3527. },
  3528. });
  3529.  
  3530. $.register({
  3531. rule: {
  3532. host: /^fit\.sh$/,
  3533. },
  3534. ready: function () {
  3535. 'use strict';
  3536. $.removeNodes('.container-body');
  3537. var m = $.searchScripts(/token="([^"]+)"/);
  3538. if (!m) {
  3539. throw new _.AdsBypasserError('site changed');
  3540. }
  3541. m = m[1];
  3542. var interLink = '/go/' + m + '?a=' + window.location.hash.substr(1);
  3543. setTimeout(function () {
  3544. $.openLink(interLink);
  3545. }, 6000);
  3546. },
  3547. });
  3548.  
  3549. (function () {
  3550. 'use strict';
  3551. $.register({
  3552. rule: {
  3553. host: /^(www\.)?fundurl\.com$/,
  3554. query: /i=([^&]+)/,
  3555. },
  3556. start: function (m) {
  3557. $.openLink(m.query[1]);
  3558. },
  3559. });
  3560. $.register({
  3561. rule: {
  3562. host: /^(www\.)?fundurl\.com$/,
  3563. path: /^\/(go-\w+|load\.php)$/,
  3564. },
  3565. ready: function () {
  3566. var f = $('iframe[name=fpage3]');
  3567. $.openLink(f.src);
  3568. },
  3569. });
  3570. })();
  3571.  
  3572. $.register({
  3573. rule: {
  3574. host: /^gca\.sh$/,
  3575. },
  3576. ready: function () {
  3577. 'use strict';
  3578. $.removeNodes('iframe');
  3579. var jQuery = $.window.$;
  3580. setTimeout(function () {
  3581. jQuery("#captcha-dialog").dialog("open");
  3582. }, 1000);
  3583. },
  3584. });
  3585.  
  3586. $.register({
  3587. rule: {
  3588. host: /^gkurl\.us$/,
  3589. },
  3590. ready: function () {
  3591. 'use strict';
  3592. var iframe = $('#gkurl-frame');
  3593. $.openLink(iframe.src);
  3594. },
  3595. });
  3596.  
  3597. $.register({
  3598. rule: {
  3599. host: /^u\.go2\.me$/,
  3600. },
  3601. ready: function () {
  3602. 'use strict';
  3603. var iframe = $('iframe');
  3604. $.openLink(iframe.src);
  3605. },
  3606. });
  3607.  
  3608. $.register({
  3609. rule: {
  3610. host: /^hotshorturl\.com$/,
  3611. },
  3612. ready: function () {
  3613. 'use strict';
  3614. var frame = $('frame[scrolling=yes]');
  3615. $.openLink(frame.src);
  3616. },
  3617. });
  3618.  
  3619. $.register({
  3620. rule: {
  3621. host: /^(www\.)?(ilix\.in|priva\.us)$/,
  3622. path: /\/(\w+)/,
  3623. },
  3624. ready: function (m) {
  3625. 'use strict';
  3626. var realHost = 'ilix.in';
  3627. if (m.host[2] !== realHost) {
  3628. var realURL = location.href.replace(m.host[2], realHost);
  3629. $.openLink(realURL);
  3630. return;
  3631. }
  3632. var f = $.$('iframe[name=ifram]');
  3633. if (f) {
  3634. $.openLink(f.src);
  3635. return;
  3636. }
  3637. if (!$.$('img#captcha')) {
  3638. $('form[name=frm]').submit();
  3639. }
  3640. },
  3641. });
  3642.  
  3643. $.register({
  3644. rule: {
  3645. host: /^ity\.im$/,
  3646. },
  3647. ready: function () {
  3648. 'use strict';
  3649. var f = $.$('#main');
  3650. if (f) {
  3651. $.openLink(f.src);
  3652. return;
  3653. }
  3654. f = $.$$('frame').find(function (frame) {
  3655. if (frame.src.indexOf('interheader.php') < 0) {
  3656. return _.nop;
  3657. }
  3658. return frame.src;
  3659. });
  3660. if (f) {
  3661. $.openLink(f.payload);
  3662. return;
  3663. }
  3664. f = $.searchScripts(/krypted=([^&]+)/);
  3665. if (!f) {
  3666. throw new _.AdsBypasserError('site changed');
  3667. }
  3668. f = f[1];
  3669. var data = $.window.des('ksnslmtmk0v4Pdviusajqu', $.window.hexToString(f), 0, 0);
  3670. if (data) {
  3671. $.openLink('http://ity.im/1104_21_50846_' + data);
  3672. }
  3673. },
  3674. });
  3675.  
  3676. $.register({
  3677. rule: {
  3678. host: /^(www\.)?kingofshrink\.com$/,
  3679. },
  3680. ready: function () {
  3681. 'use strict';
  3682. var l = $('#textresult > a');
  3683. $.openLink(l.href);
  3684. },
  3685. });
  3686.  
  3687. $.register({
  3688. rule: 'http://www.lienscash.com/l/*',
  3689. ready: function () {
  3690. 'use strict';
  3691. var a = $('#redir_btn');
  3692. $.openLink(a.href);
  3693. },
  3694. });
  3695.  
  3696. $.register({
  3697. rule: {
  3698. host: /^(www\.)?\w+\.link-protector\.com$/,
  3699. },
  3700. ready: function (m) {
  3701. 'use strict';
  3702. var f = $('form[style="font-weight:normal;font-size:12;font-family:Verdana;"]');
  3703. $.openLink(f.action);
  3704. },
  3705. });
  3706.  
  3707. $.register({
  3708. rule: {
  3709. host: /\.link2dollar\.com$/,
  3710. path: /^\/\d+$/,
  3711. },
  3712. ready: function () {
  3713. 'use strict';
  3714. var m = $.searchScripts(/var rlink = '([^']+)';/);
  3715. if (!m) {
  3716. throw new _.AdsBypasserError('site changed');
  3717. }
  3718. m = m[1];
  3719. $.openLink(m);
  3720. },
  3721. });
  3722.  
  3723. $.register({
  3724. rule: {
  3725. host: /^link2you\.ru$/,
  3726. path: /^\/\d+\/(.+)$/,
  3727. },
  3728. start: function (m) {
  3729. 'use strict';
  3730. var url = m.path[1];
  3731. if (!url.match(/^https?:\/\//)) {
  3732. url = '//' + url;
  3733. }
  3734. $.openLink(url);
  3735. },
  3736. });
  3737.  
  3738. (function() {
  3739. function ConvertFromHex (str) {
  3740. var result = [];
  3741. while (str.length >= 2) {
  3742. result.push(String.fromCharCode(parseInt(str.substring(0, 2), 16)));
  3743. str = str.substring(2, str.length);
  3744. }
  3745. return result.join("");
  3746. }
  3747. var Encode = function (str) {
  3748. var s = [], j = 0, x, res = '', k = arguments.callee.toString().replace(/\s+/g, "");
  3749. for (var i = 0; i < 256; i++) {
  3750. s[i] = i;
  3751. }
  3752. for (i = 0; i < 256; i++) {
  3753. j = (j + s[i] + k.charCodeAt(i % k.length)) % 256;
  3754. x = s[i];
  3755. s[i] = s[j];
  3756. s[j] = x;
  3757. }
  3758. i = 0;
  3759. j = 0;
  3760. for (var y = 0; y < str.length; y++) {
  3761. i = (i + 1) % 256;
  3762. j = (j + s[i]) % 256;
  3763. x = s[i];
  3764. s[i] = s[j];
  3765. s[j] = x;
  3766. res += String.fromCharCode(str.charCodeAt(y) ^ s[(s[i] + s[j]) % 256]);
  3767. }
  3768. return res;
  3769. };
  3770. var hostRules = [
  3771. /^(([\w]{8}|www)\.)?(allanalpass|cash4files|drstickyfingers|fapoff|freegaysitepass|(gone|tube)viral|(pic|tna)bucks|whackyvidz)\.com$/,
  3772. /^(([\w]{8}|www)\.)?(a[mn]y|deb|dyo|sexpalace)\.gs$/,
  3773. /^(([\w]{8}|www)\.)?(filesonthe|poontown|seriousdeals|ultrafiles|urlbeat)\.net$/,
  3774. /^(([\w]{8}|www)\.)?freean\.us$/,
  3775. /^(([\w]{8}|www)\.)?galleries\.bz$/,
  3776. /^(([\w]{8}|www)\.)?hornywood\.tv$/,
  3777. /^(([\w]{8}|www)\.)?link(babes|bucks)\.com$/,
  3778. /^(([\w]{8}|www)\.)?(megaline|miniurls|qqc|rqq|tinylinks|yyv|zff)\.co$/,
  3779. /^(([\w]{8}|www)\.)?(these(blog|forum)s)\.com$/,
  3780. /^(([\w]{8}|www)\.)?youfap\.me$/,
  3781. /^warning-this-linkcode-will-cease-working-soon\.www\.linkbucksdns\.com$/,
  3782. ];
  3783. function generateRandomIP () {
  3784. 'use strict';
  3785. return [0,0,0,0].map(function () {
  3786. return Math.floor(Math.random() * 256);
  3787. }).join('.');
  3788. }
  3789. function findToken (context) {
  3790. 'use strict';
  3791. var script = $.searchScripts('window[\'init\' + \'Lb\' + \'js\' + \'\']', context);
  3792. if (!script) {
  3793. _.warn('pattern changed');
  3794. return null;
  3795. }
  3796. var m = script.match(/AdPopUrl\s*:\s*'.+\?ref=([\w\d]+)'/);
  3797. var token = m[1];
  3798. m = script.match(/=\s*(\d+);/);
  3799. var ak = parseInt(m[1], 10);
  3800. var re = /\+\s*(\d+);/g;
  3801. var tmp = null;
  3802. while((m = re.exec(script)) !== null) {
  3803. tmp = m[1];
  3804. }
  3805. ak += parseInt(tmp, 10);
  3806. return {
  3807. t: token,
  3808. aK: ak,
  3809. };
  3810. }
  3811. function sendRequest (token) {
  3812. 'use strict';
  3813. _.info('sending token: %o', token);
  3814. var i = setInterval(function () {
  3815. $.get('/intermission/loadTargetUrl', token).then(function (text) {
  3816. var data = JSON.parse(text);
  3817. _.info('response: %o', data);
  3818. if (!data.Success && data.Errors[0] === 'Invalid token') {
  3819. _.info('got invalid token');
  3820. clearInterval(i);
  3821. retry();
  3822. return;
  3823. }
  3824. if (data.Success && !data.AdBlockSpotted && data.Url) {
  3825. clearInterval(i);
  3826. $.openLinkWithReferer(data.Url);
  3827. return;
  3828. }
  3829. });
  3830. }, 1000);
  3831. }
  3832. function retry () {
  3833. 'use strict';
  3834. $.get(window.location.toString(), {}, {
  3835. 'X-Forwarded-For': generateRandomIP(),
  3836. }).then(function (text) {
  3837. var d = $.toDOM(text);
  3838. var t = findToken(d);
  3839. if (!t) {
  3840. var i = setTimeout(retry, 1000);
  3841. return;
  3842. }
  3843. sendRequest(t);
  3844. });
  3845. }
  3846. $.register({
  3847. rule: {
  3848. host: hostRules,
  3849. path: /^\/\w+\/url\/(.+)$/,
  3850. },
  3851. ready: function(m) {
  3852. 'use strict';
  3853. $.removeAllTimer();
  3854. $.resetCookies();
  3855. $.removeNodes('iframe');
  3856. var url = m.path[1] + window.location.search;
  3857. var match = $.searchScripts(/UrlEncoded: ([^,]+)/);
  3858. if (match && match[1] === 'true') {
  3859. url = Encode(ConvertFromHex(url));
  3860. }
  3861. $.openLinkWithReferer(url);
  3862. }
  3863. });
  3864. $.register({
  3865. rule: {
  3866. host: hostRules,
  3867. },
  3868. ready: function () {
  3869. 'use strict';
  3870. $.removeAllTimer();
  3871. $.resetCookies();
  3872. $.removeNodes('iframe');
  3873. if (window.location.pathname.indexOf('verify') >= 0) {
  3874. var path = window.location.pathname.replace('/verify', '');
  3875. $.openLink(path);
  3876. return;
  3877. }
  3878. var token = findToken(document);
  3879. sendRequest(token);
  3880. },
  3881. });
  3882. $.register({
  3883. rule: {
  3884. query: /^(.*)[?&]_lbGate=\d+$/,
  3885. },
  3886. start: function (m) {
  3887. 'use strict';
  3888. $.setCookie('_lbGatePassed', 'true');
  3889. $.openLink(window.location.pathname + m.query[1]);
  3890. },
  3891. });
  3892. })();
  3893.  
  3894. $.register({
  3895. rule: {
  3896. host: [
  3897. /^www\.linkdecode\.com$/,
  3898. /^www\.fastdecode\.com$/,
  3899. ],
  3900. path: /^\/$/,
  3901. query: /^\?.+$/,
  3902. },
  3903. ready: function (m) {
  3904. 'use strict';
  3905. $.removeNodes('iframe');
  3906. var b = $('#m > .Visit_Link');
  3907. b = b.onclick.toString().match(/\'([^']+)\'/);
  3908. if (!b) {
  3909. throw new _.AdsBypasser('pattern changed');
  3910. }
  3911. $.openLink(b[1]);
  3912. },
  3913. });
  3914.  
  3915. $.register({
  3916. rule: {
  3917. host: /^linkshrink\.net$/,
  3918. path: /^\/[a-zA-Z0-9]+$/,
  3919. },
  3920. ready: function () {
  3921. 'use strict';
  3922. var a = $.searchScripts(/class="bt" href="([^"]+)"/);
  3923. if (!a) {
  3924. _.warn('pattern changed');
  3925. return;
  3926. }
  3927. $.openLinkWithReferer(a[1]);
  3928. },
  3929. });
  3930.  
  3931. $.register({
  3932. rule: 'http://lix.in/-*',
  3933. ready: function () {
  3934. 'use strict';
  3935. var i = $.$('#ibdc');
  3936. if (i) {
  3937. return;
  3938. }
  3939. i = $.$('form');
  3940. if (i) {
  3941. i.submit();
  3942. return;
  3943. }
  3944. i = $('iframe');
  3945. $.openLink(i.src);
  3946. },
  3947. });
  3948.  
  3949. $.register({
  3950. rule: {
  3951. host: /^lnk\.in$/,
  3952. },
  3953. ready: function () {
  3954. 'use strict';
  3955. var a = $('#divRedirectText a');
  3956. $.openLink(a.innerHTML);
  3957. },
  3958. });
  3959.  
  3960. $.register({
  3961. rule: {
  3962. host: /^(rd?)lnk\.co|reducelnk\.com$/,
  3963. path: /^\/[^.]+$/,
  3964. },
  3965. ready: function () {
  3966. 'use strict';
  3967. var f = $.$('iframe#dest');
  3968. if (f) {
  3969. $.openLink(f.src);
  3970. return;
  3971. }
  3972. $.removeNodes('iframe');
  3973. var o = $.$('#urlholder');
  3974. if (o) {
  3975. $.openLink(o.value);
  3976. return;
  3977. }
  3978. o = $.$('#skipBtn');
  3979. if (o) {
  3980. o = o.querySelector('a');
  3981. $.openLink(o.href);
  3982. return;
  3983. }
  3984. o = document.title.replace(/(LNK.co|Linkbee)\s*:\s*/, '');
  3985. $.openLink(o);
  3986. },
  3987. });
  3988.  
  3989. $.register({
  3990. rule: {
  3991. host: /^lnx\.lu|url\.fm|z\.gs$/,
  3992. },
  3993. ready: function () {
  3994. 'use strict';
  3995. var a = $('#clickbtn a');
  3996. $.openLink(a.href);
  3997. },
  3998. });
  3999.  
  4000. $.register({
  4001. rule: [
  4002. 'http://madlink.sk/',
  4003. 'http://madlink.sk/*.html',
  4004. ],
  4005. });
  4006. $.register({
  4007. rule: 'http://madlink.sk/*',
  4008. start: function (m) {
  4009. 'use strict';
  4010. $.removeNodes('iframe');
  4011. $.post('/ajax/check_redirect.php', {
  4012. link: m[1],
  4013. }).then(function (text) {
  4014. $.openLink(text);
  4015. });
  4016. },
  4017. });
  4018.  
  4019. $.register({
  4020. rule: {
  4021. host: [
  4022. /^mant[ae][pb]\.in$/,
  4023. /^st\.oploverz\.net$/,
  4024. ],
  4025. },
  4026. ready: function () {
  4027. 'use strict';
  4028. var a = $('a.redirect, a[target=_blank][rel=nofollow]');
  4029. $.openLink(a.href);
  4030. },
  4031. });
  4032.  
  4033. $.register({
  4034. rule: {
  4035. host: [
  4036. /^moe\.god\.jp$/,
  4037. /^moesubs\.akurapopo\.pro$/,
  4038. /^dl\.nsfk\.in$/,
  4039. ]
  4040. },
  4041. ready: function () {
  4042. 'use strict';
  4043. var a = $('div div center a');
  4044. $.openLink(a.href);
  4045. },
  4046. });
  4047.  
  4048. $.register({
  4049. rule: {
  4050. host: /^mt0\.org$/,
  4051. path: /^\/[^\/]+\/$/,
  4052. },
  4053. ready: function () {
  4054. 'use strict';
  4055. $.removeNodes('frame[name=bottom]');
  4056. var f = $('frame[name=top]');
  4057. var i = setInterval(function () {
  4058. var a = $.$('div a', f.contentDocument);
  4059. if (!a) {
  4060. return;
  4061. }
  4062. clearInterval(i);
  4063. $.openLink(a.href)
  4064. }, 1000);
  4065. },
  4066. });
  4067.  
  4068. $.register({
  4069. rule: 'http://my-link.pro/*',
  4070. ready: function () {
  4071. 'use strict';
  4072. var i = $('iframe[scrolling=auto]');
  4073. if (i) {
  4074. $.openLink(i.src);
  4075. }
  4076. },
  4077. });
  4078.  
  4079. $.register({
  4080. rule: {
  4081. host: /^nsfw\.in$/,
  4082. },
  4083. ready: function () {
  4084. 'use strict';
  4085. var a = $('#long_url a');
  4086. $.openLink(a.href);
  4087. },
  4088. });
  4089.  
  4090. $.register({
  4091. rule: {
  4092. host: /^nutshellurl\.com$/,
  4093. },
  4094. ready: function () {
  4095. 'use strict';
  4096. var iframe = $('iframe');
  4097. $.openLink(iframe.src);
  4098. },
  4099. });
  4100.  
  4101. $.register({
  4102. rule: {
  4103. host: /^www\.oni\.vn$/,
  4104. },
  4105. ready: function () {
  4106. 'use strict';
  4107. $.removeNodes('iframe');
  4108. var url = $.searchScripts(/window\.location='([^']+)'/);
  4109. if (!url) {
  4110. throw new _.AdsBypasserError('pattern changed');
  4111. }
  4112. $.openLink(url[1]);
  4113. },
  4114. });
  4115.  
  4116. $.register({
  4117. rule: {
  4118. host: /^oxyl\.me$/,
  4119. },
  4120. ready: function () {
  4121. 'use strict';
  4122. var l = $.$$('.links-container.result-form > a.result-a');
  4123. if (l.size() > 1) {
  4124. return;
  4125. }
  4126. $.openLink(l.at(0).href);
  4127. },
  4128. });
  4129.  
  4130. $.register({
  4131. rule: {
  4132. host: /^p\.pw$/,
  4133. },
  4134. ready: function () {
  4135. 'use strict';
  4136. $.removeNodes('iframe');
  4137. var m = $.searchScripts(/window\.location = "(.*)";/);
  4138. m = m[1];
  4139. $.openLink(m);
  4140. },
  4141. });
  4142.  
  4143. $.register({
  4144. rule: {
  4145. host: /^(www\.)?\w+\.rapeit\.net$/,
  4146. path: /^\/(go|prepair|request|collect|analyze)\/[a-f0-9]+$/,
  4147. },
  4148. ready: function (m) {
  4149. 'use strict';
  4150. var a = $('a#download_link');
  4151. $.openLink(a.href);
  4152. },
  4153. });
  4154.  
  4155. $.register({
  4156. rule: {
  4157. host: /^ref\.so$/,
  4158. },
  4159. ready: function () {
  4160. 'use strict';
  4161. $.removeNodes('iframe');
  4162. var a = $('#btn_open a');
  4163. $.openLink(a.href);
  4164. },
  4165. });
  4166.  
  4167. $.register({
  4168. rule: 'http://reffbux.com/refflinx/view/*',
  4169. ready: function () {
  4170. 'use strict';
  4171. $.removeNodes('iframe');
  4172. var m = $.searchScripts(/skip_this_ad_(\d+)_(\d+)/);
  4173. var id = m[1];
  4174. var share = m[2];
  4175. var location = window.location.toString();
  4176. $.post('http://reffbux.com/refflinx/register', {
  4177. id: id,
  4178. share: share,
  4179. fp: 0,
  4180. location: location,
  4181. referer: '',
  4182. }).then(function (text) {
  4183. var m = text.match(/'([^']+)'/);
  4184. if (!m) {
  4185. throw new _.AdsBypasserError('pattern changed');
  4186. }
  4187. $.openLink(m[1]);
  4188. });
  4189. },
  4190. });
  4191.  
  4192. $.register({
  4193. rule: 'http://richlink.com/app/webscr?cmd=_click&key=*',
  4194. ready: function () {
  4195. 'use strict';
  4196. var f = $('frameset');
  4197. f = f.onload.toString();
  4198. f = f.match(/url=([^&]+)/);
  4199. if (f) {
  4200. f = decodeURIComponent(f[1]);
  4201. } else {
  4202. f = $('frame[name=site]');
  4203. f = f.src;
  4204. }
  4205. $.openLink(f);
  4206. },
  4207. });
  4208.  
  4209. $.register({
  4210. rule: 'http://rijaliti.info/*.php',
  4211. ready: function () {
  4212. 'use strict';
  4213. var a = $('#main td[align="center"] a');
  4214. $.openLink(a.href);
  4215. },
  4216. });
  4217.  
  4218. $.register({
  4219. rule: {
  4220. host: /^riurl\.com$/,
  4221. path: /^\/.+/,
  4222. },
  4223. ready: function () {
  4224. 'use strict';
  4225. var s = $.$('body script');
  4226. if (s) {
  4227. s = s.innerHTML.indexOf('window.location.replace');
  4228. if (s >= 0) {
  4229. return;
  4230. }
  4231. }
  4232. $.openLinkByPost('', {
  4233. hidden: '1',
  4234. image: ' ',
  4235. });
  4236. },
  4237. });
  4238.  
  4239. $.register({
  4240. rule: {
  4241. host: /^preview\.rlu\.ru$/,
  4242. },
  4243. ready: function () {
  4244. 'use strict';
  4245. var a = $('#content > .long_url > a');
  4246. $.openLink(a.href);
  4247. },
  4248. });
  4249.  
  4250. $.register({
  4251. rule: {
  4252. host: /^robo\.us$/,
  4253. },
  4254. ready: function () {
  4255. 'use strict';
  4256. $.removeNodes('iframe');
  4257. var url = atob($.window.fl);
  4258. $.openLink(url);
  4259. },
  4260. });
  4261.  
  4262. $.register({
  4263. rule: {
  4264. host: /^(www\.)?safelinkconverter2\.com$/,
  4265. path: /^\/decrypt-\d\/$/,
  4266. query: /id=(\w+=+)/,
  4267. },
  4268. start: function (m) {
  4269. 'use strict';
  4270. $.get('https://decrypt.safelinkconverter.com/index.php' + window.location.search).then(function (html) {
  4271. var m = html.match(/3;URL=([^"]+)/);
  4272. if (!m) {
  4273. _.warn('pattern changed');
  4274. return;
  4275. }
  4276. $.openLink(m[1]);
  4277. });
  4278. },
  4279. });
  4280.  
  4281. $.register({
  4282. rule: {
  4283. host: /^(www\.)?safeurl\.eu$/,
  4284. path: /\/\w+/,
  4285. },
  4286. ready: function () {
  4287. 'use strict';
  4288. var directUrl = $.searchScripts(/window\.open\("([^"]+)"\);/);
  4289. if (!directUrl) {
  4290. throw new _.AdsBypasserError('script content changed');
  4291. }
  4292. directUrl = directUrl[1];
  4293. $.openLink(directUrl);
  4294. },
  4295. });
  4296.  
  4297. $.register({
  4298. rule: {
  4299. host: /^(www\.)?(apploadz\.ru|seomafia\.net)$/
  4300. },
  4301. ready: function () {
  4302. 'use strict';
  4303. $.removeNodes('iframe');
  4304. var a = $('table a');
  4305. $.openLink(a.href);
  4306. },
  4307. });
  4308.  
  4309. $.register({
  4310. rule: /http:\/\/setlinks\.us\/(p|t|d).*/,
  4311. ready: function () {
  4312. 'use strict';
  4313. var k = $.searchScripts(/window\.location='([^']+)'/);
  4314. if (k) {
  4315. $.openLink(k[1]);
  4316. return;
  4317. }
  4318. var aLinks = $.$$('div.links-container.result-form:not(.p-links-container) > span.dlinks > a');
  4319. if (aLinks.size() === 1) {
  4320. $.openLink(aLinks.at(0).href);
  4321. return;
  4322. }
  4323. k = $('img[alt=captcha]');
  4324. $.captcha(k.src, function (a) {
  4325. var b = $('#captcha');
  4326. var c = $('input[name=Submit]');
  4327. b.value = a;
  4328. c.click();
  4329. });
  4330. },
  4331. });
  4332.  
  4333. (function () {
  4334. 'use strict';
  4335. function afterGotSessionId (sessionId) {
  4336. var X_NewRelic_ID = $.searchScripts(/xpid:"([^"]+)"/);
  4337. var Fingerprint = $.window.Fingerprint;
  4338. var browserToken = null;
  4339. if (Fingerprint) {
  4340. browserToken = (new Fingerprint({canvas: !0})).get();
  4341. } else {
  4342. browserToken = Math.round((new Date()).getTime() / 1000);
  4343. }
  4344. var data = "sessionId=" + sessionId + "&browserToken=" + browserToken;
  4345. var header = {
  4346. Accept: 'application/json, text/javascript',
  4347. };
  4348. if (X_NewRelic_ID) {
  4349. header['X-NewRelic-ID'] = X_NewRelic_ID;
  4350. }
  4351. var i = setInterval(function () {
  4352. $.get('/adSession/callback', data, header).then(function (text) {
  4353. var r = JSON.parse(text);
  4354. if (r.status == "ok" && r.destinationUrl) {
  4355. clearInterval(i);
  4356. $.openLink(r.destinationUrl);
  4357. }
  4358. });
  4359. }, 1000);
  4360. }
  4361. $.register({
  4362. rule: {
  4363. host: /^sh\.st|(dh10thbvu|u2ks|jnw0)\.com$/,
  4364. path: /^\/[\d\w]+/,
  4365. },
  4366. ready: function () {
  4367. $.removeNodes('iframe');
  4368. var m = $.searchScripts(/sessionId: "([\d\w]+)",/);
  4369. if (m) {
  4370. afterGotSessionId(m[1]);
  4371. return;
  4372. }
  4373. var o = new MutationObserver(function (mutations) {
  4374. mutations.forEach(function (mutation) {
  4375. var m = $.searchScripts(/sessionId: "([\d\w]+)",/);
  4376. if (m) {
  4377. o.disconnect();
  4378. afterGotSessionId(m[1]);
  4379. }
  4380. });
  4381. });
  4382. o.observe(document.body, {
  4383. childList: true,
  4384. });
  4385. },
  4386. });
  4387. })();
  4388.  
  4389. $.register({
  4390. rule: {
  4391. host: /^(www\.)?shortenurl\.tk$/,
  4392. path: /^\/\w+$/,
  4393. },
  4394. ready: function (m) {
  4395. 'use strict';
  4396. var l = $('a.btn-block.redirect').href;
  4397. var b64 = l.match(/\?r=(\w+={2})/);
  4398. $.openLink(atob(b64[1]));
  4399. },
  4400. });
  4401.  
  4402. $.register({
  4403. rule: {
  4404. host: /^(www\.)?similarsites\.com$/,
  4405. path: /^\/goto\/([^?]+)/
  4406. },
  4407. ready: function (m) {
  4408. 'use strict';
  4409. var l = m.path[1];
  4410. if (!/^https?:\/\//.test(l)) {
  4411. l = 'http://' + l;
  4412. }
  4413. $.openLink(l);
  4414. },
  4415. });
  4416.  
  4417. $.register({
  4418. rule: {
  4419. host: /^(www\.)?srelink\.com$/,
  4420. path: /^\/i\/\w+$/,
  4421. },
  4422. ready: function (m) {
  4423. 'use strict';
  4424. $.removeNodes('iframe');
  4425. var matches = $.searchScripts(/href="([^"]+)">SKIP AD<\/a>/);
  4426. $.openLink(matches[1]);
  4427. },
  4428. });
  4429.  
  4430. $.register({
  4431. rule: {
  4432. host: /^stash-coins\.com$/,
  4433. },
  4434. start: function () {
  4435. 'use strict';
  4436. var url = window.location.toString();
  4437. var i = url.lastIndexOf('http');
  4438. url = url.substr(i);
  4439. $.openLink(url);
  4440. },
  4441. });
  4442.  
  4443. $.register({
  4444. rule: {
  4445. host: /^steamcommunity\.com$/,
  4446. path: /^\/linkfilter\/(.+)?$/,
  4447. query: /^(?:\?url=(.+))?$/,
  4448. },
  4449. ready: function (m) {
  4450. 'use strict';
  4451. var target = m.path[1]? m.path[1]+document.location.search : m.query[1];
  4452. $.openLink(target);
  4453. },
  4454. });
  4455.  
  4456. $.register({
  4457. rule: {
  4458. host: /^(www\.)?sylnk\.net$/,
  4459. query: /link=([^&]+)/
  4460. },
  4461. ready: function (m) {
  4462. 'use strict';
  4463. var rawLink = atob(m.query[1]);
  4464. $.openLink(rawLink);
  4465. },
  4466. });
  4467.  
  4468. $.register({
  4469. rule: {
  4470. host: /^thinfi\.com$/,
  4471. },
  4472. ready: function () {
  4473. 'use strict';
  4474. var a = $('div p a');
  4475. $.openLink(a.href);
  4476. },
  4477. });
  4478.  
  4479. $.register({
  4480. rule: {
  4481. host: /^tinyarrows\.com$/,
  4482. path: /^\/preview\.php$/,
  4483. query: /^\?page=([^&]+)/,
  4484. },
  4485. start: function (m) {
  4486. 'use strict';
  4487. $.openLink(decodeURIComponent(m.query[1]));
  4488. },
  4489. });
  4490.  
  4491. $.register({
  4492. rule: {
  4493. host: /^(www\.)?typ\.me$/,
  4494. },
  4495. ready: function (m) {
  4496. 'use strict';
  4497. var a = $('#skipAdBtn');
  4498. $.openLink(a.href);
  4499. },
  4500. });
  4501.  
  4502. $.register({
  4503. rule: {
  4504. host: /^(www\.)?ultshare\.com$/,
  4505. path: /^\/(?:(?:\d-)?(\d+)|index\.php)$/,
  4506. query: /^(?:\?a=\d&c=(\d+))?$/
  4507. },
  4508. ready: function (m) {
  4509. 'use strict';
  4510. var linkId = m.path[1]?m.path[1]:m.query[1];
  4511. var directLink = '/3-' + linkId;
  4512. $.openLink(directLink);
  4513. },
  4514. });
  4515.  
  4516. $.register({
  4517. rule: {
  4518. host: /^unfake\.it$/,
  4519. },
  4520. ready: function () {
  4521. 'use strict';
  4522. var frame = $('frame');
  4523. var i = frame.src.lastIndexOf('http://');
  4524. $.openLink(frame.src.substr(i));
  4525. },
  4526. });
  4527.  
  4528. $.register({
  4529. rule: {
  4530. host: /^(www\.)?(upan|gxp)\.so$/,
  4531. path: /^\/\w+$/,
  4532. },
  4533. ready: function () {
  4534. 'use strict';
  4535. var a = $('table.td_line a[onclick="down_process_s();"]');
  4536. $.openLink(a.href);
  4537. },
  4538. });
  4539.  
  4540. $.register({
  4541. rule: {
  4542. host: /^url\.ie$/,
  4543. },
  4544. ready: function () {
  4545. 'use strict';
  4546. var a = $('a[title="Link to original URL"]');
  4547. $.openLink(a.href);
  4548. },
  4549. });
  4550.  
  4551. $.register({
  4552. rule: {
  4553. host: /urlcash\.(com|net|org)|(bat5|detonating|celebclk|eightteen|smilinglinks|peekatmygirlfriend|pornyhost|clb1|urlgalleries)\.com|looble\.net|xxxs\.org$/,
  4554. },
  4555. ready: function () {
  4556. 'use strict';
  4557. if ($.window && $.window.linkDestUrl) {
  4558. $.openLink($.window.linkDestUrl);
  4559. return;
  4560. }
  4561. var matches = document.body.innerHTML.match(/linkDestUrl = '(.+)'/);
  4562. if (matches) {
  4563. $.openLink(matches[1]);
  4564. return;
  4565. }
  4566. },
  4567. });
  4568.  
  4569. $.register({
  4570. rule: {
  4571. host: /^(www\.)?(urlcow|miniurl)\.com$/,
  4572. },
  4573. ready: function () {
  4574. 'use strict';
  4575. var m = $.searchScripts(/window\.location = "([^"]+)"/);
  4576. if (!m) {
  4577. throw new _.AdsBypasserError('site changed');
  4578. }
  4579. $.openLink(m[1]);
  4580. },
  4581. });
  4582.  
  4583. $.register({
  4584. rule: {
  4585. host: /^urlinn\.com$/,
  4586. },
  4587. ready: function () {
  4588. 'use strict';
  4589. var m = $('META[HTTP-EQUIV=refresh]').getAttribute('CONTENT').match(/url='([^']+)'/);
  4590. if (m) {
  4591. $.openLink(m[1]);
  4592. }
  4593. },
  4594. });
  4595.  
  4596. $.register({
  4597. rule: {
  4598. host: /^urlms\.com$/,
  4599. },
  4600. ready: function () {
  4601. 'use strict';
  4602. var iframe = $('#content');
  4603. $.openLink(iframe.src);
  4604. },
  4605. });
  4606.  
  4607. $.register({
  4608. rule: 'http://urlz.so/l/*',
  4609. ready: function () {
  4610. 'use strict';
  4611. var i = $.$('td > a');
  4612. if (i) {
  4613. i = i.href;
  4614. var m = i.match(/javascript:declocation\('(.+)'\);/);
  4615. if (m) {
  4616. i = atob(m[1]);
  4617. }
  4618. $.openLink(i);
  4619. return;
  4620. }
  4621. i = $('img');
  4622. $.captcha(i.src, function (a) {
  4623. var b = $('input[name=captcha]');
  4624. var c = $('input[name=submit]');
  4625. b.value = a;
  4626. c.click();
  4627. });
  4628. },
  4629. });
  4630.  
  4631. $.register({
  4632. rule: {
  4633. host: /^www\.viidii\.info$/,
  4634. },
  4635. ready: function () {
  4636. 'use strict';
  4637. var o = $('#directlink');
  4638. $.openLink(o.href);
  4639. },
  4640. });
  4641.  
  4642. $.register({
  4643. rule: {
  4644. host: /^(www\.)?vir\.al$/,
  4645. },
  4646. ready: function () {
  4647. 'use strict';
  4648. var m = $.searchScripts(/var target_url = '([^']+)';/);
  4649. if (!m) {
  4650. throw new _.AdsBypasserError('site changed');
  4651. }
  4652. $.openLink(m[1]);
  4653. },
  4654. });
  4655.  
  4656. $.register({
  4657. rule: {
  4658. host: /^(www\.)?wzzq\.me$/,
  4659. },
  4660. ready: function () {
  4661. 'use strict';
  4662. try {
  4663. var l = $('#img_loading_table2 div.wz_img_hit a[target=_blank]').href;
  4664. $.openLink(l);
  4665. } catch (e) {
  4666. }
  4667. },
  4668. });
  4669.  
  4670. $.register({
  4671. rule: {
  4672. host: /^xlink.me$/
  4673. },
  4674. ready: function () {
  4675. 'use strict';
  4676. var a = $('#main_form > center > a');
  4677. if (!a) {return;}
  4678. $.openLink(a.href);
  4679. },
  4680. });
  4681.  
  4682. $.register({
  4683. rule: 'http://yep.it/preview.php?p=*',
  4684. ready: function () {
  4685. 'use strict';
  4686. var link = $('font[color="grey"]').innerHTML;
  4687. $.openLink(link);
  4688. },
  4689. });
  4690.  
  4691. $.register({
  4692. rule: 'http://www.yooclick.com/l/*',
  4693. ready: function () {
  4694. 'use strict';
  4695. $.removeNodes('iframe');
  4696. var uniq = $.window.uniq || $.window.uniqi;
  4697. if (!uniq) {return;}
  4698. var path = window.location.pathname;
  4699. var url = _.T('{0}?ajax=true&adblock=false&old=false&framed=false&uniq={1}')(path, uniq);
  4700. var getURL = function() {
  4701. $.get(url).then(function (text) {
  4702. var goodURL = /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(text);
  4703. if (goodURL) {
  4704. $.openLink(text);
  4705. } else {
  4706. setTimeout(getURL, 500);
  4707. }
  4708. });
  4709. }
  4710. getURL();
  4711. },
  4712. });
  4713.  
  4714. $.register({
  4715. rule: 'http://zo.mu/redirector/process?link=*',
  4716. ready: function () {
  4717. 'use strict';
  4718. $.removeNodes('iframe');
  4719. window.location.reload();
  4720. },
  4721. });
  4722.  
  4723. $.register({
  4724. rule: {
  4725. host: /^zzz\.gl$/,
  4726. },
  4727. ready: function () {
  4728. 'use strict';
  4729. var m = $.searchScripts(/var domainurl = '([^']+)';/);
  4730. if (!m) {
  4731. throw new _.AdsBypasserError('site changed');
  4732. }
  4733. $.openLink(m[1]);
  4734. },
  4735. });
  4736.  
  4737. (function () {
  4738. 'use strict';
  4739. var sUrl = '(\\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])';
  4740. function isLink (text) {
  4741. var rUrl = new RegExp(_.T('^{0}$')(sUrl), 'i');
  4742. return rUrl.test(text);
  4743. }
  4744. function linkify (text) {
  4745. var rUrl = new RegExp(sUrl, 'ig');
  4746. return text.replace(rUrl, function(match) {
  4747. return _.T("<a href='{0}'>{0}</a>")(match);
  4748. });
  4749. }
  4750. $.register({
  4751. rule: {
  4752. host: /^(www\.)?([a-zA-Z0-9]+\.)?binbox\.io$/,
  4753. path: /\/([a-zA-Z0-9]+)/,
  4754. hash: /#([a-zA-Z0-9]+)/,
  4755. },
  4756. ready: function (m) {
  4757. var sjcl = $.window.sjcl;
  4758. var paste_id = m.path[1];
  4759. var paste_salt = m.hash[1];
  4760. var fake_user = 'binbox';
  4761. var API_URL = _.T('https://{0}.binbox.io/{1}.json')(fake_user, paste_id);
  4762. $.get(API_URL).then(function (pasteInfo) {
  4763. pasteInfo = JSON.parse(pasteInfo);
  4764. if (!pasteInfo.ok) {
  4765. throw new _.AdsBypasserError("error when getting paste information");
  4766. }
  4767. var raw_paste = sjcl.decrypt(paste_salt, pasteInfo.paste.text);
  4768. if (isLink(raw_paste)) {
  4769. $.openLink(raw_paste);
  4770. return;
  4771. }
  4772. var elm = document.createElement('pre');
  4773. elm.id = 'paste-text';
  4774. elm.innerHTML = linkify(raw_paste);
  4775. var frame = $('#paste-frame, #captcha-page');
  4776. frame.parentNode.replaceChild(elm, frame);
  4777. });
  4778. },
  4779. });
  4780. })();
  4781.  
  4782. (function (global, factory) {
  4783. if (typeof module === 'object' && typeof module.exports === 'object') {
  4784. module.exports = function (global, GM) {
  4785. var _ = require('lodash');
  4786. var core = require('./core.js');
  4787. var misc = require('./misc.js');
  4788. var handler = require('./handler.js');
  4789. var modules = [misc, handler].map(function (v) {
  4790. return v.call(null, global, GM);
  4791. });
  4792. var $ = _.assign.apply(_, modules);
  4793. return factory(global, GM, core, $);
  4794. };
  4795. } else {
  4796. factory(global, {
  4797. openInTab: GM_openInTab,
  4798. registerMenuCommand: GM_registerMenuCommand,
  4799. }, global._, global.$);
  4800. }
  4801. }(this, function (global, GM, _, $) {
  4802. 'use strict';
  4803. var window = global.window;
  4804. var document = window.document;
  4805. var isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0;
  4806. function disableWindowOpen () {
  4807. $.window.open = _.nop;
  4808. }
  4809. function disableLeavePrompt () {
  4810. var seal = {
  4811. set: function () {
  4812. _.info('blocked onbeforeunload');
  4813. },
  4814. };
  4815. _.C([$.window, $.window.document.body]).each(function (o) {
  4816. if (!o) {
  4817. return;
  4818. }
  4819. o.onbeforeunload = undefined;
  4820. if (isSafari) {
  4821. o.__defineSetter__('onbeforeunload', seal.set);
  4822. } else {
  4823. $.window.Object.defineProperty(o, 'onbeforeunload', {
  4824. configurable: false,
  4825. enumerable: false,
  4826. get: undefined,
  4827. set: seal.set,
  4828. });
  4829. }
  4830. var oael = o.addEventListener;
  4831. var nael = function (type) {
  4832. if (type === 'beforeunload') {
  4833. _.info('blocked addEventListener onbeforeunload');
  4834. return;
  4835. }
  4836. return oael.apply(this, arguments);
  4837. };
  4838. o.addEventListener = nael;
  4839. });
  4840. }
  4841. $._main = function () {
  4842. var findHandler = $._findHandler;
  4843. delete $._main;
  4844. delete $._findHandler;
  4845. if (window.top !== window.self) {
  4846. return;
  4847. }
  4848. GM.registerMenuCommand('AdsBypasser - Configure', function () {
  4849. GM.openInTab('https://adsbypasser.github.io/configure.html');
  4850. });
  4851. var handler = findHandler(true);
  4852. if (handler) {
  4853. _.info('working on\n%s \nwith\n%o', window.location.toString(), $.config);
  4854. disableWindowOpen();
  4855. handler.start();
  4856. document.addEventListener('DOMContentLoaded', function () {
  4857. disableLeavePrompt();
  4858. handler.ready();
  4859. });
  4860. } else {
  4861. _.info('does not match location on `%s`, will try HTML content', window.location.toString());
  4862. document.addEventListener('DOMContentLoaded', function () {
  4863. handler = findHandler(false);
  4864. if (!handler) {
  4865. _.info('does not match HTML content on `%s`', window.location.toString());
  4866. return;
  4867. }
  4868. _.info('working on\n%s \nwith\n%o', window.location.toString(), $.config);
  4869. disableWindowOpen();
  4870. disableLeavePrompt();
  4871. handler.ready();
  4872. });
  4873. }
  4874. };
  4875. return $;
  4876. }));
  4877. $._main();