AdsBypasser

Bypass Ads

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

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