AdsBypasser

Bypass Ads

当前为 2014-11-16 提交的版本,查看 最新版本

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