Greasy Fork 还支持 简体中文。

AdsBypasser

Bypass Ads

目前為 2015-06-07 提交的版本,檢視 最新版本

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