AdsBypasser

Bypass Ads

目前为 2016-11-30 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name AdsBypasser
  3. // @namespace AdsBypasser
  4. // @description Bypass Ads
  5. // @copyright 2012+, Wei-Cheng Pan (legnaleurc)
  6. // @version 5.61.1
  7. // @license BSD
  8. // @homepageURL https://adsbypasser.github.io/
  9. // @supportURL https://github.com/adsbypasser/adsbypasser/issues
  10. // @icon https://raw.githubusercontent.com/adsbypasser/adsbypasser/v5.61.1/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.61.1/css/align_center.css
  22. // @resource scaleImage https://raw.githubusercontent.com/adsbypasser/adsbypasser/v5.61.1/css/scale_image.css
  23. // @resource bgImage https://raw.githubusercontent.com/adsbypasser/adsbypasser/v5.61.1/img/imagedoc-darknoise.png
  24. // @include http://*
  25. // @include https://*
  26. // @connect *
  27. // ==/UserScript==
  28. (function (context, factory) {
  29. if (typeof module === 'object' && typeof module.exports === 'object') {
  30. var bluebird = require('bluebird');
  31. module.exports = factory(context, bluebird.Promise);
  32. } else {
  33. var P = null;
  34. if (context.unsafeWindow.Future) {
  35. P = function (fn) {
  36. return context.unsafeWindow.Future.call(this, function (fr) {
  37. fn(fr.resolve.bind(fr), fr.reject.bind(fr));
  38. });
  39. };
  40. } else if (context.PromiseResolver) {
  41. P = function (fn) {
  42. return new context.Promise(function (pr) {
  43. fn(pr.resolve.bind(pr), pr.reject.bind(pr));
  44. });
  45. };
  46. } else {
  47. P = context.Promise;
  48. }
  49. factory(context, P);
  50. }
  51. }(this, function (context, Promise) {
  52. 'use strict';
  53. var _ = context._ = {};
  54. function setupStack () {
  55. if (Error.captureStackTrace) {
  56. Error.captureStackTrace(this, this.constructor);
  57. } else if (!this.hasOwnProperty('stack')) {
  58. var stack = (new Error()).stack.split('\n').slice(2);
  59. var e = stack[0].match(/^.*@(.*):(\d*)$/);
  60. this.fileName = e[1];
  61. this.lineNumber = parseInt(e[2], 10);
  62. this.stack = stack.join('\n');
  63. }
  64. }
  65. function AdsBypasserError (message) {
  66. setupStack.call(this);
  67. this.message = message;
  68. }
  69. AdsBypasserError.prototype = Object.create(Error.prototype);
  70. AdsBypasserError.prototype.constructor = AdsBypasserError;
  71. AdsBypasserError.prototype.name = 'AdsBypasserError';
  72. AdsBypasserError.extend = function (protoProps, staticProps) {
  73. var parent = this, child = function () {
  74. setupStack.call(this);
  75. protoProps.constructor.apply(this, arguments);
  76. };
  77. extend(child, parent, staticProps);
  78. child.prototype = Object.create(parent.prototype);
  79. extend(child.prototype, protoProps);
  80. child.prototype.constructor = child;
  81. child.super = parent.prototype;
  82. return child;
  83. };
  84. AdsBypasserError.super = null;
  85. _.AdsBypasserError = AdsBypasserError;
  86. function any (c, fn) {
  87. if (c.some) {
  88. return c.some(fn);
  89. }
  90. if (typeof c.length === 'number') {
  91. return Array.prototype.some.call(c, fn);
  92. }
  93. return Object.keys(c).some(function (k) {
  94. return fn(c[k], k, c);
  95. });
  96. }
  97. function all (c, fn) {
  98. if (c.every) {
  99. return c.every(fn);
  100. }
  101. if (typeof c.length === 'number') {
  102. return Array.prototype.every.call(c, fn);
  103. }
  104. return Object.keys(c).every(function (k) {
  105. return fn(c[k], k, c);
  106. });
  107. }
  108. function each (c, fn) {
  109. if (c.forEach) {
  110. c.forEach(fn);
  111. } else if (typeof c.length === 'number') {
  112. Array.prototype.forEach.call(c, fn);
  113. } else {
  114. Object.keys(c).forEach(function (k) {
  115. fn(c[k], k, c);
  116. });
  117. }
  118. }
  119. function map (c, fn) {
  120. if (c.map) {
  121. return c.map(fn);
  122. }
  123. if (typeof c.length === 'number') {
  124. return Array.prototype.map.call(c, fn);
  125. }
  126. return Object.keys(c).map(function (k) {
  127. return fn(c[k], k, c);
  128. });
  129. }
  130. function extend(c) {
  131. Array.prototype.slice.call(arguments, 1).forEach(function (source) {
  132. if (!source) {
  133. return;
  134. }
  135. _.C(source).each(function (v, k) {
  136. c[k] = v;
  137. });
  138. });
  139. return c;
  140. }
  141. function CollectionProxy (collection) {
  142. this._c = collection;
  143. }
  144. CollectionProxy.prototype.size = function () {
  145. if (typeof this._c.length === 'number') {
  146. return this._c.length;
  147. }
  148. return Object.keys(c).length;
  149. };
  150. CollectionProxy.prototype.at = function (k) {
  151. return this._c[k];
  152. };
  153. CollectionProxy.prototype.each = function (fn) {
  154. each(this._c, fn);
  155. return this;
  156. };
  157. CollectionProxy.prototype.find = function (fn) {
  158. var result;
  159. any(this._c, function (value, index, self) {
  160. var tmp = fn(value, index, self);
  161. if (tmp !== _.none) {
  162. result = {
  163. key: index,
  164. value: value,
  165. payload: tmp,
  166. };
  167. return true;
  168. }
  169. return false;
  170. });
  171. return result;
  172. };
  173. CollectionProxy.prototype.all = function (fn) {
  174. return all(this._c, fn);
  175. };
  176. CollectionProxy.prototype.map = function (fn) {
  177. return map(this._c, fn);
  178. };
  179. _.C = function (collection) {
  180. return new CollectionProxy(collection);
  181. };
  182. _.T = function (s) {
  183. if (typeof s === 'string') {
  184. } else if (s instanceof String) {
  185. s = s.toString();
  186. } else {
  187. throw new AdsBypasserError('template must be a string');
  188. }
  189. var T = {
  190. '{{': '{',
  191. '}}': '}',
  192. };
  193. return function () {
  194. var args = Array.prototype.slice.call(arguments);
  195. var kwargs = args[args.length-1];
  196. return s.replace(/\{\{|\}\}|\{([^\}]+)\}/g, function (m, key) {
  197. if (T.hasOwnProperty(m)) {
  198. return T[m];
  199. }
  200. if (args.hasOwnProperty(key)) {
  201. return args[key];
  202. }
  203. if (kwargs.hasOwnProperty(key)) {
  204. return kwargs[key];
  205. }
  206. return m;
  207. });
  208. };
  209. };
  210. _.P = function (fn) {
  211. if (typeof fn !== 'function') {
  212. throw new _.AdsBypasserError('must give a function');
  213. }
  214. var slice = Array.prototype.slice;
  215. var args = slice.call(arguments, 1);
  216. return function () {
  217. return fn.apply(this, args.concat(slice.call(arguments)));
  218. };
  219. };
  220. _.D = function (fn) {
  221. return new Promise(fn);
  222. };
  223. _.parseJSON = function (json) {
  224. try {
  225. return JSON.parse(json);
  226. } catch (e) {
  227. _.warn(e, json);
  228. }
  229. return _.none;
  230. };
  231. _.isString = function (value) {
  232. return (typeof value === 'string') || (value instanceof String);
  233. };
  234. _.nop = function () {
  235. };
  236. _.none = _.nop;
  237. _.wait = function (msDelay) {
  238. return _.D(function (resolve, reject) {
  239. setTimeout(resolve, msDelay);
  240. });
  241. };
  242. _.try = function (msInterval, fn) {
  243. return _.D(function (resolve, reject) {
  244. var handle = setInterval(function () {
  245. var result = fn();
  246. if (result !== _.none) {
  247. clearInterval(handle);
  248. resolve(result);
  249. }
  250. }, msInterval);
  251. });
  252. };
  253. function log (method, args) {
  254. if (_._quiet) {
  255. return;
  256. }
  257. args = Array.prototype.slice.call(args);
  258. if (_.isString(args[0])) {
  259. args[0] = 'AdsBypasser: ' + args[0];
  260. } else {
  261. args.unshift('AdsBypasser:');
  262. }
  263. var f = console[method];
  264. if (typeof f === 'function') {
  265. f.apply(console, args);
  266. }
  267. }
  268. _._quiet = false;
  269. _.info = function () {
  270. log('info', arguments);
  271. };
  272. _.warn = function () {
  273. log('warn', arguments);
  274. };
  275. return _;
  276. }));
  277. (function (context, factory) {
  278. if (typeof module === 'object' && typeof module.exports === 'object') {
  279. module.exports = function (context) {
  280. var core = require('./core.js');
  281. return factory(context, core);
  282. };
  283. } else {
  284. context.$ = factory(context, context._);
  285. }
  286. }(this, function (context, _) {
  287. 'use strict';
  288. var window = context.window;
  289. var document = window.document;
  290. var DomNotFoundError = _.AdsBypasserError.extend({
  291. name: 'DomNotFoundError',
  292. constructor: function (selector) {
  293. DomNotFoundError.super.constructor.call(this, _.T('`{0}` not found')(selector));
  294. },
  295. });
  296. var $ = function (selector, context) {
  297. if (!context || !context.querySelector) {
  298. context = document;
  299. }
  300. var n = context.querySelector(selector);
  301. if (!n) {
  302. throw new DomNotFoundError(selector);
  303. }
  304. return n;
  305. };
  306. $.$ = function (selector, context) {
  307. try {
  308. return $(selector, context);
  309. } catch (e) {
  310. return null;
  311. }
  312. };
  313. $.$$ = function (selector, context) {
  314. if (!context || !context.querySelectorAll) {
  315. context = document;
  316. }
  317. var ns = context.querySelectorAll(selector);
  318. return _.C(ns);
  319. };
  320. $.toDOM = function(rawHTML) {
  321. try {
  322. var parser = new DOMParser();
  323. var DOMHTML = parser.parseFromString(rawHTML, "text/html");
  324. return DOMHTML;
  325. } catch (e) {
  326. throw new _.AdsBypasserError('could not parse HTML to DOM');
  327. }
  328. };
  329. $.removeNodes = function (selector, context) {
  330. $.$$(selector, context).each(function (e) {
  331. e.parentNode.removeChild(e);
  332. });
  333. };
  334. function searchScriptsByRegExp (pattern, context) {
  335. var m = $.$$('script', context).find(function (s) {
  336. var m = s.innerHTML.match(pattern);
  337. if (!m) {
  338. return _.none;
  339. }
  340. return m;
  341. });
  342. if (!m) {
  343. return null;
  344. }
  345. return m.payload;
  346. }
  347. function searchScriptsByString (pattern, context) {
  348. var m = $.$$('script', context).find(function (s) {
  349. var m = s.innerHTML.indexOf(pattern);
  350. if (m < 0) {
  351. return _.none;
  352. }
  353. return m;
  354. });
  355. if (!m) {
  356. return null;
  357. }
  358. return m.value.innerHTML;
  359. }
  360. $.searchScripts = function (pattern, context) {
  361. if (pattern instanceof RegExp) {
  362. return searchScriptsByRegExp(pattern, context);
  363. } else if (_.isString(pattern)) {
  364. return searchScriptsByString(pattern, context);
  365. } else {
  366. return null;
  367. }
  368. };
  369. return $;
  370. }));
  371. (function (context, factory) {
  372. if (typeof module === 'object' && typeof module.exports === 'object') {
  373. module.exports = function (context, GM) {
  374. var core = require('./core.js');
  375. return factory(context, GM, core);
  376. };
  377. } else {
  378. factory(context, {
  379. xmlhttpRequest: GM_xmlhttpRequest,
  380. }, context._);
  381. }
  382. }(this, function (context, GM, _) {
  383. 'use strict';
  384. var window = context.window;
  385. var document = window.document;
  386. var $ = context.$ || {};
  387. function deepJoin (prefix, object) {
  388. return _.C(object).map(function (v, k) {
  389. var key = _.T('{0}[{1}]')(prefix, k);
  390. if (typeof v === 'object') {
  391. return deepJoin(key, v);
  392. }
  393. return _.T('{0}={1}').apply(this, [key, v].map(encodeURIComponent));
  394. }).join('&');
  395. }
  396. function toQuery (data) {
  397. var type = typeof data;
  398. if (data === null || (type !== 'string' && type !== 'object')) {
  399. return '';
  400. }
  401. if (type === 'string') {
  402. return data;
  403. }
  404. if (data instanceof String) {
  405. return data.toString();
  406. }
  407. return _.C(data).map(function (v, k) {
  408. if (typeof v === 'object') {
  409. return deepJoin(k, v);
  410. }
  411. return _.T('{0}={1}').apply(this, [k, v].map(encodeURIComponent));
  412. }).join('&');
  413. }
  414. function ajax (method, url, data, headers) {
  415. var l = document.createElement('a');
  416. l.href = url;
  417. var reqHost = l.hostname;
  418. var overrideHeaders = {
  419. Host: reqHost || window.location.host,
  420. Origin: window.location.origin,
  421. Referer: window.location.href,
  422. 'X-Requested-With': 'XMLHttpRequest',
  423. };
  424. _.C(overrideHeaders).each(function (v, k, c) {
  425. if (headers[k] === _.none) {
  426. delete headers[k];
  427. } else {
  428. headers[k] = v;
  429. }
  430. });
  431. if (data) {
  432. if (headers['Content-Type'].indexOf('json') >= 0) {
  433. data = JSON.stringify(data);
  434. } else {
  435. data = toQuery(data);
  436. }
  437. headers['Content-Length'] = data.length;
  438. }
  439. var xhr = null;
  440. var promise = _.D(function (resolve, reject) {
  441. xhr = GM.xmlhttpRequest({
  442. method: method,
  443. url: url,
  444. data: data,
  445. headers: headers,
  446. onload: function (response) {
  447. response = (typeof response.responseText !== 'undefined') ? response : this;
  448. if (response.status !== 200) {
  449. reject(response.responseText);
  450. } else {
  451. resolve(response.responseText);
  452. }
  453. },
  454. onerror: function (response) {
  455. response = (typeof response.responseText !== 'undefined') ? response : this;
  456. reject(response.responseText);
  457. },
  458. });
  459. });
  460. promise.abort = function () {
  461. xhr.abort();
  462. };
  463. return promise;
  464. }
  465. $.get = function (url, data, headers) {
  466. data = toQuery(data);
  467. data = data ? '?' + data : '';
  468. headers = headers || {};
  469. return ajax('GET', url + data, '', headers);
  470. };
  471. $.post = function (url, data, headers) {
  472. var h = {
  473. 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
  474. };
  475. if (headers) {
  476. _.C(headers).each(function (v, k) {
  477. h[k] = v;
  478. });
  479. }
  480. return ajax('POST', url, data, h);
  481. };
  482. return $;
  483. }));
  484. (function (context, factory) {
  485. if (typeof module === 'object' && typeof module.exports === 'object') {
  486. module.exports = function (context) {
  487. var core = require('./core.js');
  488. return factory(context, core);
  489. };
  490. } else {
  491. factory(context, context._);
  492. }
  493. }(this, function (context, _) {
  494. 'use strict';
  495. var window = context.window;
  496. var document = window.document;
  497. var $ = context.$ || {};
  498. $.setCookie = function (key, value) {
  499. var now = new Date();
  500. now.setTime(now.getTime() + 3600 * 1000);
  501. var tpl = _.T('{0}={1};path={2};');
  502. document.cookie = tpl(key, value, window.location.pathname, now.toUTCString());
  503. };
  504. $.getCookie = function (key) {
  505. var c = _.C(document.cookie.split(';')).find(function (v) {
  506. var k = v.replace(/^\s*([a-zA-Z0-9-_]+)=.+$/, '$1');
  507. if (k !== key) {
  508. return _.none;
  509. }
  510. });
  511. if (!c) {
  512. return null;
  513. }
  514. c = c.value.replace(/^\s*[a-zA-Z0-9-_]+=([^;]+).?$/, '$1');
  515. if (!c) {
  516. return null;
  517. }
  518. return c;
  519. };
  520. $.resetCookies = function () {
  521. var a = document.domain;
  522. var b = document.domain.replace(/^www\./, '');
  523. var c = document.domain.replace(/^(\w+\.)+?(\w+\.\w+)$/, '$2');
  524. var d = (new Date(1e3)).toUTCString();
  525. _.C(document.cookie.split(';')).each(function (v) {
  526. var k = v.replace(/^\s*(\w+)=.+$/, '$1');
  527. document.cookie = _.T('{0}=;expires={1};')(k, d);
  528. document.cookie = _.T('{0}=;path=/;expires={1};')(k, d);
  529. var e = _.T('{0}=;path=/;domain={1};expires={2};');
  530. document.cookie = e(k, a, d);
  531. document.cookie = e(k, b, d);
  532. document.cookie = e(k, c, d);
  533. });
  534. };
  535. return $;
  536. }));
  537. (function (context, factory) {
  538. if (typeof module === 'object' && typeof module.exports === 'object') {
  539. module.exports = function (context) {
  540. var core = require('./core.js');
  541. return factory(context, core);
  542. };
  543. } else {
  544. factory(context, context._);
  545. }
  546. }(this, function (context, _) {
  547. 'use strict';
  548. var window = context.window;
  549. var document = window.document;
  550. var $ = context.$ || {};
  551. var patterns = [];
  552. $.register = function (pattern) {
  553. patterns.push(pattern);
  554. };
  555. function dispatchByObject (rule, url_6) {
  556. var matched = {};
  557. var passed = _.C(rule).all(function (pattern, part) {
  558. if (pattern instanceof RegExp) {
  559. matched[part] = url_6[part].match(pattern);
  560. } else if (pattern instanceof Array) {
  561. var r = _.C(pattern).find(function (p) {
  562. var m = url_6[part].match(p);
  563. return m || _.none;
  564. });
  565. matched[part] = r ? r.payload : null;
  566. }
  567. return !!matched[part];
  568. });
  569. return passed ? matched : null;
  570. }
  571. function dispatchByRegExp (rule, url_1) {
  572. return url_1.match(rule);
  573. }
  574. function dispatchByArray (byLocation, rules, url_1, url_3, url_6) {
  575. var tmp = _.C(rules).find(function (rule) {
  576. var m = dispatch(byLocation, rule, url_1, url_3, url_6);
  577. if (!m) {
  578. return _.none;
  579. }
  580. return m;
  581. });
  582. return tmp ? tmp.payload : null;
  583. }
  584. function dispatchByString (rule, url_3) {
  585. var scheme = /\*|https?|file|ftp|chrome-extension/;
  586. var host = /\*|(\*\.)?([^\/*]+)/;
  587. var path = /\/.*/;
  588. var up = new RegExp(_.T('^({scheme})://({host})?({path})$')({
  589. scheme: scheme.source,
  590. host: host.source,
  591. path: path.source,
  592. }));
  593. var matched = rule.match(up);
  594. if (!matched) {
  595. return null;
  596. }
  597. scheme = matched[1];
  598. host = matched[2];
  599. var wc = matched[3];
  600. var sd = matched[4];
  601. path = matched[5];
  602. if (scheme === '*' && !/https?/.test(url_3.scheme)) {
  603. return null;
  604. } else if (scheme !== url_3.scheme) {
  605. return null;
  606. }
  607. if (scheme !== 'file' && host !== '*') {
  608. if (wc) {
  609. up = url_3.host.indexOf(sd);
  610. if (up < 0 || up + sd.length !== url_3.host.length) {
  611. return null;
  612. }
  613. } else if (host !== url_3.host) {
  614. return null;
  615. }
  616. }
  617. path = new RegExp(_.T('^{0}$')(path.replace(/[*.\[\]?+#]/g, function (c) {
  618. if (c === '*') {
  619. return '.*';
  620. }
  621. return '\\' + c;
  622. })));
  623. if (!path.test(url_3.path)) {
  624. return null;
  625. }
  626. return url_3;
  627. }
  628. function dispatchByFunction (rule, url_1, url_3, url_6) {
  629. return rule(url_1, url_3, url_6);
  630. }
  631. function dispatch (byLocation, rule, url_1, url_3, url_6) {
  632. if (rule instanceof Array) {
  633. return dispatchByArray(byLocation, rule, url_1, url_3, url_6);
  634. }
  635. if (typeof rule === 'function') {
  636. if (byLocation) {
  637. return null;
  638. }
  639. return dispatchByFunction(rule, url_1, url_3, url_6);
  640. }
  641. if (rule instanceof RegExp) {
  642. return dispatchByRegExp(rule, url_1);
  643. }
  644. if (_.isString(rule)) {
  645. return dispatchByString(rule, url_3);
  646. }
  647. return dispatchByObject(rule, url_6);
  648. }
  649. $._findHandler = function (byLocation) {
  650. var url_1 = window.location.toString();
  651. var url_3 = {
  652. scheme: window.location.protocol.slice(0, -1),
  653. host: window.location.host,
  654. path: window.location.pathname + window.location.search + window.location.hash,
  655. };
  656. var url_6 = {
  657. scheme: window.location.protocol,
  658. host: window.location.hostname,
  659. port: window.location.port,
  660. path: window.location.pathname,
  661. query: window.location.search,
  662. hash: window.location.hash,
  663. };
  664. var pattern = _.C(patterns).find(function (pattern) {
  665. var m = dispatch(byLocation, pattern.rule, url_1, url_3, url_6);
  666. if (!m) {
  667. return _.none;
  668. }
  669. return m;
  670. });
  671. if (!pattern) {
  672. return null;
  673. }
  674. var matched = pattern.payload;
  675. pattern = pattern.value;
  676. if (!pattern.start && !pattern.ready) {
  677. return null;
  678. }
  679. return {
  680. start: pattern.start ? _.P(pattern.start, matched) : _.nop,
  681. ready: pattern.ready ? _.P(pattern.ready, matched) : _.nop,
  682. };
  683. };
  684. return $;
  685. }));
  686. (function (context, factory) {
  687. if (typeof module === 'object' && typeof module.exports === 'object') {
  688. module.exports = function (context) {
  689. var core = require('./core.js');
  690. return factory(context, core);
  691. };
  692. } else {
  693. factory(context, context._);
  694. }
  695. }(this, function (context, _) {
  696. 'use strict';
  697. var window = context.window;
  698. var document = window.document;
  699. var $ = context.$ || {};
  700. function prepare (e) {
  701. if (!document.body) {
  702. document.body = document.createElement('body');
  703. }
  704. document.body.appendChild(e);
  705. return _.wait(0);
  706. }
  707. function get (url) {
  708. var a = document.createElement('a');
  709. a.href = url;
  710. var clicked = false;
  711. a.addEventListener('click', function (event) {
  712. event.stopPropagation();
  713. clicked = true;
  714. });
  715. prepare(a).then(() => {
  716. a.click();
  717. var tick = setInterval(function () {
  718. if (clicked) {
  719. _.info('already clicked');
  720. clearInterval(tick);
  721. return;
  722. }
  723. _.info('try again');
  724. a.click();
  725. }, 50);
  726. });
  727. }
  728. function post (path, params) {
  729. params = params || {};
  730. var form = document.createElement('form');
  731. form.method = 'post';
  732. form.action = path;
  733. _.C(params).each(function (value, key) {
  734. var input = document.createElement('input');
  735. input.type = 'hidden';
  736. input.name = key;
  737. input.value = value;
  738. form.appendChild(input);
  739. });
  740. prepare(form);
  741. form.submit();
  742. }
  743. $.openLink = function (to, options) {
  744. if (!_.isString(to) && !to) {
  745. _.warn('false URL');
  746. return;
  747. }
  748. options = options || {};
  749. var withReferer = typeof options.referer === 'undefined' ? true : options.referer;
  750. var postData = options.post;
  751. var from = window.location.toString();
  752. _.info(_.T('{0} -> {1}')(from, to));
  753. if (postData) {
  754. post(to, postData);
  755. return;
  756. }
  757. if (withReferer) {
  758. get(to);
  759. return;
  760. }
  761. window.top.location.replace(to);
  762. };
  763. return $;
  764. }));
  765. (function (context, factory) {
  766. if (typeof module === 'object' && typeof module.exports === 'object') {
  767. module.exports = function (context) {
  768. var core = require('./core.js');
  769. var ajax = require('./ajax.js');
  770. var $ = ajax(context);
  771. return factory(context, core, $);
  772. };
  773. } else {
  774. factory(context, context._, context.$);
  775. }
  776. }(this, function (context, _, $) {
  777. 'use strict';
  778. var window = context.window;
  779. var unsafeWindow = context.unsafeWindow || (0, eval)('this').window;
  780. var document = window.document;
  781. $.removeAllTimer = function () {
  782. var handle = window.setInterval(_.nop, 10);
  783. while (handle > 0) {
  784. window.clearInterval(handle--);
  785. }
  786. handle = window.setTimeout(_.nop, 10);
  787. while (handle > 0) {
  788. window.clearTimeout(handle--);
  789. }
  790. };
  791. $.nuke = function (url) {
  792. try {
  793. $.window.document.write('nuked by AdsBypasser, leading to ...<br/>');
  794. } catch (e) {
  795. _.warn('nuke failed', e);
  796. }
  797. var a = document.createElement('a');
  798. a.href = url;
  799. a.textContent = url;
  800. document.body.appendChild(a);
  801. };
  802. $.generateRandomIP = function () {
  803. return [0,0,0,0].map(function () {
  804. return Math.floor(Math.random() * 256);
  805. }).join('.');
  806. };
  807. $.captcha = function (imgSrc, cb) {
  808. if (!$.config.externalServerSupport) {
  809. return;
  810. }
  811. var a = document.createElement('canvas');
  812. var b = a.getContext('2d');
  813. var c = new Image();
  814. c.src = imgSrc;
  815. c.onload = function () {
  816. a.width = c.width;
  817. a.height = c.height;
  818. b.drawImage(c, 0, 0);
  819. var d = a.toDataURL();
  820. var e = d.substr(d.indexOf(',') + 1);
  821. $.post('http://www.wcpan.info/cgi-bin/captcha.cgi', {
  822. i: e,
  823. }, cb);
  824. };
  825. };
  826. function clone (safe) {
  827. if (safe === null || !(safe instanceof Object)) {
  828. return safe;
  829. }
  830. if (safe instanceof String) {
  831. return safe.toString();
  832. }
  833. if (safe instanceof Function) {
  834. return exportFunction(safe, unsafeWindow, {
  835. allowCrossOriginArguments: true,
  836. });
  837. }
  838. if (safe instanceof Array) {
  839. var unsafe = new unsafeWindow.Array();
  840. for (var i = 0; i < safe.length; ++i) {
  841. unsafe.push(clone(safe[i]));
  842. }
  843. return unsafe;
  844. }
  845. var unsafe = new unsafeWindow.Object();
  846. _.C(safe).each(function (v, k) {
  847. unsafe[k] = clone(v);
  848. });
  849. return unsafe;
  850. }
  851. var MAGIC_KEY = '__adsbypasser_reverse_proxy__';
  852. $.window = (function () {
  853. var isFirefox = typeof InstallTrigger !== 'undefined';
  854. if (!isFirefox) {
  855. return unsafeWindow;
  856. }
  857. var decorator = {
  858. set: function (target, key, value) {
  859. if (key === MAGIC_KEY) {
  860. return false;
  861. }
  862. if (target === unsafeWindow && key === 'open') {
  863. var d = Object.getOwnPropertyDescriptor(target, key);
  864. d.value = clone(value);
  865. Object.defineProperty(target, key, d);
  866. } else {
  867. target[key] = clone(value);
  868. }
  869. return true;
  870. },
  871. get: function (target, key) {
  872. if (key === MAGIC_KEY) {
  873. return target;
  874. }
  875. var value = target[key];
  876. var type = typeof value;
  877. if (value === null || (type !== 'function' && type !== 'object')) {
  878. return value;
  879. }
  880. return new Proxy(value, decorator);
  881. },
  882. apply: function (target, self, args) {
  883. args = Array.prototype.slice.call(args);
  884. if (target === unsafeWindow.Object.defineProperty) {
  885. args[0] = args[0][MAGIC_KEY];
  886. }
  887. if (target === unsafeWindow.Function.apply) {
  888. self = self[MAGIC_KEY];
  889. args[1] = Array.prototype.slice.call(args[1]);
  890. }
  891. if (target === unsafeWindow.document.querySelector) {
  892. self = self[MAGIC_KEY];
  893. }
  894. if (target === unsafeWindow.document.write) {
  895. self = self[MAGIC_KEY];
  896. }
  897. var usargs = clone(args);
  898. return target.apply(self, usargs);
  899. },
  900. construct: function (target, args) {
  901. args = Array.prototype.slice.call(args);
  902. args.unshift(undefined);
  903. var usargs = clone(args);
  904. var bind = unsafeWindow.Function.prototype.bind;
  905. return new (bind.apply(target, usargs));
  906. },
  907. };
  908. return new Proxy(unsafeWindow, decorator);
  909. })();
  910. return $;
  911. }));
  912. (function (context, factory) {
  913. if (typeof module === 'object' && typeof module.exports === 'object') {
  914. module.exports = function (context, GM) {
  915. var _ = require('lodash');
  916. var core = require('./core.js');
  917. var misc = require('./misc.js');
  918. var dispatcher = require('./dispatcher.js');
  919. var modules = [misc, dispatcher].map(function (v) {
  920. return v.call(null, context, GM);
  921. });
  922. var $ = _.assign.apply(null, modules);
  923. return factory(context, GM, core, $);
  924. };
  925. } else {
  926. factory(context, {
  927. getValue: GM_getValue,
  928. setValue: GM_setValue,
  929. }, context._, context.$);
  930. }
  931. }(this, function (context, GM, _, $) {
  932. 'use strict';
  933. var MANIFEST = [
  934. {
  935. name: 'version',
  936. key: 'version',
  937. default_: 0,
  938. verify: function (v) {
  939. return typeof v === 'number' && v >= 0;
  940. },
  941. normalize: toNumber,
  942. },
  943. {
  944. name: 'alignCenter',
  945. key: 'align_center',
  946. default_: true,
  947. verify: isBoolean,
  948. normalize: toBoolean,
  949. },
  950. {
  951. name: 'changeBackground',
  952. key: 'change_background',
  953. default_: true,
  954. verify: isBoolean,
  955. normalize: toBoolean,
  956. },
  957. {
  958. name: 'externalServerSupport',
  959. key: 'external_server_support',
  960. default_: false,
  961. verify: isBoolean,
  962. normalize: toBoolean,
  963. },
  964. {
  965. name: 'redirectImage',
  966. key: 'redirect_image',
  967. default_: true,
  968. verify: isBoolean,
  969. normalize: toBoolean,
  970. },
  971. {
  972. name: 'scaleImage',
  973. key: 'scale_image',
  974. default_: true,
  975. verify: isBoolean,
  976. normalize: toBoolean,
  977. },
  978. {
  979. name: 'logLevel',
  980. key: 'log_level',
  981. default_: 1,
  982. verify: function (v) {
  983. return typeof v === 'number' && v >= 0 && v <= 2;
  984. },
  985. normalize: toNumber,
  986. },
  987. ];
  988. var PATCHES = [
  989. function (c) {
  990. var ac = typeof c.alignCenter === 'boolean';
  991. if (typeof c.changeBackground !== 'boolean') {
  992. c.changeBackground = ac ? c.alignCenter : true;
  993. }
  994. if (typeof c.scaleImage !== 'boolean') {
  995. c.scaleImage = ac ? c.alignCenter : true;
  996. }
  997. if (!ac) {
  998. c.alignCenter = true;
  999. }
  1000. if (typeof c.redirectImage !== 'boolean') {
  1001. c.redirectImage = true;
  1002. }
  1003. },
  1004. function (c) {
  1005. if (typeof c.externalServerSupport !== 'boolean') {
  1006. c.externalServerSupport = false;
  1007. }
  1008. },
  1009. function (c) {
  1010. if (typeof c.logLevel !== 'number') {
  1011. c.logLevel = 1;
  1012. }
  1013. },
  1014. ];
  1015. var window = context.window;
  1016. function isBoolean (v) {
  1017. return typeof v === 'boolean';
  1018. }
  1019. function toBoolean (v) {
  1020. return !!v;
  1021. }
  1022. function toNumber (v) {
  1023. return parseInt(v, 10);
  1024. }
  1025. function createConfig () {
  1026. var c = {};
  1027. _.C(MANIFEST).each(function (m) {
  1028. Object.defineProperty(c, m.name, {
  1029. configurable: true,
  1030. enumerable: true,
  1031. get: function () {
  1032. return GM.getValue(m.key, m.default_);
  1033. },
  1034. set: function (v) {
  1035. GM.setValue(m.key, v);
  1036. },
  1037. });
  1038. });
  1039. return c;
  1040. }
  1041. function senityCheck (c) {
  1042. var ok = _.C(MANIFEST).all(function (m) {
  1043. return m.verify(c[m.name]);
  1044. });
  1045. if (!ok) {
  1046. c.version = 0;
  1047. }
  1048. return c;
  1049. }
  1050. function migrate (c) {
  1051. if (typeof c.version !== 'number' || c.version < 0) {
  1052. throw new _.AdsBypasserError('wrong config version: ' + c.version);
  1053. }
  1054. while (c.version < PATCHES.length) {
  1055. PATCHES[c.version](c);
  1056. ++c.version;
  1057. }
  1058. return c;
  1059. }
  1060. $.config = migrate(senityCheck(createConfig()));
  1061. $.register({
  1062. rule: {
  1063. host: /^adsbypasser\.github\.io$/,
  1064. path: /^\/configure\.html$/,
  1065. },
  1066. ready: function () {
  1067. $.window.commit = function (data) {
  1068. data.version = $.config.version;
  1069. _.C(data).each(function (v, k) {
  1070. $.config[k] = v;
  1071. });
  1072. };
  1073. $.window.render({
  1074. version: $.config.version,
  1075. options: {
  1076. alignCenter: {
  1077. type: 'checkbox',
  1078. value: $.config.alignCenter,
  1079. label: 'Align Center',
  1080. help: 'Align image to the center if possible. (default: enabled)',
  1081. },
  1082. changeBackground: {
  1083. type: 'checkbox',
  1084. value: $.config.changeBackground,
  1085. label: 'Change Background',
  1086. help: 'Use Firefox-like image background if possible. (default: enabled)',
  1087. },
  1088. redirectImage: {
  1089. type: 'checkbox',
  1090. value: $.config.redirectImage,
  1091. label: 'Redirect Image',
  1092. help: [
  1093. 'Directly open image link if possible. (default: enabled)',
  1094. 'If disabled, redirection will only works on link shortener sites.',
  1095. ].join('<br/>\n'),
  1096. },
  1097. scaleImage: {
  1098. type: 'checkbox',
  1099. value: $.config.scaleImage,
  1100. label: 'Scale Image',
  1101. help: 'When image loaded, scale it to fit window if possible. (default: enabled)',
  1102. },
  1103. externalServerSupport: {
  1104. type: 'checkbox',
  1105. value: $.config.externalServerSupport,
  1106. label: 'External Server Support',
  1107. help: [
  1108. 'Send URL information to external server to enhance features (e.g.: captcha resolving). (default: disabled)',
  1109. 'Affected sites:',
  1110. 'setlinks.us (captcha)',
  1111. ].join('<br/>\n'),
  1112. },
  1113. logLevel: {
  1114. type: 'select',
  1115. value: $.config.logLevel,
  1116. menu: [
  1117. [0, '0 (quiet)'],
  1118. [1, '1 (default)'],
  1119. [2, '2 (verbose)'],
  1120. ],
  1121. label: 'Log Level',
  1122. help: [
  1123. 'Log level in developer console. (default: 1)',
  1124. '0 will not print anything in console.',
  1125. '1 will only print logs on affected sites.',
  1126. '2 will print on any sites.',
  1127. ].join('<br/>\n'),
  1128. },
  1129. },
  1130. });
  1131. },
  1132. });
  1133. return $;
  1134. }));
  1135. $.register({
  1136. rule: {
  1137. host: /^01\.nl$/,
  1138. },
  1139. ready: function () {
  1140. 'use strict';
  1141. var f = $('iframe#redirectframe');
  1142. $.openLink(f.src);
  1143. },
  1144. });
  1145. $.register({
  1146. rule: {
  1147. host: /^(www\.)?1be\.biz$/,
  1148. path: /^\/s\.php$/,
  1149. query: /^\?(.+)/,
  1150. },
  1151. start: function (m) {
  1152. 'use strict';
  1153. $.openLink(m.query[1]);
  1154. },
  1155. });
  1156. $.register({
  1157. rule: {
  1158. host: /^(www\.)?1tiny\.net$/,
  1159. path: /\/\w+/
  1160. },
  1161. ready: function () {
  1162. 'use strict';
  1163. var directUrl = $.searchScripts(/window\.location='([^']+)';/);
  1164. if (!directUrl) {
  1165. throw new _.AdsBypasserError('script content changed');
  1166. }
  1167. $.openLink(directUrl[1]);
  1168. },
  1169. });
  1170. $.register({
  1171. rule: {
  1172. host: /^2ty\.cc$/,
  1173. path: /^\/.+/,
  1174. },
  1175. ready: function () {
  1176. 'use strict';
  1177. $.removeNodes('iframe');
  1178. var a = $('#close');
  1179. $.openLink(a.href);
  1180. },
  1181. });
  1182. $.register({
  1183. rule: {
  1184. host: /^(www\.)?3ra\.be$/,
  1185. },
  1186. ready: function () {
  1187. 'use strict';
  1188. $.removeNodes('iframe');
  1189. var f = $.window.fc;
  1190. if (!f) {
  1191. throw new _.AdsBypasserError('window.fc is undefined');
  1192. }
  1193. f = f.toString();
  1194. f = f.match(/href="([^"]*)/);
  1195. if (!f) {
  1196. throw new _.AdsBypasserError('url pattern outdated');
  1197. }
  1198. $.openLink(f[1]);
  1199. },
  1200. });
  1201. $.register({
  1202. rule: {
  1203. host: /^(www\.)?4fun\.tw$/,
  1204. },
  1205. ready: function () {
  1206. 'use strict';
  1207. var i = $('#original_url');
  1208. $.openLink(i.value);
  1209. },
  1210. });
  1211. $.register({
  1212. rule: {
  1213. host: /^ad2links\.com$/,
  1214. path: /^\/\w-.+$/,
  1215. },
  1216. ready: function () {
  1217. 'use strict';
  1218. $.removeNodes('iframe');
  1219. $.openLinkByPost(window.location.toString(), {
  1220. post: {
  1221. image: 'Skip Ad.',
  1222. },
  1223. });
  1224. },
  1225. });
  1226. $.register({
  1227. rule: {
  1228. host: /^ad4\.fr$/,
  1229. },
  1230. ready: function () {
  1231. 'use strict';
  1232. $.removeNodes('iframe');
  1233. var s = $.searchScripts(/"src", "([^"]+)"/);
  1234. if (!s) {
  1235. _.warn('changed');
  1236. return;
  1237. }
  1238. $.openLink(s[1]);
  1239. },
  1240. });
  1241. (function () {
  1242. 'use strict';
  1243. $.register({
  1244. rule: {
  1245. host: /^ad7.biz$/,
  1246. path: /^\/\d+\/(.*)$/,
  1247. },
  1248. start: function (m) {
  1249. $.removeNodes('iframe');
  1250. var redirectLink = m.path[1];
  1251. if (!redirectLink.match(/^https?:\/\//)) {
  1252. redirectLink = "http://" + redirectLink;
  1253. }
  1254. $.openLink(redirectLink);
  1255. },
  1256. });
  1257. $.register({
  1258. rule: {
  1259. host: /^ad7.biz$/,
  1260. path: /^\/\w+$/,
  1261. },
  1262. ready: function () {
  1263. $.removeNodes('iframe');
  1264. var script = $.searchScripts('var r_url');
  1265. var url = script.match(/&url=([^&]+)/);
  1266. url = url[1];
  1267. $.openLink(url);
  1268. },
  1269. });
  1270. })();
  1271. $.register({
  1272. rule: {
  1273. host: [
  1274. /^(www\.)?adb\.ug$/,
  1275. /^(www\.)?lynk\.my$/,
  1276. /^adyou\.me$/,
  1277. ],
  1278. path: /^(?!\/(?:privacy|terms|contact(\/.*)?|#.*)?$).*$/
  1279. },
  1280. ready: function () {
  1281. 'use strict';
  1282. $.removeNodes('iframe');
  1283. var m = $.searchScripts(/top\.location\.href="([^"]+)"/);
  1284. if (m) {
  1285. $.openLink(m[1]);
  1286. return;
  1287. }
  1288. m = $.searchScripts(/\{\s*_args[^}]+\}\s+\}/);
  1289. if (!m) {
  1290. throw new _.AdsBypasserError('script content changed');
  1291. }
  1292. m = eval('(' + m[0] + ')');
  1293. var url = window.location.pathname + '/skip_timer';
  1294. var i = setInterval(function () {
  1295. $.post(url, m).then(function (text) {
  1296. var jj = _.parseJSON(text);
  1297. if (!jj.errors && jj.messages) {
  1298. clearInterval(i);
  1299. $.openLink(jj.messages.url);
  1300. }
  1301. });
  1302. }, 1000);
  1303. },
  1304. });
  1305. (function () {
  1306. 'use strict';
  1307. function getTokenFromRocketScript () {
  1308. var a = $.searchScripts(/var eu = '(?!false)(.*)'/);
  1309. return a ? a[1] : null;
  1310. }
  1311. $.register({
  1312. rule: {
  1313. host: /^adf\.ly$/,
  1314. path: /^\/redirecting\/(.+)$/,
  1315. },
  1316. start: function (m) {
  1317. var url = atob(m.path[1]);
  1318. $.openLink(url);
  1319. },
  1320. });
  1321. $.register({
  1322. rule: {
  1323. path: /\/locked$/,
  1324. query: /url=([^&]+)/,
  1325. },
  1326. start: function (m) {
  1327. $.resetCookies();
  1328. var url = decodeURIComponent(m.query[1]);
  1329. if (url.match(/^http/)) {
  1330. $.openLink(url);
  1331. } else {
  1332. $.openLink('/' + url);
  1333. }
  1334. },
  1335. });
  1336. $.register({
  1337. rule: [
  1338. 'http://u.shareme.in/*',
  1339. 'http://server.sbenny.com/*',
  1340. function () {
  1341. var h = $.$('html[id="main_html"]');
  1342. var b = $.$('body[id="home"]');
  1343. if (h && b) {
  1344. return true;
  1345. } else {
  1346. return null;
  1347. }
  1348. },
  1349. ],
  1350. start: function () {
  1351. $.window.document.write = _.nop;
  1352. $.window.btoa = _.nop;
  1353. },
  1354. ready: function () {
  1355. var h = $.$('#main_html'), b = $.$('#home');
  1356. if (!h || !b || h.nodeName !== 'HTML' || b.nodeName !== 'BODY') {
  1357. return;
  1358. }
  1359. $.removeNodes('iframe');
  1360. $.window.cookieCheck = _.nop;
  1361. h = getTokenFromRocketScript();
  1362. if (!h) {
  1363. h = $('#adfly_bar');
  1364. $.window.close_bar();
  1365. return;
  1366. }
  1367. var a = h.indexOf('!HiTommy');
  1368. if (a >= 0) {
  1369. h = h.substring(0, a);
  1370. }
  1371. a = '';
  1372. b = '';
  1373. for (var i = 0; i < h.length; ++i) {
  1374. if (i % 2 === 0) {
  1375. a = a + h.charAt(i);
  1376. } else {
  1377. b = h.charAt(i) + b;
  1378. }
  1379. }
  1380. h = atob(a + b);
  1381. h = h.substr(2);
  1382. if (location.hash) {
  1383. h += location.hash;
  1384. }
  1385. $.openLink(h);
  1386. },
  1387. });
  1388. })();
  1389. $.register({
  1390. rule: {
  1391. host: /^(www\.)?adfe\.es$/,
  1392. path: /^\/\w+$/,
  1393. },
  1394. ready: function () {
  1395. 'use strict';
  1396. var f = $('#frmvideo');
  1397. if (!f.STEP4) {
  1398. return;
  1399. }
  1400. f.submit();
  1401. },
  1402. });
  1403. $.register({
  1404. rule: 'http://adfoc.us/*',
  1405. ready: function () {
  1406. 'use strict';
  1407. var root = document.body;
  1408. var observer = new MutationObserver(function (mutations) {
  1409. var o = $.$('#showSkip');
  1410. if (o) {
  1411. observer.disconnect();
  1412. o = o.querySelector('a');
  1413. $.openLink(o.href);
  1414. }
  1415. });
  1416. observer.observe(root, {
  1417. childList: true,
  1418. subtree: true,
  1419. });
  1420. },
  1421. });
  1422. $.register({
  1423. rule: {
  1424. host: /^(www\.)?adjet\.biz$/,
  1425. },
  1426. ready: function () {
  1427. 'use strict';
  1428. var m = $.searchScripts(/href=(\S+)/);
  1429. if (!m) {
  1430. throw new _.AdsBypasserError('site changed');
  1431. }
  1432. $.openLink(m[1]);
  1433. },
  1434. });
  1435. $.register({
  1436. rule: {
  1437. host: [
  1438. /^adlink\.guru$/,
  1439. /^cypt\.ga$/,
  1440. ],
  1441. },
  1442. ready: function () {
  1443. 'use strict';
  1444. var f = $('#go-link');
  1445. var args = {};
  1446. $.$$('input', f).each(function (v) {
  1447. args[v.name] = v.value;
  1448. });
  1449. $.post(f.getAttribute('action'), args).then(function (data) {
  1450. data = JSON.parse(data);
  1451. if (data && data.url) {
  1452. $.openLink(data.url);
  1453. } else {
  1454. _.warn('wrong data');
  1455. }
  1456. }).catch(function (e) {
  1457. _.warn(e);
  1458. });
  1459. },
  1460. });
  1461. $.register({
  1462. rule: {
  1463. host: /^adlock\.org$/,
  1464. },
  1465. ready: function () {
  1466. 'use strict';
  1467. var a = $.$('#xre a.xxr, #downloadButton1');
  1468. if (a) {
  1469. $.openLink(a.href);
  1470. return;
  1471. }
  1472. a = $.window.fileLocation;
  1473. if (a) {
  1474. $.openLink(a);
  1475. }
  1476. },
  1477. });
  1478. $.register({
  1479. rule: {
  1480. host: /^(www\.)?adlot\.us$/,
  1481. },
  1482. ready: function () {
  1483. 'use strict';
  1484. $.removeNodes('iframe');
  1485. var script = $.searchScripts('form');
  1486. var p = /name='([^']+)' value='([^']+)'/g;
  1487. var opt = {
  1488. image: ' ',
  1489. };
  1490. var tmp = null;
  1491. while (tmp = p.exec(script)) {
  1492. opt[tmp[1]] = tmp[2];
  1493. }
  1494. $.openLink('', {
  1495. path: opt,
  1496. });
  1497. },
  1498. });
  1499. $.register({
  1500. rule: {
  1501. host: /^admy\.link$/,
  1502. },
  1503. ready: function () {
  1504. 'use strict';
  1505. var f = $('form.edit_link');
  1506. f.submit();
  1507. },
  1508. });
  1509. $.register({
  1510. rule: {
  1511. host: /^(www\.)?ah-informatique\.com$/,
  1512. path: /^\/ZipUrl/,
  1513. },
  1514. ready: function () {
  1515. 'use strict';
  1516. var a = $('#zip3 a');
  1517. $.openLink(a.href);
  1518. },
  1519. });
  1520. (function () {
  1521. 'use strict';
  1522. function decodeScript (encoded) {
  1523. var a = encoded.match(/^\s*;eval\((.+)\);\s*$/);
  1524. a = a[1];
  1525. var b = a.match(/^(.+)\('([^']+)','([^']+)','([^']+)','([^']+)'\)$/);
  1526. var c = eval('(' + b[1] + ')');
  1527. return c(b[2], b[3], b[4], b[5]);
  1528. }
  1529. $.register({
  1530. rule: {
  1531. host: /^ah\.pe$/,
  1532. },
  1533. ready: function () {
  1534. $.removeNodes('iframe');
  1535. var script = $.searchScripts('eval');
  1536. script = decodeScript(script);
  1537. script = decodeScript(script);
  1538. script = decodeScript(script);
  1539. var path = script.match(/'(g\/[^']+)'/);
  1540. path = path[1];
  1541. _.wait(3000).then(function () {
  1542. $.get(path).then(function (url) {
  1543. $.openLink(url);
  1544. });
  1545. });
  1546. },
  1547. });
  1548. })();
  1549. $.register({
  1550. rule: {
  1551. host: /^aka\.gr$/
  1552. },
  1553. ready: function () {
  1554. 'use strict';
  1555. var l = $('iframe#yourls-frame');
  1556. $.openLink(l.src);
  1557. },
  1558. });
  1559. $.register({
  1560. rule: {
  1561. host: /^al\.ly$/,
  1562. },
  1563. ready: function () {
  1564. 'use strict';
  1565. $.removeNodes('iframe, #CashSlideDiv, #ct_catfish');
  1566. var a = $('#modal-shadow');
  1567. a.style.display = 'block';
  1568. a = $('#modal-alert');
  1569. a.style.left = 0;
  1570. a.style.top = 80;
  1571. a.style.display = 'block';
  1572. },
  1573. });
  1574. $.register({
  1575. rule: {
  1576. host: /^(www\.)?allkeyshop\.com$/,
  1577. },
  1578. ready: function (m) {
  1579. 'use strict';
  1580. var matches = $.searchScripts(/window\.location\.href = "([^"]+)"/);
  1581. $.openLink(matches[1]);
  1582. $.removeAllTimer();
  1583. },
  1584. });
  1585. $.register({
  1586. rule: {
  1587. host: /^anonymbucks\.com$/,
  1588. },
  1589. ready: function () {
  1590. 'use strict';
  1591. var a = $('#boton-continuar');
  1592. a.click();
  1593. },
  1594. });
  1595. (function () {
  1596. 'use strict';
  1597. var ajaxPattern = /\$.post\('([^']*)'[^{]+(\{\s*opt:\s*'make_log'[^}]+\}\s*\}),/i;
  1598. $.register({
  1599. rule: {
  1600. host: [
  1601. /^bc\.vc$/,
  1602. /^linc\.ml$/,
  1603. ],
  1604. path: /^.+(https?:\/\/.+)$/,
  1605. },
  1606. start: function (m) {
  1607. $.openLink(m.path[1] + document.location.search + document.location.hash);
  1608. },
  1609. });
  1610. function decompress (script, unzip) {
  1611. if (!unzip) {
  1612. return script;
  1613. }
  1614. var matches = script.match(/eval(.*)/);
  1615. if (!matches) {
  1616. throw new _.AdsBypasserError('no script matches /eval(.*)/');
  1617. }
  1618. matches = matches[1];
  1619. script = eval(matches);
  1620. return script;
  1621. }
  1622. function searchScript (unzip) {
  1623. var content = $.searchScripts('make_log');
  1624. if (content) {
  1625. return {
  1626. direct: false,
  1627. script: decompress(content, unzip),
  1628. };
  1629. }
  1630. content = $.searchScripts('click_log');
  1631. if (content) {
  1632. return {
  1633. direct: true,
  1634. script: decompress(content, unzip),
  1635. };
  1636. }
  1637. throw _.AdsBypasserError('script changed');
  1638. }
  1639. function knockServer (script, dirtyFix) {
  1640. var matches = script.match(ajaxPattern);
  1641. if (!matches) {
  1642. throw new _.AdsBypasserError('(in knock server) no script matches $.post');
  1643. }
  1644. var make_url = matches[1];
  1645. var make_opts = eval('(' + matches[2] + ')');
  1646. var i = setInterval(function () {
  1647. $.post(make_url, make_opts).then(function (text) {
  1648. if (dirtyFix) {
  1649. text = text.match(/\{.+\}/)[0];
  1650. }
  1651. var jj = _.parseJSON(text);
  1652. if (jj.message) {
  1653. clearInterval(i);
  1654. $.openLink(jj.message.url);
  1655. }
  1656. });
  1657. }, 1000);
  1658. }
  1659. function knockServer2 (script) {
  1660. var post = $.window.$.post;
  1661. $.window.$.post = function (a, b, c) {
  1662. if (typeof c !== 'function') {
  1663. return;
  1664. }
  1665. setTimeout(function () {
  1666. var data = {
  1667. error: false,
  1668. message: {
  1669. url: '#',
  1670. },
  1671. };
  1672. c(JSON.stringify(data));
  1673. }, 1000);
  1674. };
  1675. var matches = script.match(ajaxPattern);
  1676. if (!matches) {
  1677. throw new _.AdsBypasserError('(in knock server 2) no script matches $.post');
  1678. }
  1679. var make_url = matches[1];
  1680. var tZ, cW, cH, sW, sH;
  1681. var make_opts = eval('(' + matches[2] + ')');
  1682. function makeLog () {
  1683. make_opts.opt = 'make_log';
  1684. post(make_url, make_opts, function (text) {
  1685. var data = _.parseJSON(text);
  1686. _.info('make_log', data);
  1687. if (!data.message) {
  1688. checksLog();
  1689. return;
  1690. }
  1691. $.openLink(data.message.url);
  1692. });
  1693. }
  1694. function checkLog () {
  1695. make_opts.opt = 'check_log';
  1696. post(make_url, make_opts, function (text) {
  1697. var data = _.parseJSON(text);
  1698. _.info('check_log', data);
  1699. if (!data.message) {
  1700. checkLog();
  1701. return;
  1702. }
  1703. makeLog();
  1704. });
  1705. }
  1706. function checksLog () {
  1707. make_opts.opt = 'checks_log';
  1708. post(make_url, make_opts, function () {
  1709. _.info('checks_log');
  1710. checkLog();
  1711. });
  1712. }
  1713. checksLog();
  1714. }
  1715. $.register({
  1716. rule: {
  1717. host: /^bc\.vc$/,
  1718. path: /^\/.+/,
  1719. },
  1720. ready: function () {
  1721. $.removeNodes('iframe');
  1722. var result = searchScript(false);
  1723. if (!result.direct) {
  1724. knockServer2(result.script);
  1725. } else {
  1726. result = result.script.match(/top\.location\.href = '([^']+)'/);
  1727. if (!result) {
  1728. throw new _.AdsBypasserError('script changed');
  1729. }
  1730. result = result[1];
  1731. $.openLink(result);
  1732. }
  1733. },
  1734. });
  1735. function run (dirtyFix) {
  1736. $.removeNodes('iframe');
  1737. var result = searchScript(true);
  1738. if (!result.direct) {
  1739. knockServer(result.script,dirtyFix);
  1740. } else {
  1741. result = result.script.match(/top\.location\.href='([^']+)'/);
  1742. if (!result) {
  1743. throw new _.AdsBypasserError('script changed');
  1744. }
  1745. result = result[1];
  1746. $.openLink(result);
  1747. }
  1748. }
  1749. $.register({
  1750. rule: {
  1751. host: /^adcrun\.ch$/,
  1752. path: /^\/\w+$/,
  1753. },
  1754. ready: function () {
  1755. $.removeNodes('.user_content');
  1756. var rSurveyLink = /http\.open\("GET", "api_ajax\.php\?sid=\d*&ip=[^&]*&longurl=([^"]+)" \+ first_time, (?:true|false)\);/;
  1757. var l = $.searchScripts(rSurveyLink);
  1758. if (l) {
  1759. $.openLink(l[1]);
  1760. return;
  1761. }
  1762. run(true);
  1763. },
  1764. });
  1765. $.register({
  1766. rule: {
  1767. host: [
  1768. /^1tk\.us$/,
  1769. /^gx\.si$/,
  1770. /^adwat\.ch$/,
  1771. /^(fly2url|urlwiz|xafox)\.com$/,
  1772. /^(zpoz|ultry)\.net$/,
  1773. /^(wwy|myam)\.me$/,
  1774. /^ssl\.gs$/,
  1775. /^hit\.us$/,
  1776. /^shortit\.in$/,
  1777. /^(adbla|tl7)\.us$/,
  1778. /^www\.adjet\.eu$/,
  1779. /^srk\.gs$/,
  1780. /^cun\.bz$/,
  1781. /^miniurl\.tk$/,
  1782. /^vizzy\.es$/,
  1783. /^kazan\.vc$/,
  1784. /^linkcash\.ml$/,
  1785. ],
  1786. path: /^\/.+/,
  1787. },
  1788. ready: run,
  1789. });
  1790. $.register({
  1791. rule: {
  1792. host: /^adtr\.im|ysear\.ch|xip\.ir$/,
  1793. path: /^\/.+/,
  1794. },
  1795. ready: function () {
  1796. var a = $.$('div.fly_head a.close');
  1797. var f = $.$('iframe.fly_frame');
  1798. if (a && f) {
  1799. $.openLink(f.src);
  1800. } else {
  1801. run();
  1802. }
  1803. },
  1804. });
  1805. $.register({
  1806. rule: {
  1807. host: /^ad5\.eu$/,
  1808. path: /^\/[^.]+$/,
  1809. },
  1810. ready: function() {
  1811. $.removeNodes('iframe');
  1812. var s = searchScript(true);
  1813. var m = s.script.match(/(<form name="form1"method="post".*(?!<\\form>)<\/form>)/);
  1814. if (!m) {return;}
  1815. m = m[1];
  1816. var tz = -(new Date().getTimezoneOffset()/60);
  1817. m = m.replace("'+timezone+'",tz);
  1818. var d = document.createElement('div');
  1819. d.setAttribute('id','AdsBypasserFTW');
  1820. d.setAttribute('style', 'display:none;');
  1821. d.innerHTML = m;
  1822. document.body.appendChild(d);
  1823. $('#AdsBypasserFTW > form[name=form1]').submit();
  1824. },
  1825. });
  1826. $.register({
  1827. rule: {
  1828. host: /^tr5\.in$/,
  1829. path: /^\/.+/,
  1830. },
  1831. ready: function () {
  1832. run(true);
  1833. },
  1834. });
  1835. })();
  1836. $.register({
  1837. rule: {
  1838. host: /^(www\.)?biglistofwebsites\.com$/,
  1839. path: /^\/go\/(\w+\.\w+)$/
  1840. },
  1841. start: function (m) {
  1842. 'use strict';
  1843. $.openLink('http://' + m.path[1]);
  1844. },
  1845. });
  1846. $.register({
  1847. rule: 'http://www.bild.me/bild.php?file=*',
  1848. ready: function () {
  1849. 'use strict';
  1850. var i = $('#Bild');
  1851. $.openLink(i.src);
  1852. },
  1853. });
  1854. $.register({
  1855. rule: 'http://bildr.no/view/*',
  1856. ready: function () {
  1857. 'use strict';
  1858. var i = $('img.bilde');
  1859. $.openLink(i.src);
  1860. },
  1861. });
  1862. $.register({
  1863. rule: {
  1864. host: /^(www\.)?([a-zA-Z0-9]+\.)?binbox\.io$/,
  1865. path: /\/o\/([a-zA-Z0-9]+)/,
  1866. },
  1867. start: function (m) {
  1868. 'use strict';
  1869. var direct_link = window.atob(m.path[1]);
  1870. $.openLink(direct_link);
  1871. },
  1872. });
  1873. $.register({
  1874. rule: {
  1875. host: /^(www\.)?boxcash\.net$/,
  1876. path: /^\/[\w~]+$/,
  1877. },
  1878. ready: function () {
  1879. 'use strict';
  1880. var m = $.searchScripts(/\'\/ajax_link\.php\',\s*\{key:\s*'(\w+)',\s*url:\s*'(\d+)',\s*t:\s*'(\d+)',\s*r:\s*'(\w*)'\}/);
  1881. if (!m) {
  1882. return;
  1883. }
  1884. $.post('/ajax_link.php', {
  1885. key: m[1],
  1886. url: m[2],
  1887. t: m[3],
  1888. r: m[4],
  1889. }).then(function (response) {
  1890. var l = response.match(/window(?:.top.window)\.location="([^"]+)"/);
  1891. $.openLink(l[1]);
  1892. });
  1893. },
  1894. });
  1895. $.register({
  1896. rule: {
  1897. host: /^(www\.)?boxcash\.net$/,
  1898. path: /^\/redirect\.html$/,
  1899. query: /url=(.+)$/,
  1900. },
  1901. start: function (m) {
  1902. 'use strict';
  1903. var l = decodeURIComponent(m.query[1]);
  1904. $.openLink(l);
  1905. },
  1906. });
  1907. $.register({
  1908. rule: {
  1909. host: /^(www\.)?(buz|vzt)url\.com$/,
  1910. },
  1911. ready: function () {
  1912. 'use strict';
  1913. var frame = $('frame[scrolling=yes]');
  1914. $.openLink(frame.src);
  1915. },
  1916. });
  1917. $.register({
  1918. rule: {
  1919. host: /^(cf|ex|xt)\d\.(me|co)$/,
  1920. },
  1921. ready: function (m) {
  1922. 'use strict';
  1923. $.removeNodes('iframe');
  1924. var a = $('#skip_button');
  1925. $.openLink(a.href);
  1926. },
  1927. });
  1928. $.register({
  1929. rule: {
  1930. host: /^cf\.ly$/,
  1931. path: /^\/[^\/]+$/,
  1932. },
  1933. start: function (m) {
  1934. 'use strict';
  1935. $.removeNodes('iframe');
  1936. $.openLink('/skip' + m.path[0]);
  1937. },
  1938. });
  1939. $.register({
  1940. rule: {
  1941. host: /^(www\.)?cli\.gs$/,
  1942. },
  1943. ready: function () {
  1944. 'use strict';
  1945. var a = $('a.RedirectLink');
  1946. $.openLink(a.href);
  1947. },
  1948. });
  1949. $.register({
  1950. rule: {
  1951. host: /^(www\.)?clictune\.com$/,
  1952. path: /^\/id=\d+/,
  1953. },
  1954. ready: function () {
  1955. 'use strict';
  1956. $.removeNodes('iframe');
  1957. var matches = $.searchScripts(/<a href="http:\/\/(?:www.)?clictune\.com\/redirect\.php\?url=([^&]+)&/);
  1958. var url = decodeURIComponent(matches[1]);
  1959. $.openLink(url);
  1960. },
  1961. });
  1962. $.register({
  1963. rule: {
  1964. host: /^clk\.im$/,
  1965. },
  1966. ready: function (m) {
  1967. 'use strict';
  1968. $.removeNodes('iframe');
  1969. var matches = $.searchScripts(/\$\("\.countdown"\)\.attr\("href","([^"]+)"\)/);
  1970. $.openLink(matches[1]);
  1971. },
  1972. });
  1973. $.register({
  1974. rule: {
  1975. host: /^cocoleech\.com$/,
  1976. },
  1977. ready: function () {
  1978. 'use strict';
  1979. var a = $('#download');
  1980. $.openLink(a.href);
  1981. },
  1982. });
  1983. (function () {
  1984. 'use strict';
  1985. function hostMapper (host) {
  1986. switch (host) {
  1987. case 'disingkat.in':
  1988. return function () {
  1989. var a = $('a.btn-block.redirect');
  1990. return a.href;
  1991. };
  1992. case 'link.animagz.org':
  1993. return function () {
  1994. var a = $('a.redirect');
  1995. a = a.onclick.toString();
  1996. a = a.match(/window\.open \('([^']+)'\)/);
  1997. return a[1];
  1998. };
  1999. case 'coeg.in':
  2000. return function () {
  2001. var a = $('.download-link a');
  2002. return a.href;
  2003. };
  2004. case 'gunting.in':
  2005. return function () {
  2006. var a = $('div.col-sm-6:nth-child(1) > center:nth-child(1) > a:nth-child(1)');
  2007. return a.href;
  2008. };
  2009. default:
  2010. return null;
  2011. }
  2012. }
  2013. $.register({
  2014. rule: {
  2015. host: [
  2016. /^link\.animagz\.org$/,
  2017. /^coeg\.in$/,
  2018. /^disingkat\.in$/,
  2019. /^gunting\.in$/,
  2020. ],
  2021. path: /^\/\w+$/,
  2022. },
  2023. ready: function (m) {
  2024. var mapper = hostMapper(m.host[0]);
  2025. var b64 = mapper().match(/\?r=(\w+={0,2}?)/);
  2026. $.openLink(atob(b64[1]));
  2027. },
  2028. });
  2029. $.register({
  2030. rule: {
  2031. host: /^sipkur\.net$/,
  2032. path: [
  2033. /^\/\w+$/,
  2034. /^\/menujulink\//,
  2035. ],
  2036. },
  2037. ready: function () {
  2038. var d = $('#testapk > div');
  2039. d = d.onclick.toString();
  2040. d = d.match(/window\.open\('([^']+)'/);
  2041. $.openLink(d[1]);
  2042. },
  2043. });
  2044. })();
  2045. $.register({
  2046. rule: {
  2047. host: /^coinlink\.co$/,
  2048. path: /^\/i\//,
  2049. },
  2050. ready: function (m) {
  2051. 'use strict';
  2052. var a = $('a#btn-main');
  2053. $.openLink(a.href);
  2054. },
  2055. });
  2056. $.register({
  2057. rule: {
  2058. host: /^(?:(\w+)\.)?(coinurl\.com|cur\.lv)$/,
  2059. path: /^\/([-\w]+)$/
  2060. },
  2061. ready: function (m) {
  2062. 'use strict';
  2063. $.removeNodes('iframe');
  2064. var host = 'http://cur.lv/redirect_curlv.php';
  2065. var param = m.host[1] === undefined ? {
  2066. code: m.path[1],
  2067. } : {
  2068. zone: m.host[1],
  2069. name: m.path[1],
  2070. };
  2071. $.get(host, param).then(function(mainFrameContent) {
  2072. try {
  2073. var docMainFrame = $.toDOM(mainFrameContent);
  2074. } catch (e) {
  2075. throw new _.AdsBypasserError('main frame changed');
  2076. }
  2077. var rExtractLink = /onclick="open_url\('([^']+)',\s*'go'\)/;
  2078. var innerFrames = $.$$('iframe', docMainFrame).each(function (currFrame) {
  2079. var currFrameAddr = currFrame.getAttribute('src');
  2080. $.get(currFrameAddr).then(function(currFrameContent) {
  2081. var aRealLink = rExtractLink.exec(currFrameContent);
  2082. if (aRealLink === undefined || aRealLink[1] === undefined) {
  2083. return;
  2084. }
  2085. var realLink = aRealLink[1];
  2086. $.openLink(realLink);
  2087. });
  2088. });
  2089. });
  2090. },
  2091. });
  2092. $.register({
  2093. rule: {
  2094. host: /^www\.comicon\.com\.br$/,
  2095. path: /^\/redir\.php$/,
  2096. },
  2097. ready: function () {
  2098. 'use strict';
  2099. var a = $('#link');
  2100. $.openLink(a.href);
  2101. },
  2102. });
  2103. $.register({
  2104. rule: {
  2105. host: /^comyonet\.com$/,
  2106. },
  2107. ready: function () {
  2108. 'use strict';
  2109. var input = $('input[name="enter"]');
  2110. input.click();
  2111. },
  2112. });
  2113. $.register({
  2114. rule: {
  2115. host: [
  2116. /^www\.cuzle\.com$/,
  2117. /^shorten\.id$/,
  2118. ],
  2119. path: /^\/$/,
  2120. query: /^\?(.+)=$/,
  2121. },
  2122. start: function (m) {
  2123. 'use strict';
  2124. var url = atob(m.query[1]);
  2125. $.openLink(url);
  2126. },
  2127. });
  2128. $.register({
  2129. rule: {
  2130. host: /^(www\.)?cvc\.la$/,
  2131. path: /^\/\w+$/,
  2132. },
  2133. start: function () {
  2134. 'use strict';
  2135. $.post(document.location.href, {
  2136. hidden: 24,
  2137. image: ' ',
  2138. }).then(function (text) {
  2139. var matches = text.match(/window\.location\.replace\('([^']+)'\);/);
  2140. $.openLink(matches[1]);
  2141. });
  2142. },
  2143. });
  2144. $.register({
  2145. rule: {
  2146. host: /^(www\.)?dapat\.in$/,
  2147. },
  2148. ready: function () {
  2149. 'use strict';
  2150. var f = $('iframe[name=pagetext]');
  2151. $.openLink(f.src);
  2152. },
  2153. });
  2154. $.register({
  2155. rule: {
  2156. host: /^(www\.)?dd\.ma$/,
  2157. },
  2158. ready: function (m) {
  2159. 'use strict';
  2160. var i = $.$('#mainframe');
  2161. if (i) {
  2162. $.openLink(i.src);
  2163. return;
  2164. }
  2165. var a = $('#btn_open a');
  2166. $.openLink(a.href);
  2167. },
  2168. });
  2169. $.register({
  2170. rule: {
  2171. host: /^(www\.)?dereferer\.website$/,
  2172. query: /^\?(.+)/,
  2173. },
  2174. start: function (m) {
  2175. 'use strict';
  2176. $.openLink(m.query[1]);
  2177. },
  2178. });
  2179. $.register({
  2180. rule: {
  2181. host: /^www\.dewaurl\.com$/,
  2182. },
  2183. ready: function () {
  2184. 'use strict';
  2185. var f = $('.framedRedirectTopFrame');
  2186. $.get(f.src).then(function (html) {
  2187. html = $.toDOM(html);
  2188. var a = $('#continueButton > a', html);
  2189. $.openLink(a.href);
  2190. }).catch(function (e) {
  2191. _.warn(e);
  2192. });
  2193. },
  2194. });
  2195. $.register({
  2196. rule: {
  2197. host: /^dikit\.in$/,
  2198. },
  2199. ready: function () {
  2200. 'use strict';
  2201. $.removeNodes('iframe');
  2202. var a = $('.disclaimer a');
  2203. $.openLink(a.href);
  2204. },
  2205. });
  2206. $.register({
  2207. rule: {
  2208. host: /^durl\.me$/,
  2209. },
  2210. ready: function () {
  2211. 'use strict';
  2212. var a = $('a[class="proceedBtn"]');
  2213. $.openLink(a.href);
  2214. },
  2215. });
  2216. $.register({
  2217. rule: {
  2218. host: /easyurl\.net|(atu|clickthru|redirects|readthis)\.ca|goshrink\.com$/,
  2219. },
  2220. ready: function () {
  2221. 'use strict';
  2222. var f = $('frame[name=main]');
  2223. $.openLink(f.src);
  2224. },
  2225. });
  2226. $.register({
  2227. rule: {
  2228. host: /^elde\.me$/,
  2229. },
  2230. ready: function () {
  2231. 'use strict';
  2232. $.removeNodes('iframe:not([name=undefined])');
  2233. var a = $('#modal-alert');
  2234. a.style.display = 'block';
  2235. a.style.top = 0;
  2236. a.style.left = 0;
  2237. },
  2238. });
  2239. $.register({
  2240. rule: {
  2241. host: /empireload\.com$/,
  2242. path: /^\/plugin\.php$/,
  2243. query: /^\?id=linkout&url=([^&]+)$/,
  2244. },
  2245. start: function (m) {
  2246. $.openLink(m.query[1]);
  2247. },
  2248. });
  2249. $.register({
  2250. rule: {
  2251. host: [
  2252. /^ethi\.in$/,
  2253. /^st\.wardhanime\.net$/,
  2254. ],
  2255. path: /^\/i\/\d+$/,
  2256. },
  2257. ready: function () {
  2258. 'use strict';
  2259. var a = $('#wrapper > [class^="tombo"] > a[target="_blank"]');
  2260. $.openLink(a.href);
  2261. },
  2262. });
  2263. $.register({
  2264. rule: {
  2265. host: /^(www\.)?filoops.info$/
  2266. },
  2267. ready: function () {
  2268. 'use strict';
  2269. var a = $('#text > center a, #text > div[align=center] a');
  2270. $.openLink(a.href);
  2271. },
  2272. });
  2273. $.register({
  2274. rule: {
  2275. host: /^fit\.sh$/,
  2276. },
  2277. ready: function () {
  2278. 'use strict';
  2279. $.removeNodes('.container-body');
  2280. var m = $.searchScripts(/token="([^"]+)"/);
  2281. if (!m) {
  2282. throw new _.AdsBypasserError('site changed');
  2283. }
  2284. m = m[1];
  2285. var interLink = '/go/' + m + '?fa=15466&a=' + window.location.hash.substr(1);
  2286. setTimeout(function () {
  2287. $.openLink(interLink);
  2288. }, 6000);
  2289. },
  2290. });
  2291. $.register({
  2292. rule:{
  2293. host:/^(www\.)?fiuxy\.net$/,
  2294. path:/^\/link\/\?.*$/
  2295. },
  2296. ready:function(){
  2297. $.openLink($('a.btn.a').href);
  2298. }
  2299. });
  2300. $.register({
  2301. rule: {
  2302. host: /^www\.forbes\.com$/,
  2303. },
  2304. ready: function () {
  2305. 'use strict';
  2306. var o = $.window.ox_zones;
  2307. if (o) {
  2308. $.openLink(o.page_url);
  2309. }
  2310. },
  2311. });
  2312. $.register({
  2313. rule: {
  2314. host: /^www\.free-tv-video-online\.info$/,
  2315. path: /^\/interstitial2\.html$/,
  2316. query: /lnk=([^&]+)/,
  2317. },
  2318. start: function (m) {
  2319. 'use strict';
  2320. var url = decodeURIComponent(m.query[1]);
  2321. $.openLink(url);
  2322. },
  2323. });
  2324. (function () {
  2325. 'use strict';
  2326. $.register({
  2327. rule: {
  2328. host: /^(www\.)?fundurl\.com$/,
  2329. query: /i=([^&]+)/,
  2330. },
  2331. start: function (m) {
  2332. $.openLink(m.query[1]);
  2333. },
  2334. });
  2335. $.register({
  2336. rule: {
  2337. host: /^(www\.)?fundurl\.com$/,
  2338. path: /^\/(go-\w+|load\.php)$/,
  2339. },
  2340. ready: function () {
  2341. var f = $('iframe[name=fpage3]');
  2342. $.openLink(f.src);
  2343. },
  2344. });
  2345. })();
  2346. (function () {
  2347. var hosts = /^gca\.sh|repla\.cr$/;
  2348. $.register({
  2349. rule: {
  2350. host: hosts,
  2351. path: /^\/adv\/\w+\/(.*)$/,
  2352. query: /^(.*)$/,
  2353. hash: /^(.*)$/,
  2354. },
  2355. start: function (m) {
  2356. 'use strict';
  2357. var l = m.path[1] + m.query[1] + m.hash[1];
  2358. $.openLink(l);
  2359. },
  2360. });
  2361. $.register({
  2362. rule: {
  2363. host: hosts,
  2364. },
  2365. ready: function () {
  2366. 'use strict';
  2367. $.removeNodes('iframe');
  2368. var jQuery = $.window.$;
  2369. setTimeout(function () {
  2370. jQuery("#captcha-dialog").dialog("open");
  2371. }, 1000);
  2372. },
  2373. });
  2374. })();
  2375. $.register({
  2376. rule: {
  2377. host: /^gkurl\.us$/,
  2378. },
  2379. ready: function () {
  2380. 'use strict';
  2381. var iframe = $('#gkurl-frame');
  2382. $.openLink(iframe.src);
  2383. },
  2384. });
  2385. $.register({
  2386. rule: {
  2387. host: /^u\.go2\.me$/,
  2388. },
  2389. ready: function () {
  2390. 'use strict';
  2391. var iframe = $('iframe');
  2392. $.openLink(iframe.src);
  2393. },
  2394. });
  2395. $.register({
  2396. rule: {
  2397. host: /^goto\.loncat\.in$/,
  2398. query: /open=(.+)/,
  2399. },
  2400. start: function (m) {
  2401. 'use strict';
  2402. var url = atob(atob(m.query[1]));
  2403. $.openLink(url);
  2404. },
  2405. });
  2406. $.register({
  2407. rule: {
  2408. host: /^hotshorturl\.com$/,
  2409. },
  2410. ready: function () {
  2411. 'use strict';
  2412. var frame = $('frame[scrolling=yes]');
  2413. $.openLink(frame.src);
  2414. },
  2415. });
  2416. $.register({
  2417. rule: {
  2418. host: /^igg-games\.com$/,
  2419. query: /^\?xurl=(.*)$/,
  2420. },
  2421. start: function (m) {
  2422. 'use strict';
  2423. var url = 'http' + decodeURIComponent(m.query[1]);
  2424. $.openLink(url);
  2425. },
  2426. });
  2427. $.register({
  2428. rule: {
  2429. host: /^(www\.)?(ilix\.in|priva\.us)$/,
  2430. path: /\/(\w+)/,
  2431. },
  2432. ready: function (m) {
  2433. 'use strict';
  2434. var realHost = 'ilix.in';
  2435. if (m.host[2] !== realHost) {
  2436. var realURL = location.href.replace(m.host[2], realHost);
  2437. $.openLink(realURL);
  2438. return;
  2439. }
  2440. var f = $.$('iframe[name=ifram]');
  2441. if (f) {
  2442. $.openLink(f.src);
  2443. return;
  2444. }
  2445. if (!$.$('img#captcha')) {
  2446. $('form[name=frm]').submit();
  2447. }
  2448. },
  2449. });
  2450. $.register({
  2451. rule: {
  2452. host: /^itw\.me$/,
  2453. path: /^\/r\//,
  2454. },
  2455. ready: function () {
  2456. 'use strict';
  2457. var f = $('.go-form');
  2458. f.submit();
  2459. },
  2460. });
  2461. $.register({
  2462. rule: {
  2463. host: /^ity\.im$/,
  2464. },
  2465. ready: function () {
  2466. 'use strict';
  2467. var f = $.$('#main');
  2468. if (f) {
  2469. $.openLink(f.src);
  2470. return;
  2471. }
  2472. f = $.$$('frame').find(function (frame) {
  2473. if (frame.src.indexOf('interheader.php') < 0) {
  2474. return _.none;
  2475. }
  2476. return frame.src;
  2477. });
  2478. if (f) {
  2479. $.openLink(f.payload);
  2480. return;
  2481. }
  2482. f = $.searchScripts(/krypted=([^&]+)/);
  2483. if (!f) {
  2484. throw new _.AdsBypasserError('site changed');
  2485. }
  2486. f = f[1];
  2487. var data = $.window.des('ksnslmtmk0v4Pdviusajqu', $.window.hexToString(f), 0, 0);
  2488. if (data) {
  2489. $.openLink('http://ity.im/1104_21_50846_' + data);
  2490. }
  2491. },
  2492. });
  2493. $.register({
  2494. rule: {
  2495. host: /^(www\.)?kingofshrink\.com$/,
  2496. },
  2497. ready: function () {
  2498. 'use strict';
  2499. var l = $('#textresult > a');
  2500. $.openLink(l.href);
  2501. },
  2502. });
  2503. $.register({
  2504. rule: {
  2505. host: /^st\.kurogaze\.net$/,
  2506. query: /r=(.+)/,
  2507. },
  2508. start: function (m) {
  2509. 'use strict';
  2510. var r = atob(m.query[1]);
  2511. $.openLink(r);
  2512. },
  2513. });
  2514. $.register({
  2515. rule: {
  2516. host: /^st\.kurogaze\.net$/,
  2517. },
  2518. ready: function () {
  2519. 'use strict';
  2520. var a = $('a.redirect');
  2521. $.openLink(a.href);
  2522. },
  2523. });
  2524. $.register({
  2525. rule: {
  2526. host: /^(www\.)?leechbd\.tk$/,
  2527. path: /^\/Shortener\/(\w+)$/,
  2528. },
  2529. start: function (m) {
  2530. 'use strict';
  2531. $.get('/Shortener/API/read/get', {id: m.path[1], type: 'json'}).then(function (text) {
  2532. var r = _.parseJSON(text);
  2533. if (r.success == true && r.data.full) {
  2534. $.openLink(r.data.full);
  2535. } else {
  2536. _.warn('API Error ' + r.error.code + ' : ' + r.error.msg);
  2537. }
  2538. });
  2539. },
  2540. });
  2541. $.register({
  2542. rule: {
  2543. host: /^leechpremium\.space$/,
  2544. path: /^\/\w+$/,
  2545. },
  2546. ready: function () {
  2547. 'use strict';
  2548. var a = $('#btn-main');
  2549. var i = a.href.lastIndexOf('http');
  2550. a = a.href.substr(i);
  2551. $.openLink(a);
  2552. },
  2553. });
  2554. $.register({
  2555. rule: 'http://www.lienscash.com/l/*',
  2556. ready: function () {
  2557. 'use strict';
  2558. var a = $('#redir_btn');
  2559. $.openLink(a.href);
  2560. },
  2561. });
  2562. $.register({
  2563. rule: {
  2564. host: /^(www\.)?\w+\.link-protector\.com$/,
  2565. },
  2566. ready: function (m) {
  2567. 'use strict';
  2568. var f = $('form[style="font-weight:normal;font-size:12;font-family:Verdana;"]');
  2569. $.openLink(f.action);
  2570. },
  2571. });
  2572. $.register({
  2573. rule: {
  2574. host: /^(www\.)?link\.im$/,
  2575. path: /^\/\w+$/,
  2576. },
  2577. start: function () {
  2578. 'use strict';
  2579. $.post(document.location.href, {
  2580. image: 'Continue',
  2581. }).then(function (text) {
  2582. var m = text.match(/window\.location\.replace\('([^']+)'\)/);
  2583. $.openLink(m[1]);
  2584. });
  2585. },
  2586. });
  2587. $.register({
  2588. rule: {
  2589. host: /^link\.tl$/,
  2590. path: /^\/fly\/go\.php$/,
  2591. },
  2592. ready: function () {
  2593. 'use strict';
  2594. var a = $('.skip_btn2 a');
  2595. $.openLink(a.href);
  2596. },
  2597. });
  2598. $.register({
  2599. rule: {
  2600. host: /^link\.tl$/,
  2601. path: /^\/(.+)$/,
  2602. },
  2603. start: function (m) {
  2604. 'use strict';
  2605. $.openLink('/fly/go.php?to=' + m.path[1]);
  2606. },
  2607. });
  2608. $.register({
  2609. rule: {
  2610. host: /\.link2dollar\.com$/,
  2611. path: /^\/\d+$/,
  2612. },
  2613. ready: function () {
  2614. 'use strict';
  2615. var m = $.searchScripts(/var rlink = '([^']+)';/);
  2616. if (!m) {
  2617. throw new _.AdsBypasserError('site changed');
  2618. }
  2619. m = m[1];
  2620. $.openLink(m);
  2621. },
  2622. });
  2623. $.register({
  2624. rule: {
  2625. host: /^link2you\.ru$/,
  2626. path: /^\/\d+\/(.+)$/,
  2627. },
  2628. start: function (m) {
  2629. 'use strict';
  2630. var url = m.path[1];
  2631. if (!url.match(/^https?:\/\//)) {
  2632. url = '//' + url;
  2633. }
  2634. $.openLink(url);
  2635. },
  2636. });
  2637. $.register({
  2638. rule: {
  2639. host: /^link(4ad|ajc)\.com$/,
  2640. path: /^\/(.+)$/,
  2641. },
  2642. ready: function (m) {
  2643. 'use strict';
  2644. var d = $('div[id^=module_]');
  2645. d = d.id.match(/module_(\d+)/);
  2646. d = d[1];
  2647. $.post('form.php?block_id=' + d, {
  2648. cmd: 'get_source',
  2649. act: 'waiting',
  2650. id: m.path[1],
  2651. }).then(function (url) {
  2652. $.openLink(url);
  2653. }).catch(function (e) {
  2654. _.warn(e);
  2655. });
  2656. },
  2657. });
  2658. (function () {
  2659. 'use strict';
  2660. function sendRequest (opts) {
  2661. return $.post('/ajax/r.php', opts).then(function (data) {
  2662. if (data.length <= 1) {
  2663. return sendRequest(opts);
  2664. }
  2665. var a = $.toDOM(data);
  2666. a = $('a', a);
  2667. return a.href;
  2668. });
  2669. }
  2670. $.register({
  2671. rule: {
  2672. host: /^link5s\.com$/,
  2673. path: /^\/([^\/]+)$/,
  2674. },
  2675. ready: function (m) {
  2676. $.window.$ = null;
  2677. var i = $('#iframeID');
  2678. var opts = {
  2679. page: m.path[1],
  2680. advID: i.dataset.cmp,
  2681. u: i.dataset.u,
  2682. };
  2683. $.removeNodes('iframe');
  2684. sendRequest(opts).then(function (url) {
  2685. $.openLink(url);
  2686. });
  2687. },
  2688. });
  2689. })();
  2690. $.register({
  2691. rule: {
  2692. host: /^www\.linkarus\.com$/,
  2693. path: /^\/skip\//,
  2694. },
  2695. ready: function () {
  2696. 'use strict';
  2697. $.removeNodes('iframe');
  2698. var m = $.searchScripts(/action="([^"]+)"/);
  2699. m = m[1];
  2700. $.openLink(m);
  2701. },
  2702. });
  2703. $.register({
  2704. rule: {
  2705. host: /^www\.linkarus\.com$/,
  2706. },
  2707. ready: function () {
  2708. 'use strict';
  2709. $.removeNodes('iframe');
  2710. var m = $.searchScripts(/var counter = (\d+);/);
  2711. m = parseInt(m[1], 10);
  2712. m = m * 1000 + 500;
  2713. _.wait(m).then(function () {
  2714. var a = $('#skip-ad');
  2715. $.openLink(a.href);
  2716. });
  2717. },
  2718. });
  2719. (function() {
  2720. function ConvertFromHex (str) {
  2721. var result = [];
  2722. while (str.length >= 2) {
  2723. result.push(String.fromCharCode(parseInt(str.substring(0, 2), 16)));
  2724. str = str.substring(2, str.length);
  2725. }
  2726. return result.join("");
  2727. }
  2728. var Encode = function (str) {
  2729. var s = [], j = 0, x, res = '', k = arguments.callee.toString().replace(/\s+/g, "");
  2730. for (var i = 0; i < 256; i++) {
  2731. s[i] = i;
  2732. }
  2733. for (i = 0; i < 256; i++) {
  2734. j = (j + s[i] + k.charCodeAt(i % k.length)) % 256;
  2735. x = s[i];
  2736. s[i] = s[j];
  2737. s[j] = x;
  2738. }
  2739. i = 0;
  2740. j = 0;
  2741. for (var y = 0; y < str.length; y++) {
  2742. i = (i + 1) % 256;
  2743. j = (j + s[i]) % 256;
  2744. x = s[i];
  2745. s[i] = s[j];
  2746. s[j] = x;
  2747. res += String.fromCharCode(str.charCodeAt(y) ^ s[(s[i] + s[j]) % 256]);
  2748. }
  2749. return res;
  2750. };
  2751. var hostRules = [
  2752. /^(([\w]{8}|www)\.)?(allanalpass|cash4files|drstickyfingers|fapoff|freegaysitepass|(gone|tube)viral|(pic|tna)bucks|whackyvidz|fuestfka)\.com$/,
  2753. /^(([\w]{8}|www)\.)?(a[mn]y|deb|dyo|sexpalace)\.gs$/,
  2754. /^(([\w]{8}|www)\.)?(filesonthe|poontown|seriousdeals|ultrafiles|urlbeat|eafyfsuh|sasontnwc|zatnawqy|zytpirwai)\.net$/,
  2755. /^(([\w]{8}|www)\.)?freean\.us$/,
  2756. /^(([\w]{8}|www)\.)?galleries\.bz$/,
  2757. /^(([\w]{8}|www)\.)?hornywood\.tv$/,
  2758. /^(([\w]{8}|www)\.)?link(babes|bucks)\.com$/,
  2759. /^(([\w]{8}|www)\.)?(megaline|miniurls|qqc|rqq|tinylinks|yyv|zff)\.co$/,
  2760. /^(([\w]{8}|www)\.)?(these(blog|forum)s)\.com$/,
  2761. /^(([\w]{8}|www)\.)?youfap\.me$/,
  2762. /^warning-this-linkcode-will-cease-working-soon\.www\.linkbucksdns\.com$/,
  2763. ];
  2764. (function () {
  2765. 'use strict';
  2766. function findToken (context) {
  2767. var script = $.searchScripts(' var f = window[\'init\' + \'Lb\' + \'js\' + \'\']', context);
  2768. if (!script) {
  2769. _.warn('pattern changed');
  2770. return null;
  2771. }
  2772. var adurl = script.match(/AdUrl\s*:\s*'([^']+)'/);
  2773. if (!adurl) {
  2774. return null;
  2775. }
  2776. adurl = adurl[1];
  2777. var m1 = script.match(/AdPopUrl\s*:\s*'.+\?[^=]+=([\w\d]+)'/);
  2778. var m2 = script.match(/Token\s*:\s*'([\w\d]+)'/);
  2779. var token = m1[1] || m2[1];
  2780. var m = script.match(/=\s*(\d+);/);
  2781. var ak = parseInt(m[1], 10);
  2782. var re = /\+\s*(\d+);/g;
  2783. var tmp = null;
  2784. while((m = re.exec(script)) !== null) {
  2785. tmp = m[1];
  2786. }
  2787. ak += parseInt(tmp, 10);
  2788. return {
  2789. t: token,
  2790. aK: ak,
  2791. adurl: adurl,
  2792. };
  2793. }
  2794. function sendRequest (token) {
  2795. $.get(token.adurl);
  2796. delete token.adurl;
  2797. token.a_b = false;
  2798. _.info('waiting the interval');
  2799. return _.wait(5000).then(function () {
  2800. _.info('sending token: %o', token);
  2801. return $.get('/intermission/loadTargetUrl', token, {
  2802. 'X-Requested-With': _.none,
  2803. Origin: _.none,
  2804. });
  2805. }).then(function (text) {
  2806. var data = _.parseJSON(text);
  2807. _.info('response: %o', data);
  2808. if (!data.Success && data.Errors[0] === 'Invalid token') {
  2809. _.warn('got invalid token');
  2810. return retry();
  2811. }
  2812. if (data.AdBlockSpotted) {
  2813. _.warn('adblock spotted');
  2814. return;
  2815. }
  2816. if (data.Success && !data.AdBlockSpotted && data.Url) {
  2817. return data.Url;
  2818. }
  2819. });
  2820. }
  2821. function retry () {
  2822. return $.get(window.location.toString(), {}, {
  2823. 'X-Forwarded-For': $.generateRandomIP(),
  2824. }).then(function (text) {
  2825. var d = $.toDOM(text);
  2826. var t = findToken(d);
  2827. if (!t) {
  2828. return _.wait(1000).then(retry);
  2829. }
  2830. return sendRequest(t);
  2831. });
  2832. }
  2833. $.register({
  2834. rule: {
  2835. host: hostRules,
  2836. path: /^\/\w+\/url\/(.+)$/,
  2837. },
  2838. ready: function(m) {
  2839. $.removeAllTimer();
  2840. $.resetCookies();
  2841. $.removeNodes('iframe');
  2842. var url = m.path[1] + window.location.search;
  2843. var match = $.searchScripts(/UrlEncoded: ([^,]+)/);
  2844. if (match && match[1] === 'true') {
  2845. url = Encode(ConvertFromHex(url));
  2846. }
  2847. $.openLink(url);
  2848. }
  2849. });
  2850. $.register({
  2851. rule: {
  2852. host: hostRules,
  2853. },
  2854. start: function () {
  2855. $.window.XMLHttpRequest = _.nop;
  2856. },
  2857. ready: function () {
  2858. $.removeAllTimer();
  2859. $.resetCookies();
  2860. $.removeNodes('iframe');
  2861. if (window.location.pathname.indexOf('verify') >= 0) {
  2862. var path = window.location.pathname.replace('/verify', '');
  2863. $.openLink(path);
  2864. return;
  2865. }
  2866. var token = findToken(document);
  2867. sendRequest(token).then(function (url) {
  2868. $.nuke(url);
  2869. $.openLink(url);
  2870. });
  2871. },
  2872. });
  2873. $.register({
  2874. rule: {
  2875. query: /^(.*)[?&]_lbGate=\d+$/,
  2876. },
  2877. start: function (m) {
  2878. $.setCookie('_lbGatePassed', 'true');
  2879. $.openLink(window.location.pathname + m.query[1]);
  2880. },
  2881. });
  2882. })();
  2883. })();
  2884. $.register({
  2885. rule: {
  2886. host: [
  2887. /^www\.linkdecode\.com$/,
  2888. /^www\.fastdecode\.com$/,
  2889. ],
  2890. path: /^\/$/,
  2891. query: /^\?(.+)$/,
  2892. },
  2893. ready: function (m) {
  2894. 'use strict';
  2895. $.removeNodes('iframe');
  2896. var lnk = m.query[1];
  2897. if (m.query[1].match(/^https?:\/\//)) {
  2898. $.openLink(lnk);
  2899. return;
  2900. }
  2901. var b = $.$('#popup');
  2902. if (b && b.href) {
  2903. $.openLink(b.href);
  2904. return;
  2905. }
  2906. b = $('#m > .Visit_Link');
  2907. b = b.onclick.toString().match(/window\.open\(\'([^']+)\'/);
  2908. if (!b) {
  2909. throw new _.AdsBypasser('pattern changed');
  2910. }
  2911. lnk = b[1].match(/\?(https?:\/\/.*)$/);
  2912. if (lnk) {
  2913. $.openLink(lnk[1]);
  2914. return;
  2915. }
  2916. $.openLink(b[1]);
  2917. },
  2918. });
  2919. $.register({
  2920. rule: {
  2921. host: [
  2922. /^(www\.)?linkdrop\.net$/,
  2923. /^dmus\.in$/,
  2924. /^ulshare\.net$/,
  2925. ],
  2926. },
  2927. ready: function () {
  2928. 'use strict';
  2929. $.removeNodes('iframe');
  2930. var jQuery = $.window.$;
  2931. var f = jQuery('form.hidden[action="/links/go"]');
  2932. if (f.length <= 0) {
  2933. return;
  2934. }
  2935. jQuery.ajax({
  2936. dataType: 'json',
  2937. type: 'POST',
  2938. url: f.attr('action'),
  2939. data: f.serialize(),
  2940. success: function (result, status, xhr) {
  2941. if (result.url) {
  2942. $.openLink(result.url);
  2943. } else {
  2944. _.warn(result.message);
  2945. }
  2946. },
  2947. error: function (xhr, status, error) {
  2948. _.warn(xhr, status, error);
  2949. },
  2950. });
  2951. },
  2952. });
  2953. $.register({
  2954. rule: {
  2955. host: /^linkpaid\.net$/,
  2956. path: /^\/go\//,
  2957. },
  2958. ready: function () {
  2959. 'use strict';
  2960. var f = $('#btn-main');
  2961. f.click();
  2962. },
  2963. });
  2964. $.register({
  2965. rule: {
  2966. host: /^(www\.)?linkplugapp\.com$/,
  2967. },
  2968. ready: function () {
  2969. 'use strict'
  2970. var a = $('#mc_embed_signup_scroll a')
  2971. $.openLink(a.href)
  2972. },
  2973. })
  2974. $.register({
  2975. rule: {
  2976. host: /^linksas\.us$/,
  2977. path: /^(\/\w+)$/,
  2978. },
  2979. ready: function (m) {
  2980. 'use strict';
  2981. _.try(1000, function () {
  2982. var recaptcha = $('#g-recaptcha-response');
  2983. if (!recaptcha) {
  2984. return null;
  2985. }
  2986. if (!recaptcha.value) {
  2987. return _.none;
  2988. }
  2989. return recaptcha.value;
  2990. }).then(function (recaptcha) {
  2991. var url = _.T('http://ipinfo.io/{0}/json')($.generateRandomIP());
  2992. return $.get(url).then(function (ipinfo) {
  2993. ipinfo = _.parseJSON(ipinfo);
  2994. return {
  2995. codeAds: 1,
  2996. country: ipinfo.country,
  2997. ipAddress: ipinfo.ip,
  2998. recaptcha: recaptcha,
  2999. };
  3000. });
  3001. }).then(function (payload) {
  3002. var token = $.getCookie('XSRF-TOKEN');
  3003. return $.post('/go' + m.path[1], payload, {
  3004. 'Content-Type': 'application/json',
  3005. 'X-XSRF-TOKEN': token,
  3006. });
  3007. }).then(function (data) {
  3008. data = _.parseJSON(data);
  3009. $.openLink(data.message);
  3010. }).catch(function (e) {
  3011. _.warn(e);
  3012. });
  3013. },
  3014. });
  3015. $.register({
  3016. rule: {
  3017. host: /^linksas\.us$/,
  3018. path: /^\/go\//,
  3019. },
  3020. ready: function () {
  3021. 'use strict';
  3022. var a = $.$('#btnSubmit');
  3023. if (!a) {
  3024. return;
  3025. }
  3026. var url = a.href;
  3027. var pattern = /https?:\/\//g;
  3028. var lastURL = '';
  3029. while (true) {
  3030. var matched = pattern.exec(url);
  3031. if (!matched) {
  3032. break;
  3033. }
  3034. lastURL = matched + url.substring(pattern.lastIndex);
  3035. }
  3036. $.openLink(lastURL);
  3037. },
  3038. });
  3039. $.register({
  3040. rule: {
  3041. host: /^linkshrink\.net$/,
  3042. path: /^\/[a-zA-Z0-9]+$/,
  3043. },
  3044. start: function () {
  3045. 'use strict';
  3046. $.window._impspcabe = 0;
  3047. },
  3048. ready: function () {
  3049. 'use strict';
  3050. var l = $('#skip .bt');
  3051. $.openLink(l.href);
  3052. },
  3053. });
  3054. $.register({
  3055. rule: {
  3056. host: /^linkshrink\.net$/,
  3057. path: /=(.+)$/,
  3058. },
  3059. start: function (m) {
  3060. 'use strict';
  3061. $.openLink(m.path[1]);
  3062. },
  3063. });
  3064. $.register({
  3065. rule: 'http://lix.in/-*',
  3066. ready: function () {
  3067. 'use strict';
  3068. var i = $.$('#ibdc');
  3069. if (i) {
  3070. return;
  3071. }
  3072. i = $.$('form');
  3073. if (i) {
  3074. i.submit();
  3075. return;
  3076. }
  3077. i = $('iframe');
  3078. $.openLink(i.src);
  3079. },
  3080. });
  3081. $.register({
  3082. rule: {
  3083. host: /^lnk\.in$/,
  3084. },
  3085. ready: function () {
  3086. 'use strict';
  3087. var a = $('#divRedirectText a');
  3088. $.openLink(a.innerHTML);
  3089. },
  3090. });
  3091. $.register({
  3092. rule: {
  3093. host: /^(rd?)lnk\.co|reducelnk\.com$/,
  3094. path: /^\/[^.]+$/,
  3095. },
  3096. ready: function () {
  3097. 'use strict';
  3098. var f = $.$('iframe#dest');
  3099. if (f) {
  3100. $.openLink(f.src);
  3101. return;
  3102. }
  3103. $.removeNodes('iframe');
  3104. var o = $.$('#urlholder');
  3105. if (o) {
  3106. $.openLink(o.value);
  3107. return;
  3108. }
  3109. o = $.$('#skipBtn');
  3110. if (o) {
  3111. o = o.querySelector('a');
  3112. $.openLink(o.href);
  3113. return;
  3114. }
  3115. o = document.title.replace(/(LNK.co|Linkbee)\s*:\s*/, '');
  3116. $.openLink(o);
  3117. },
  3118. });
  3119. $.register({
  3120. rule: {
  3121. host: /^lnx\.lu|url\.fm|z\.gs$/,
  3122. },
  3123. ready: function () {
  3124. 'use strict';
  3125. var a = $('#clickbtn a');
  3126. $.openLink(a.href);
  3127. },
  3128. });
  3129. $.register({
  3130. rule: {
  3131. host: /^www\.lolinez\.com$/,
  3132. query: /\?(.+)/,
  3133. },
  3134. start: function (m) {
  3135. 'use strict';
  3136. $.openLink(m.query[1]);
  3137. },
  3138. });
  3139. $.register({
  3140. rule: {
  3141. host: /^(www\.)?loook\.ga$/,
  3142. path: /^\/\d+$/
  3143. },
  3144. ready: function (m) {
  3145. 'use strict';
  3146. var a = $('#download_link > a.btn');
  3147. $.openLink(a.href);
  3148. },
  3149. });
  3150. $.register({
  3151. rule: [
  3152. 'http://madlink.sk/',
  3153. 'http://madlink.sk/*.html',
  3154. ],
  3155. });
  3156. $.register({
  3157. rule: 'http://madlink.sk/*',
  3158. start: function (m) {
  3159. 'use strict';
  3160. $.removeNodes('iframe');
  3161. $.post('/ajax/check_redirect.php', {
  3162. link: m[1],
  3163. }).then(function (text) {
  3164. $.openLink(text);
  3165. });
  3166. },
  3167. });
  3168. $.register({
  3169. rule: {
  3170. host: [
  3171. /^mant[ae][pb]\.in$/,
  3172. /^st\.oploverz\.net$/,
  3173. /^minidroid\.net$/,
  3174. /^susutin\.com$/,
  3175. /^ww3\.awaremmxv\.com$/,
  3176. ],
  3177. },
  3178. ready: function () {
  3179. 'use strict';
  3180. var a = $('a.redirect, a[target=_blank][rel=nofollow]');
  3181. $.openLink(a.href);
  3182. },
  3183. });
  3184. $.register({
  3185. rule: {
  3186. host: /^www\.mije\.net$/,
  3187. path: /^\/\w+\/(.+)$/,
  3188. },
  3189. start: function (m) {
  3190. 'use strict';
  3191. var url = atob(m.path[1]);
  3192. $.openLink(url);
  3193. },
  3194. });
  3195. $.register({
  3196. rule: {
  3197. host: [
  3198. /^moe\.god\.jp$/,
  3199. /^moesubs\.akurapopo\.pro$/,
  3200. /^dl\.nsfk\.in$/,
  3201. ]
  3202. },
  3203. ready: function () {
  3204. 'use strict';
  3205. var a = $('div div center a');
  3206. $.openLink(a.href);
  3207. },
  3208. });
  3209. $.register({
  3210. rule: {
  3211. host: /^moesubs\.com$/,
  3212. path: /^\/url\//,
  3213. },
  3214. ready: function () {
  3215. 'use strict';
  3216. var a = $('body > div:nth-child(4) > i:nth-child(1)');
  3217. a = a.textContent;
  3218. var i = a.lastIndexOf('http');
  3219. a = a.substr(i);
  3220. $.openLink(a);
  3221. },
  3222. });
  3223. $.register({
  3224. rule: {
  3225. host: /^mt0\.org$/,
  3226. path: /^\/[^\/]+\/$/,
  3227. },
  3228. ready: function () {
  3229. 'use strict';
  3230. $.removeNodes('frame[name=bottom]');
  3231. var f = $('frame[name=top]');
  3232. var i = setInterval(function () {
  3233. var a = $.$('div a', f.contentDocument);
  3234. if (!a) {
  3235. return;
  3236. }
  3237. clearInterval(i);
  3238. $.openLink(a.href)
  3239. }, 1000);
  3240. },
  3241. });
  3242. $.register({
  3243. rule: 'http://my-link.pro/*',
  3244. ready: function () {
  3245. 'use strict';
  3246. var i = $('iframe[scrolling=auto]');
  3247. if (i) {
  3248. $.openLink(i.src);
  3249. }
  3250. },
  3251. });
  3252. $.register({
  3253. rule: {
  3254. host: /^nmac\.to$/,
  3255. path: /^\/download\/(.+)/,
  3256. },
  3257. start: function (m) {
  3258. 'use strict';
  3259. var url = atob(m.path[1]);
  3260. $.openLink(url);
  3261. },
  3262. });
  3263. $.register({
  3264. rule: {
  3265. host: /^nsfw\.in$/,
  3266. },
  3267. ready: function () {
  3268. 'use strict';
  3269. var a = $('#long_url a');
  3270. $.openLink(a.href);
  3271. },
  3272. });
  3273. $.register({
  3274. rule: {
  3275. host: /^nutshellurl\.com$/,
  3276. },
  3277. ready: function () {
  3278. 'use strict';
  3279. var iframe = $('iframe');
  3280. $.openLink(iframe.src);
  3281. },
  3282. });
  3283. $.register({
  3284. rule: {
  3285. host: /^(www\.)?ohleech\.com$/,
  3286. path: /^\/dl\/$/,
  3287. },
  3288. ready: function () {
  3289. 'use strict';
  3290. $.window.startdl();
  3291. },
  3292. });
  3293. $.register({
  3294. rule: {
  3295. host: /^www\.oni\.vn$/,
  3296. },
  3297. ready: function () {
  3298. 'use strict';
  3299. $.removeNodes('iframe');
  3300. var data = $.searchScripts(/data:"([^"]+)"/);
  3301. if (!data) {
  3302. throw new _.AdsBypasserError('pattern changed');
  3303. }
  3304. data = data[1];
  3305. $.get('/click.html', data).then(function (url) {
  3306. $.openLink(url);
  3307. });
  3308. },
  3309. });
  3310. $.register({
  3311. rule: {
  3312. host: /^(www\.)?ouo\.(io|press)$/,
  3313. path: /^\/go\/\w+$/,
  3314. },
  3315. ready: function (m) {
  3316. 'use strict';
  3317. var a = $('#btn-main');
  3318. $.openLink(a.href);
  3319. },
  3320. });
  3321. $.register({
  3322. rule: {
  3323. host: /^oxyl\.me$/,
  3324. },
  3325. ready: function () {
  3326. 'use strict';
  3327. var l = $.$$('.links-container.result-form > a.result-a');
  3328. if (l.size() > 1) {
  3329. return;
  3330. }
  3331. $.openLink(l.at(0).href);
  3332. },
  3333. });
  3334. $.register({
  3335. rule: {
  3336. host: /^p\.pw$/,
  3337. },
  3338. ready: function () {
  3339. 'use strict';
  3340. $.removeNodes('iframe');
  3341. var m = $.searchScripts(/window\.location = "(.*)";/);
  3342. m = m[1];
  3343. $.openLink(m);
  3344. },
  3345. });
  3346. $.register({
  3347. rule: {
  3348. host: /^(www\.)?\w+\.rapeit\.net$/,
  3349. path: /^\/(go|prepair|request|collect|analyze)\/[a-f0-9]+$/,
  3350. },
  3351. ready: function (m) {
  3352. 'use strict';
  3353. var a = $('a#download_link');
  3354. $.openLink(a.href);
  3355. },
  3356. });
  3357. $.register({
  3358. rule: 'http://reffbux.com/refflinx/view/*',
  3359. ready: function () {
  3360. 'use strict';
  3361. $.removeNodes('iframe');
  3362. var m = $.searchScripts(/skip_this_ad_(\d+)_(\d+)/);
  3363. var id = m[1];
  3364. var share = m[2];
  3365. var location = window.location.toString();
  3366. $.post('http://reffbux.com/refflinx/register', {
  3367. id: id,
  3368. share: share,
  3369. fp: 0,
  3370. location: location,
  3371. referer: '',
  3372. }).then(function (text) {
  3373. var m = text.match(/'([^']+)'/);
  3374. if (!m) {
  3375. throw new _.AdsBypasserError('pattern changed');
  3376. }
  3377. $.openLink(m[1]);
  3378. });
  3379. },
  3380. });
  3381. $.register({
  3382. rule: 'http://richlink.com/app/webscr?cmd=_click&key=*',
  3383. ready: function () {
  3384. 'use strict';
  3385. var f = $('frameset');
  3386. f = f.onload.toString();
  3387. f = f.match(/url=([^&]+)/);
  3388. if (f) {
  3389. f = decodeURIComponent(f[1]);
  3390. } else {
  3391. f = $('frame[name=site]');
  3392. f = f.src;
  3393. }
  3394. $.openLink(f);
  3395. },
  3396. });
  3397. $.register({
  3398. rule: 'http://rijaliti.info/*.php',
  3399. ready: function () {
  3400. 'use strict';
  3401. var a = $('#main td[align="center"] a');
  3402. $.openLink(a.href);
  3403. },
  3404. });
  3405. $.register({
  3406. rule: {
  3407. host: /^riurl\.com$/,
  3408. path: /^\/.+/,
  3409. },
  3410. ready: function () {
  3411. 'use strict';
  3412. var s = $.$('body script');
  3413. if (s) {
  3414. s = s.innerHTML.indexOf('window.location.replace');
  3415. if (s >= 0) {
  3416. return;
  3417. }
  3418. }
  3419. $.openLink('', {
  3420. path: {
  3421. hidden: '1',
  3422. image: ' ',
  3423. },
  3424. });
  3425. },
  3426. });
  3427. $.register({
  3428. rule: {
  3429. host: /^preview\.rlu\.ru$/,
  3430. },
  3431. ready: function () {
  3432. 'use strict';
  3433. var a = $('#content > .long_url > a');
  3434. $.openLink(a.href);
  3435. },
  3436. });
  3437. $.register({
  3438. rule: {
  3439. host: /^robo\.us$/,
  3440. },
  3441. ready: function () {
  3442. 'use strict';
  3443. $.removeNodes('iframe');
  3444. var url = atob($.window.fl);
  3445. $.openLink(url);
  3446. },
  3447. });
  3448. $.register({
  3449. rule: {
  3450. host: /^www\.ron\.vn$/,
  3451. },
  3452. ready: function () {
  3453. 'use strict';
  3454. var script = $.searchScripts('linknexttop');
  3455. var data = script.match(/data:"([^"]+)"/);
  3456. var url = $.window.domain + 'click.html?' + data[1];
  3457. $.get(url, {}, {
  3458. 'Content-Type': 'application/json; charset=utf-8',
  3459. }).then(function (url) {
  3460. $.openLink(url);
  3461. });
  3462. },
  3463. });
  3464. $.register({
  3465. rule: {
  3466. host: /^(www\.)?sa\.ae$/,
  3467. path: /^\/\w+\/$/,
  3468. },
  3469. ready: function () {
  3470. 'use strict';
  3471. var m = $.searchScripts(/var real_link = '([^']+)';/);
  3472. $.openLink(m[1]);
  3473. },
  3474. });
  3475. $.register({
  3476. rule: {
  3477. host: /^(www\.)?safeurl\.eu$/,
  3478. path: /\/\w+/,
  3479. },
  3480. ready: function () {
  3481. 'use strict';
  3482. var directUrl = $.searchScripts(/window\.open\("([^"]+)"\);/);
  3483. if (!directUrl) {
  3484. throw new _.AdsBypasserError('script content changed');
  3485. }
  3486. directUrl = directUrl[1];
  3487. $.openLink(directUrl);
  3488. },
  3489. });
  3490. $.register({
  3491. rule: {
  3492. host: [
  3493. /^segmentnext\.com$/,
  3494. /^(www\.)?videogamesblogger.com$/,
  3495. ],
  3496. path: /^\/interstitial\.html$/,
  3497. query: /return_url=([^&]+)/,
  3498. },
  3499. start: function (m) {
  3500. 'use strict';
  3501. $.openLink(decodeURIComponent(m.query[1]));
  3502. },
  3503. });
  3504. $.register({
  3505. rule: {
  3506. host: /^(www\.)?(apploadz\.ru|seomafia\.net)$/
  3507. },
  3508. ready: function () {
  3509. 'use strict';
  3510. $.removeNodes('iframe');
  3511. var a = $('table a');
  3512. $.openLink(a.href);
  3513. },
  3514. });
  3515. $.register({
  3516. rule: /http:\/\/setlinks\.us\/(p|t|d).*/,
  3517. ready: function () {
  3518. 'use strict';
  3519. var k = $.searchScripts(/window\.location='([^']+)'/);
  3520. if (k) {
  3521. $.openLink(k[1]);
  3522. return;
  3523. }
  3524. var aLinks = $.$$('div.links-container.result-form:not(.p-links-container) > span.dlinks > a');
  3525. if (aLinks.size() === 1) {
  3526. $.openLink(aLinks.at(0).href);
  3527. return;
  3528. }
  3529. k = $('img[alt=captcha]');
  3530. $.captcha(k.src, function (a) {
  3531. var b = $('#captcha');
  3532. var c = $('input[name=Submit]');
  3533. b.value = a;
  3534. c.click();
  3535. });
  3536. },
  3537. });
  3538. (function () {
  3539. 'use strict';
  3540. function afterGotSessionId (sessionId) {
  3541. var X_NewRelic_ID = $.searchScripts(/xpid:"([^"]+)"/);
  3542. var data = {
  3543. adSessionId: sessionId,
  3544. };
  3545. var header = {
  3546. Accept: 'application/json, text/javascript',
  3547. };
  3548. if (X_NewRelic_ID) {
  3549. header['X-NewRelic-ID'] = X_NewRelic_ID;
  3550. }
  3551. var i = setInterval(function () {
  3552. $.get('/shortest-url/end-adsession', data, header).then(function (text) {
  3553. var r = _.parseJSON(text);
  3554. if (r.status == "ok" && r.destinationUrl) {
  3555. clearInterval(i);
  3556. $.removeAllTimer();
  3557. var url = decodeURIComponent(r.destinationUrl);
  3558. $.openLink(url);
  3559. }
  3560. });
  3561. }, 1000);
  3562. }
  3563. var hostRules = /^sh\.st|(dh10thbvu|u2ks|jnw0|qaafa)\.com|digg\.to|viid\.me|short\.est$/;
  3564. $.register({
  3565. rule: {
  3566. host: hostRules,
  3567. path: /^\/freeze\/.+/,
  3568. },
  3569. ready: function () {
  3570. var o = new MutationObserver(function (mutations) {
  3571. mutations.forEach(function (mutation) {
  3572. if (mutation.target.getAttribute('class').match(/active/)) {
  3573. o.disconnect();
  3574. $.openLink(mutation.target.href);
  3575. }
  3576. });
  3577. });
  3578. o.observe($('#skip_button'), {
  3579. attributes: true,
  3580. attributeFilter: ['class'],
  3581. });
  3582. },
  3583. });
  3584. $.register({
  3585. rule: {
  3586. host: hostRules,
  3587. path: /https?:\/\//,
  3588. },
  3589. start: function () {
  3590. var url = window.location.pathname + window.location.search + window.location.hash;
  3591. url = url.match(/(https?:\/\/.*)$/);
  3592. url = url[1];
  3593. $.openLink(url);
  3594. },
  3595. });
  3596. $.register({
  3597. rule: {
  3598. host: hostRules,
  3599. path: /^\/[\d\w]+/,
  3600. },
  3601. start: function () {
  3602. $.window._impspcabe = 0;
  3603. },
  3604. ready: function () {
  3605. $.removeNodes('iframe');
  3606. $.removeAllTimer();
  3607. var m = $.searchScripts(/sessionId: "([\d\w]+)",/);
  3608. if (m) {
  3609. afterGotSessionId(m[1]);
  3610. return;
  3611. }
  3612. var o = new MutationObserver(function (mutations) {
  3613. mutations.forEach(function (mutation) {
  3614. var m = $.searchScripts(/sessionId: "([\d\w]+)",/);
  3615. if (m) {
  3616. o.disconnect();
  3617. afterGotSessionId(m[1]);
  3618. }
  3619. });
  3620. });
  3621. o.observe(document.body, {
  3622. childList: true,
  3623. });
  3624. },
  3625. });
  3626. })();
  3627. $.register({
  3628. rule: {
  3629. host: [
  3630. /^(www\.)?shink\.in$/,
  3631. /^fas\.li$/,
  3632. /^croco\.me$/,
  3633. ],
  3634. path: /^\/\w+$/,
  3635. },
  3636. ready: function () {
  3637. 'use strict';
  3638. var f = $('#skip');
  3639. if (!$.$('#captcha')) {
  3640. f.submit();
  3641. return;
  3642. }
  3643. var envio = $('#envio');
  3644. envio.disabled = false;
  3645. envio.style.visibility = 'hidden';
  3646. envio.style.display = 'none';
  3647. var envio2 = $('#envio2');
  3648. envio2.style.visibility = 'visible';
  3649. envio2.style.display = 'block';
  3650. $.window.$('#myModal').reveal();
  3651. },
  3652. });
  3653. $.register({
  3654. rule: [
  3655. {
  3656. host: [
  3657. /^(www\.)?shink\.in$/,
  3658. /^fas\.li$/,
  3659. ],
  3660. path: /^\/go\/\w+$/,
  3661. },
  3662. {
  3663. host: /^croco\.me$/,
  3664. path: /^\/ok\/\w+$/,
  3665. },
  3666. ],
  3667. ready: function () {
  3668. 'use strict';
  3669. var a = $('#btn-main');
  3670. var i = a.href.lastIndexOf('http');
  3671. a = a.href.substr(i);
  3672. $.openLink(a);
  3673. },
  3674. });
  3675. $.register({
  3676. rule: {
  3677. host: /^short.am$/,
  3678. },
  3679. ready: function () {
  3680. 'use strict';
  3681. _.wait(5000).then(function () {
  3682. $.openLink('', {
  3683. post: {
  3684. image: 'Continue',
  3685. },
  3686. });
  3687. });
  3688. },
  3689. });
  3690. $.register({
  3691. rule: {
  3692. host: [
  3693. /^(www\.)?shortenurl\.tk$/,
  3694. /^(www\.)?pengaman\.link$/,
  3695. /^urlgo\.gs$/,
  3696. ],
  3697. path: /^\/\w+$/,
  3698. },
  3699. ready: function (m) {
  3700. 'use strict';
  3701. var l = $('a.btn-block.redirect');
  3702. $.openLink(l.href);
  3703. },
  3704. });
  3705. $.register({
  3706. rule: {
  3707. host: /^(www\.)?shorti\.ga$/,
  3708. path: [
  3709. /^\/\w+$/,
  3710. /^\/url_redirector\.html$/,
  3711. ],
  3712. },
  3713. ready: function () {
  3714. 'use strict';
  3715. var f = $.$$('frame');
  3716. var fl = f.find(function(value, key, self) {
  3717. if (value.getAttribute('class')) {
  3718. return _.none;
  3719. }
  3720. return 'Target frame found';
  3721. });
  3722. $.openLink(fl.value.src);
  3723. },
  3724. });
  3725. $.register({
  3726. rule: {
  3727. host: /^www\.shortskip\.com$/,
  3728. path: /^\/short\.php$/,
  3729. query: /i=([^&]+)/,
  3730. },
  3731. start: function (m) {
  3732. 'use strict';
  3733. var url = decodeURIComponent(m.query[1]);
  3734. $.openLink(url);
  3735. },
  3736. });
  3737. $.register({
  3738. rule: {
  3739. host: /^sht\.io$/,
  3740. path: /^\/\d+\/(.+)$/,
  3741. },
  3742. start: function (m) {
  3743. 'use strict';
  3744. var url = atob(m.path[1]);
  3745. url = url.match(/\{sht-io\}(.+)\{sht-io\}.*\{sht-io\}/);
  3746. $.openLink(url[1]);
  3747. },
  3748. });
  3749. $.register({
  3750. rule: {
  3751. host: /^(www\.)?similarsites\.com$/,
  3752. path: /^\/goto\/([^?]+)/
  3753. },
  3754. start: function (m) {
  3755. 'use strict';
  3756. var l = m.path[1];
  3757. if (!/^https?:\/\//.test(l)) {
  3758. l = 'http://' + l;
  3759. }
  3760. $.openLink(l);
  3761. },
  3762. });
  3763. $.register({
  3764. rule: {
  3765. host: /^smll\.io$/,
  3766. },
  3767. ready: function () {
  3768. 'use strict';
  3769. var m = $.searchScripts(/window\.location="([^"]*)";/);
  3770. $.openLink(m[1]);
  3771. },
  3772. });
  3773. $.register({
  3774. rule: {
  3775. host: /^www\.spaste\.com$/,
  3776. path: /^\/go\/\w+$/,
  3777. },
  3778. ready: function () {
  3779. 'use strict';
  3780. var id = $.searchScripts(/\{id:'(\d+)'\}/);
  3781. _.wait(3000).then(function () {
  3782. return $.post('/site/getRedirectLink', {
  3783. id: id,
  3784. }).then(function (url) {
  3785. $.openLink(url);
  3786. });
  3787. });
  3788. },
  3789. });
  3790. $.register({
  3791. rule: {
  3792. host: /^srnk\.co$/,
  3793. path: /^\/i\//,
  3794. },
  3795. ready: function () {
  3796. 'use strict';
  3797. var a = $.$('#btn-with-link');
  3798. if (!a) {
  3799. return;
  3800. }
  3801. var href = a.href;
  3802. var method = a.dataset.method;
  3803. if (method) {
  3804. var csrfParam = $('meta[name="csrf-param"]').content;
  3805. var csrfToken = $('meta[name="csrf-token"]').content;
  3806. var form = document.createElement('form');
  3807. form.method = 'post';
  3808. form.action = href;
  3809. var input = document.createElement('input');
  3810. input.name = '_method';
  3811. input.value = method;
  3812. form.appendChild(input);
  3813. input = document.createElement('input');
  3814. input.name = csrfParam;
  3815. input.value = csrfToken;
  3816. form.appendChild(input);
  3817. document.body.appendChild(form);
  3818. form.submit();
  3819. return;
  3820. }
  3821. $.post(location.pathname + '.js').then(function (script) {
  3822. var m = script.match(/var link = "([^"]+)";/);
  3823. if (!m) {
  3824. _.warn('script changed');
  3825. return;
  3826. }
  3827. $.openLink(m[1]);
  3828. });
  3829. },
  3830. });
  3831. $.register({
  3832. rule: {
  3833. host: /^stash-coins\.com$/,
  3834. },
  3835. start: function () {
  3836. 'use strict';
  3837. var url = window.location.toString();
  3838. var i = url.lastIndexOf('http');
  3839. url = url.substr(i);
  3840. $.openLink(url);
  3841. },
  3842. });
  3843. $.register({
  3844. rule: {
  3845. host: /^streamingfrench\.net$/,
  3846. path: /^\/$/,
  3847. query: /^\?xb=(.+)$/,
  3848. },
  3849. start: function (m) {
  3850. 'use strict';
  3851. var url = decodeURIComponent(m.query[1]);
  3852. $.openLink(url);
  3853. },
  3854. });
  3855. $.register({
  3856. rule: {
  3857. host: /^(www\.)?supercheats\.com$/,
  3858. path: /^\/interstitial\.html$/,
  3859. query: /(?:\?|&)oldurl=([^&]+)(?:$|&)/,
  3860. },
  3861. start: function (m) {
  3862. 'use strict';
  3863. $.openLink(m.query[1]);
  3864. },
  3865. });
  3866. $.register({
  3867. rule: [
  3868. {
  3869. host: [
  3870. /^(www\.)?sylnk\.net$/,
  3871. /^dlneko\.(com|net|org)$/,
  3872. /^rumahsimpel\.com$/,
  3873. ],
  3874. query: /link=([^&]+)/,
  3875. },
  3876. {
  3877. host: /^(www\.)?compul\.in$/,
  3878. path: /^\/[np]\.php$/,
  3879. query: /v=([^&]+)/,
  3880. },
  3881. {
  3882. host: /^(www\.)?safelinkair\.com$/,
  3883. path: /^\/code$/,
  3884. query: /(?:\?|&)link=([a-zA-Z0-9\/=]+)(?:$|&)/,
  3885. },
  3886. {
  3887. host: [
  3888. /^link\.filmku\.net$/,
  3889. /^www\.healthygress24\.ga$/,
  3890. /^kombatch\.amankan\.link$/,
  3891. ],
  3892. path: /^\/p\/(go|healty-lie)\.html$/,
  3893. query: /^\?url=([a-zA-Z0-9\/=]+)$/,
  3894. },
  3895. {
  3896. host: [
  3897. /^(gadget|auto|sports)14\.pw$/,
  3898. /^motosport\.pw$/,
  3899. /^nar-04\.tk$/,
  3900. /^lindung\.in$/,
  3901. /^motonews\.club$/,
  3902. /^ww[23]\.picnictrans\.com$/,
  3903. /^gadget13\.com$/,
  3904. ],
  3905. query: /^\?d=([a-zA-Z0-9\/=]+)$/,
  3906. },
  3907. {
  3908. host: /^www\.anisubsia\.tk$/,
  3909. path: /^\/p\/link\.html$/,
  3910. query: /^\?url=([a-zA-Z0-9\/=]+)$/,
  3911. },
  3912. {
  3913. host: [
  3914. /^www\.insurance1\.tech$/,
  3915. /^www\.freeanimeonline\.xyz$/,
  3916. ],
  3917. query: /^\?site=([a-zA-Z0-9\/=]+)/,
  3918. },
  3919. {
  3920. host: /^i\.gtaind\.com$/,
  3921. query: /^\?([a-zA-Z0-9\/=]+)$/,
  3922. },
  3923. {
  3924. host: /\.blogspot\.com?/,
  3925. query: /^\?url=([a-zA-Z0-9\/=]+)$/,
  3926. },
  3927. ],
  3928. start: function (m) {
  3929. 'use strict';
  3930. var rawLink = atob(m.query[1]);
  3931. $.openLink(rawLink);
  3932. },
  3933. });
  3934. $.register({
  3935. rule: [
  3936. {
  3937. host: [
  3938. /(^|\.)safelinkconverter2?\.com$/,
  3939. /^safelink(s?review(er)?)\.com?$/,
  3940. /^susutin\.com$/,
  3941. /^(getcomics|miuitutorial)\.gq$/,
  3942. ],
  3943. query: /id=(\w+=*)/,
  3944. },
  3945. {
  3946. host: [
  3947. /^(www\.)?dlneko\.com$/,
  3948. /^(satuasia|tawaku)\.com$/,
  3949. /^ww3\.manteb\.in$/,
  3950. /^link\.filmku\.net$/,
  3951. /^www\.muucih\.com$/,
  3952. /^(naisho|filmku)\.lompat\.in$/,
  3953. /^edogawa\.lon\.pw$/,
  3954. ],
  3955. query: /go=(\w+=*)/,
  3956. },
  3957. ],
  3958. start: function (m) {
  3959. 'use strict';
  3960. var l = atob(m.query[1]);
  3961. var table = {
  3962. '!': 'a',
  3963. ')': 'e',
  3964. '_': 'i',
  3965. '(': 'o',
  3966. '*': 'u',
  3967. };
  3968. l = l.replace(/[!)_(*]/g, function (m) {
  3969. return table[m];
  3970. });
  3971. $.openLink(l);
  3972. },
  3973. });
  3974. $.register({
  3975. rule: {
  3976. host: /^(www\.)?safelinkreview\.com$/,
  3977. path: /^\/\w+\/cost\/([\w\.]+)\/?$/,
  3978. },
  3979. start: function (m) {
  3980. 'use strict';
  3981. var l = 'http://' + m.path[1];
  3982. $.openLink(l);
  3983. },
  3984. });
  3985. $.register({
  3986. rule: {
  3987. host: [
  3988. /^designinghomey\.com$/,
  3989. /^motonews\.club$/,
  3990. /^(autofans|landscapenature)\.pw$/,
  3991. ],
  3992. query: /get=([^&]+)/,
  3993. },
  3994. ready: function (m) {
  3995. 'use strict';
  3996. var s = $.searchScripts(/var a='([^']+)'/);
  3997. if (s) {
  3998. $.openLink(s[1]);
  3999. return;
  4000. }
  4001. s = atob(m.query[1]);
  4002. $.openLink(s);
  4003. },
  4004. });
  4005. $.register({
  4006. rule: {
  4007. host: /^kombatch\.loncat\.pw$/,
  4008. },
  4009. ready: function () {
  4010. 'use strict';
  4011. var s = $.searchScripts(/\.open\("([^"]+)",/);
  4012. s = s[1].match(/go=([^&]+)/);
  4013. s = atob(s[1]);
  4014. $.openLink(s);
  4015. },
  4016. });
  4017. $.register({
  4018. rule: {
  4019. host: /^ww[23]\.picnictrans\.com$/,
  4020. },
  4021. ready: function () {
  4022. 'use strict';
  4023. var a = $('div.kiri > center > a');
  4024. $.openLink(a.href);
  4025. },
  4026. });
  4027. $.register({
  4028. rule: {
  4029. host: /^thinfi\.com$/,
  4030. },
  4031. ready: function () {
  4032. 'use strict';
  4033. var a = $('div p a');
  4034. $.openLink(a.href);
  4035. },
  4036. });
  4037. $.register({
  4038. rule: {
  4039. host: /^tinyarrows\.com$/,
  4040. path: /^\/preview\.php$/,
  4041. query: /^\?page=([^&]+)/,
  4042. },
  4043. start: function (m) {
  4044. 'use strict';
  4045. $.openLink(decodeURIComponent(m.query[1]));
  4046. },
  4047. });
  4048. $.register({
  4049. rule: {
  4050. host: /^(www\.)?totaldebrid\.org$/,
  4051. path:/\/l\/(l\.php)?$/,
  4052. query: /\?ads=([a-zA-Z0-9=]+)$/,
  4053. },
  4054. start: function (m) {
  4055. 'use strict';
  4056. var l = atob(m.query[1]);
  4057. $.openLink(l);
  4058. },
  4059. });
  4060. $.register({
  4061. rule: {
  4062. host: /^(www\.)?typ\.me$/,
  4063. },
  4064. ready: function (m) {
  4065. 'use strict';
  4066. var a = $('#skipAdBtn');
  4067. $.openLink(a.href);
  4068. },
  4069. });
  4070. $.register({
  4071. rule: {
  4072. host: /^(www\.)?ultshare\.com$/,
  4073. path: /^\/(?:(?:\d-)?(\d+)|index\.php)$/,
  4074. query: /^(?:\?a=\d&c=(\d+))?$/
  4075. },
  4076. start: function (m) {
  4077. 'use strict';
  4078. var linkId = m.path[1]?m.path[1]:m.query[1];
  4079. var directLink = '/3-' + linkId;
  4080. $.openLink(directLink);
  4081. },
  4082. });
  4083. $.register({
  4084. rule: {
  4085. host: /^unfake\.it$/,
  4086. },
  4087. ready: function () {
  4088. 'use strict';
  4089. var frame = $('frame');
  4090. var i = frame.src.lastIndexOf('http://');
  4091. $.openLink(frame.src.substr(i));
  4092. },
  4093. });
  4094. $.register({
  4095. rule: {
  4096. host: /^(www\.)?(upan|gxp)\.so$/,
  4097. path: /^\/\w+$/,
  4098. },
  4099. ready: function () {
  4100. 'use strict';
  4101. var a = $('table.td_line a[onclick="down_process_s();"]');
  4102. $.openLink(a.href);
  4103. },
  4104. });
  4105. $.register({
  4106. rule: {
  4107. host: /^url\.ie$/,
  4108. },
  4109. ready: function () {
  4110. 'use strict';
  4111. var a = $('a[title="Link to original URL"]');
  4112. $.openLink(a.href);
  4113. },
  4114. });
  4115. $.register({
  4116. rule: {
  4117. host: /urlcash\.(com|net|org)|(bat5|detonating|celebclk|eightteen|smilinglinks|peekatmygirlfriend|pornyhost|clb1|urlgalleries)\.com|looble\.net|xxxs\.org$/,
  4118. },
  4119. ready: function () {
  4120. 'use strict';
  4121. if ($.window && $.window.linkDestUrl) {
  4122. $.openLink($.window.linkDestUrl);
  4123. return;
  4124. }
  4125. var matches = document.body.innerHTML.match(/linkDestUrl = '(.+)'/);
  4126. if (matches) {
  4127. $.openLink(matches[1]);
  4128. return;
  4129. }
  4130. },
  4131. });
  4132. $.register({
  4133. rule: {
  4134. host: /^urlinn\.com$/,
  4135. },
  4136. ready: function () {
  4137. 'use strict';
  4138. var m = $('META[HTTP-EQUIV=refresh]').getAttribute('CONTENT').match(/url='([^']+)'/);
  4139. if (m) {
  4140. $.openLink(m[1]);
  4141. }
  4142. },
  4143. });
  4144. $.register({
  4145. rule: {
  4146. host: /^urlms\.com$/,
  4147. },
  4148. ready: function () {
  4149. 'use strict';
  4150. var iframe = $('#content');
  4151. $.openLink(iframe.src);
  4152. },
  4153. });
  4154. $.register({
  4155. rule: {
  4156. host: /^(www\.)?urlv2\.com$/,
  4157. },
  4158. ready: function (m) {
  4159. 'use strict';
  4160. if (window.location.pathname.indexOf('locked') >= 0) {
  4161. var path = window.location.pathname.replace('/locked', '');
  4162. $.openLink(path);
  4163. return;
  4164. }
  4165. var m = $.searchScripts(/jeton=([\w]+)/);
  4166. var l = 'http://urlv2.com/algo.php?action=passer&px=0&so=1&jeton=' + m[1];
  4167. window.setTimeout(function() {$.openLink(l)}, 5000);
  4168. },
  4169. });
  4170. $.register({
  4171. rule: {
  4172. host: /^(www\.)?uskip\.me$/,
  4173. path: /^\/go\/\w+$/,
  4174. },
  4175. ready: function (m) {
  4176. 'use strict';
  4177. var a = $('#btn-main');
  4178. $.openLink(a.href);
  4179. },
  4180. });
  4181. $.register({
  4182. rule: {
  4183. host: /^vavi\.co$/,
  4184. },
  4185. ready: function () {
  4186. 'use strict';
  4187. var l = $('#goLink');
  4188. $.openLink(l.href);
  4189. },
  4190. });
  4191. $.register({
  4192. rule: {
  4193. host: /^(www\.)?victly\.com$/,
  4194. path: /^\/\w+$/,
  4195. },
  4196. start: function () {
  4197. 'use strict';
  4198. $.post(document.location.href, {
  4199. hidden: '',
  4200. image: 'Skip+Ads',
  4201. }).then(function (text) {
  4202. var m = text.match(/window\.location\.replace\('([^']+)'\)/);
  4203. $.openLink(m[1]);
  4204. });
  4205. },
  4206. });
  4207. $.register({
  4208. rule: {
  4209. host: /^www\.viidii\.info$/,
  4210. },
  4211. ready: function () {
  4212. 'use strict';
  4213. var o = $('#directlink');
  4214. $.openLink(o.href);
  4215. },
  4216. });
  4217. $.register({
  4218. rule: {
  4219. host: /^(www\.)?vir\.al$/,
  4220. },
  4221. ready: function () {
  4222. 'use strict';
  4223. var m = $.searchScripts(/var target_url = '([^']+)';/);
  4224. if (!m) {
  4225. throw new _.AdsBypasserError('site changed');
  4226. }
  4227. $.openLink(m[1]);
  4228. },
  4229. });
  4230. $.register({
  4231. rule: {
  4232. host: /^(www\.)?wzzq\.me$/,
  4233. },
  4234. ready: function () {
  4235. 'use strict';
  4236. try {
  4237. var l = $('#img_loading_table2 div.wz_img_hit a[target=_blank]').href;
  4238. $.openLink(l);
  4239. } catch (e) {
  4240. }
  4241. },
  4242. });
  4243. $.register({
  4244. rule: {
  4245. host: /^xlink.me$/
  4246. },
  4247. ready: function () {
  4248. 'use strict';
  4249. var a = $('#main_form > center > a');
  4250. if (!a) {return;}
  4251. $.openLink(a.href);
  4252. },
  4253. });
  4254. $.register({
  4255. rule: 'http://yep.it/preview.php?p=*',
  4256. ready: function () {
  4257. 'use strict';
  4258. var link = $('font[color="grey"]').innerHTML;
  4259. $.openLink(link);
  4260. },
  4261. });
  4262. $.register({
  4263. rule: 'http://www.yooclick.com/l/*',
  4264. ready: function () {
  4265. 'use strict';
  4266. $.removeNodes('iframe');
  4267. var uniq = $.window.uniq || $.window.uniqi;
  4268. if (!uniq) {return;}
  4269. var path = window.location.pathname;
  4270. var url = _.T('{0}?ajax=true&adblock=false&old=false&framed=false&uniq={1}')(path, uniq);
  4271. var getURL = function() {
  4272. $.get(url).then(function (text) {
  4273. 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);
  4274. if (goodURL) {
  4275. $.openLink(text);
  4276. } else {
  4277. setTimeout(getURL, 500);
  4278. }
  4279. });
  4280. }
  4281. getURL();
  4282. },
  4283. });
  4284. $.register({
  4285. rule: {
  4286. host: /^ysf\.pl$/,
  4287. path: /^\/3\/(.+)$/,
  4288. },
  4289. start: function (m) {
  4290. 'use strict';
  4291. var url = atob(m.path[1]);
  4292. $.openLink(url);
  4293. },
  4294. });
  4295. $.register({
  4296. rule: {
  4297. host: /^ysf\.pl$/,
  4298. path: /^\/2\/(.+)$/,
  4299. },
  4300. start: function (m) {
  4301. 'use strict';
  4302. var url = m.path[1].match(/.{2}/g).map(function (h) {
  4303. return String.fromCharCode(parseInt(h, 16));
  4304. }).join('');
  4305. $.openLink(url);
  4306. },
  4307. });
  4308. $.register({
  4309. rule: 'http://zo.mu/redirector/process?link=*',
  4310. ready: function () {
  4311. 'use strict';
  4312. $.removeNodes('iframe');
  4313. window.location.reload();
  4314. },
  4315. });
  4316. $.register({
  4317. rule: {
  4318. host: /^zzz\.gl$/,
  4319. },
  4320. ready: function () {
  4321. 'use strict';
  4322. var m = $.searchScripts(/var domainurl = '([^']+)';/);
  4323. if (!m) {
  4324. throw new _.AdsBypasserError('site changed');
  4325. }
  4326. $.openLink(m[1]);
  4327. },
  4328. });
  4329. (function (context, factory) {
  4330. if (typeof module === 'object' && typeof module.exports === 'object') {
  4331. module.exports = function (context, GM) {
  4332. var _ = require('lodash');
  4333. var core = require('./core.js');
  4334. var dom = require('./dom.js');
  4335. var config = require('./config.js');
  4336. var link = require('./link.js');
  4337. var misc = require('./misc.js');
  4338. var modules = [dom, config, link, misc].map(function (v) {
  4339. return v.call(null, context, GM);
  4340. });
  4341. var $ = _.assign.apply(_, modules);
  4342. return factory(context, GM, core, $);
  4343. };
  4344. } else {
  4345. factory(context, {
  4346. getResourceText: GM_getResourceText,
  4347. addStyle: GM_addStyle,
  4348. getResourceURL: GM_getResourceURL,
  4349. }, context._, context.$);
  4350. }
  4351. }(this, function (context, GM, _, $) {
  4352. 'use strict';
  4353. var window = context.window;
  4354. var document = window.document;
  4355. $.openImage = function (imgSrc, options) {
  4356. options = options || {};
  4357. var replace = !!options.replace;
  4358. var referer = !!options.referer;
  4359. if (replace) {
  4360. replaceBody(imgSrc);
  4361. return;
  4362. }
  4363. if ($.config.redirectImage) {
  4364. $.openLink(imgSrc, {
  4365. referer: referer,
  4366. });
  4367. }
  4368. };
  4369. function enableScrolling () {
  4370. var o = document.compatMode === 'CSS1Compat' ? document.documentElement : document.body;
  4371. o.style.overflow = '';
  4372. };
  4373. function toggleShrinking () {
  4374. this.classList.toggle('adsbypasser-shrinked');
  4375. }
  4376. function checkScaling () {
  4377. var nw = this.naturalWidth;
  4378. var nh = this.naturalHeight;
  4379. var cw = document.documentElement.clientWidth;
  4380. var ch = document.documentElement.clientHeight;
  4381. if ((nw > cw || nh > ch) && !this.classList.contains('adsbypasser-resizable')) {
  4382. this.classList.add('adsbypasser-resizable');
  4383. this.classList.add('adsbypasser-shrinked');
  4384. this.addEventListener('click', toggleShrinking);
  4385. } else {
  4386. this.removeEventListener('click', toggleShrinking);
  4387. this.classList.remove('adsbypasser-shrinked');
  4388. this.classList.remove('adsbypasser-resizable');
  4389. }
  4390. }
  4391. function scaleImage (i) {
  4392. var style = GM.getResourceText('scaleImage');
  4393. GM.addStyle(style);
  4394. if (i.naturalWidth && i.naturalHeight) {
  4395. checkScaling.call(i);
  4396. } else {
  4397. i.addEventListener('load', checkScaling);
  4398. }
  4399. var h;
  4400. window.addEventListener('resize', function () {
  4401. window.clearTimeout(h);
  4402. h = window.setTimeout(checkScaling.bind(i), 100);
  4403. });
  4404. }
  4405. function changeBackground () {
  4406. var bgImage = GM.getResourceURL('bgImage');
  4407. document.body.style.backgroundColor = '#222222';
  4408. document.body.style.backgroundImage = _.T('url(\'{0}\')')(bgImage);
  4409. }
  4410. function alignCenter () {
  4411. var style = GM.getResourceText('alignCenter');
  4412. GM.addStyle(style);
  4413. }
  4414. function injectStyle (d, i) {
  4415. $.removeNodes('style, link[rel=stylesheet]');
  4416. d.id = 'adsbypasser-wrapper';
  4417. i.id = 'adsbypasser-image';
  4418. }
  4419. function replaceBody (imgSrc) {
  4420. if (!$.config.redirectImage) {
  4421. return;
  4422. }
  4423. if (!imgSrc) {
  4424. _.warn('false url');
  4425. return;
  4426. }
  4427. _.info(_.T('replacing body with `{0}` ...')(imgSrc));
  4428. $.removeAllTimer();
  4429. enableScrolling();
  4430. document.body = document.createElement('body');
  4431. var d = document.createElement('div');
  4432. document.body.appendChild(d);
  4433. var i = document.createElement('img');
  4434. i.src = imgSrc;
  4435. d.appendChild(i);
  4436. if ($.config.alignCenter || $.config.scaleImage) {
  4437. injectStyle(d, i);
  4438. }
  4439. if ($.config.alignCenter) {
  4440. alignCenter();
  4441. }
  4442. if ($.config.changeBackground) {
  4443. changeBackground();
  4444. }
  4445. if ($.config.scaleImage) {
  4446. scaleImage(i);
  4447. }
  4448. };
  4449. return $;
  4450. }));
  4451. $.register({
  4452. rule: [
  4453. {
  4454. host: /^1(dl|be)\.biz$/,
  4455. path: /^\/\w\.php$/,
  4456. query: /^\?\w\/\d+$/,
  4457. },
  4458. {
  4459. host: /^img\.1dl\.biz$/,
  4460. path: /^\/\w\.php$/,
  4461. query: /^\?\w\/([\d\/]+)$/,
  4462. },
  4463. ],
  4464. ready: function () {
  4465. 'use strict';
  4466. var a = $('.main a, .main-l a');
  4467. $.openImage(a.href, {
  4468. referer: true,
  4469. });
  4470. },
  4471. });
  4472. $.register({
  4473. rule: {
  4474. host: /^1pics\.ru$/,
  4475. },
  4476. ready: function () {
  4477. 'use strict';
  4478. var img = $('img[alt$="1Pics.Ru"]');
  4479. $.openImage(img.src);
  4480. },
  4481. });
  4482. $.register({
  4483. rule: {
  4484. host: /^www\.(2i\.(sk|cz)|2imgs\.com)$/,
  4485. },
  4486. ready: function () {
  4487. 'use strict';
  4488. var img = $('#wrap3 img');
  4489. $.openImage(img.src);
  4490. },
  4491. });
  4492. $.register({
  4493. rule: [
  4494. {
  4495. host: /^a\.pomf\.se$/,
  4496. path: /^\/.+\.htm$/,
  4497. query: /^$/,
  4498. },
  4499. {
  4500. host: /^empireload\.com$/,
  4501. path: /^\/sexy\/.+\.htm$/,
  4502. query: /^$/,
  4503. },
  4504. ],
  4505. ready: function () {
  4506. 'use strict';
  4507. var a = $.$('body > a');
  4508. if (a) {
  4509. $.openImage(a.href);
  4510. return;
  4511. }
  4512. $.removeNodes('#boxes, iframe');
  4513. },
  4514. });
  4515. (function () {
  4516. 'use strict';
  4517. function run () {
  4518. var i = $('#image');
  4519. $.openImage(i.src);
  4520. }
  4521. $.register({
  4522. rule: {
  4523. host: /^(www\.)?image(pearl|beryl|crest)\.com$/,
  4524. path: /^\/verify\/(.+)$/,
  4525. },
  4526. start: function (m) {
  4527. $.openLink('/view/' + m.path[1]);
  4528. },
  4529. });
  4530. $.register({
  4531. rule: [
  4532. 'http://*.abload.de/image.php?img=*',
  4533. 'http://www.imageup.ru/*/*/*.html',
  4534. 'http://itmages.ru/image/view/*/*',
  4535. {
  4536. host: /^(www\.)?image(pearl|beryl|crest)\.com$/,
  4537. path: /^\/view\//,
  4538. },
  4539. ],
  4540. ready: run,
  4541. });
  4542. })();
  4543. $.register({
  4544. rule: {
  4545. host: /^avenuexxx\.com$/,
  4546. },
  4547. ready: function () {
  4548. 'use strict';
  4549. var i = $('#content img');
  4550. $.openImage(i.src);
  4551. },
  4552. });
  4553. $.register({
  4554. rule: {
  4555. host: /^freeimgup\.com$/,
  4556. path: /^\/xxx/,
  4557. query: /^\?v=([^&]+)/,
  4558. },
  4559. start: function (m) {
  4560. 'use strict';
  4561. $.openImage('/xxx/images/' + m.query[1]);
  4562. },
  4563. });
  4564. $.register({
  4565. rule: {
  4566. host: /^(b4he|freeimgup|fullimg)\.com|fastpics\.net|ifap\.co$/,
  4567. query: /^\?v=([^&]+)/,
  4568. },
  4569. start: function (m) {
  4570. 'use strict';
  4571. $.openImage('/images/' + m.query[1]);
  4572. },
  4573. });
  4574. $.register({
  4575. rule: {
  4576. host: /^imagep2p\.com$/,
  4577. query: /^\?v=([^&]+)/,
  4578. },
  4579. start: function (m) {
  4580. 'use strict';
  4581. $.openImage('/images/' + m.query[1] + '.jpeg');
  4582. },
  4583. });
  4584. $.register({
  4585. rule: {
  4586. host: /^bayimg\.com$/,
  4587. },
  4588. ready: function () {
  4589. 'use strict';
  4590. var i = $('#mainImage');
  4591. $.openImage(i.src);
  4592. },
  4593. });
  4594. $.register({
  4595. rule: {
  4596. host: /^beeimg\.com$/,
  4597. path: /\/view\/.*/,
  4598. },
  4599. ready: function () {
  4600. 'use strict';
  4601. var img = $('img.img-responsive');
  4602. $.openImage(img.src);
  4603. },
  4604. });
  4605. $.register({
  4606. rule: 'http://www.bilder-space.de/*.htm',
  4607. ready: function () {
  4608. 'use strict';
  4609. $.removeNodes('iframe');
  4610. var img = $('img.picture');
  4611. $.openImage(img.src);
  4612. },
  4613. });
  4614. $.register({
  4615. rule: 'http://www.bilder-upload.eu/show.php?file=*',
  4616. ready: function () {
  4617. 'use strict';
  4618. var i = $('input[type=image]');
  4619. $.openImage(i.src);
  4620. },
  4621. });
  4622. $.register({
  4623. rule: 'http://blackcatpix.com/v.php?*',
  4624. ready: function () {
  4625. 'use strict';
  4626. var img = $('td center img');
  4627. $.openImage(img.src);
  4628. },
  4629. });
  4630. $.register({
  4631. rule: 'http://www.casimages.com/img.php?*',
  4632. ready: function () {
  4633. 'use strict';
  4634. var img = $('td a img');
  4635. $.openImage(img.src);
  4636. },
  4637. });
  4638. $.register({
  4639. rule: {
  4640. host: /^www\.x45x\.info|(imadul|mypixxx\.lonestarnaughtygirls)\.com|ghanaimages\.co|imgurban\.info|d69\.in$/,
  4641. query: /\?p[mt]=(.+)/,
  4642. },
  4643. start: function (m) {
  4644. 'use strict';
  4645. $.openImage('/?di=' + m.query[1]);
  4646. },
  4647. });
  4648. $.register({
  4649. rule: 'http://javelite.tk/viewer.php?id=*',
  4650. ready: function () {
  4651. 'use strict';
  4652. var i = $('table img');
  4653. $.openImage(i.src);
  4654. },
  4655. });
  4656. $.register({
  4657. rule: {
  4658. host: /^imgchili\.(com|net)|www\.pixhost\.org$/,
  4659. path: /^\/show\//,
  4660. },
  4661. ready: function () {
  4662. 'use strict';
  4663. $.removeNodes('iframe, #ad');
  4664. try {
  4665. $('#all').style.display = '';
  4666. } catch (e) {
  4667. }
  4668. var o = $('#show_image');
  4669. $.openImage(o.src);
  4670. },
  4671. });
  4672. $.register({
  4673. rule: {
  4674. host: /^crd\.ht$/,
  4675. },
  4676. ready: function () {
  4677. 'use strict';
  4678. var i = $('.continue > form > input[name=link]');
  4679. $.openImage(i.value);
  4680. },
  4681. });
  4682. $.register({
  4683. rule: 'http://cubeupload.com/im/*',
  4684. ready: function () {
  4685. 'use strict';
  4686. var img = $('img.galleryBigImg');
  4687. $.openImage(img.src);
  4688. },
  4689. });
  4690. $.register({
  4691. rule: {
  4692. host: [
  4693. /^dailyss\.net$/,
  4694. /daily-img\.com$/,
  4695. /img-365\.com$/,
  4696. /^365-img\.com$/,
  4697. /^i\.hentai-ddl\.org$/,
  4698. ],
  4699. path: /^\/image\/.+$/,
  4700. },
  4701. ready: function () {
  4702. 'use strict';
  4703. var i = $('#image-viewer-container img');
  4704. $.openImage(i.src);
  4705. },
  4706. });
  4707. $.register({
  4708. rule: {
  4709. host: /^xxx\.porn0day.\.com$/,
  4710. path: /^\/image\/.+$/,
  4711. },
  4712. ready: function () {
  4713. 'use strict';
  4714. var i = $('link[rel^=image_src]');
  4715. $.openImage(i.href);
  4716. },
  4717. });
  4718. $.register({
  4719. rule: {
  4720. host: /^(depic\.me|(www\.)?picamatic\.com)$/,
  4721. },
  4722. ready: function () {
  4723. 'use strict';
  4724. var i = $('#pic');
  4725. $.openImage(i.src);
  4726. },
  4727. });
  4728. $.register({
  4729. rule: {
  4730. host: /^img(dino|tiger|zap)\.com$/,
  4731. path: /^\/viewer\.php$/,
  4732. query: /^\?file=/,
  4733. },
  4734. ready: function () {
  4735. 'use strict';
  4736. var o = $('#cursor_lupa');
  4737. $.openImage(o.src);
  4738. },
  4739. });
  4740. $.register({
  4741. rule: 'http://*.directupload.net/file/*.htm',
  4742. ready: function () {
  4743. 'use strict';
  4744. var i = $('#ImgFrame');
  4745. $.openImage(i.src);
  4746. },
  4747. });
  4748. $.register({
  4749. rule: {
  4750. host: /^ehdwallpapers\.org$/,
  4751. path: /^\/images\/.*$/,
  4752. },
  4753. ready: function () {
  4754. 'use strict';
  4755. var i = $('.entry-content.clearfix img');
  4756. $.openImage(i.src);
  4757. },
  4758. });
  4759. $.register({
  4760. rule: {
  4761. host: /^(www\.)?empireload\.com$/,
  4762. path: /^(\/images(\/files\/\w)?)\/.\.php$/,
  4763. query: /^\?link=(.+)$/,
  4764. },
  4765. start: function (m) {
  4766. 'use strict';
  4767. $.openImage(m.path[1] + '/link/' + m.query[1]);
  4768. },
  4769. });
  4770. $.register({
  4771. rule: [
  4772. {
  4773. host: [
  4774. /^emptypix\.com|overdream\.cz$/,
  4775. /^www\.sexseeimage\.com$/,
  4776. ],
  4777. path: /^\/image\//,
  4778. },
  4779. {
  4780. host: /^10\.imageleon\.com$/,
  4781. path: /^\/img-(.+)\.html$/,
  4782. },
  4783. ],
  4784. ready: function () {
  4785. 'use strict';
  4786. var img = $('#full_image');
  4787. $.openImage(img.src);
  4788. },
  4789. });
  4790. $.register({
  4791. rule: {
  4792. host: /^sexyxpixels\.com$/,
  4793. query: /^\?v=/,
  4794. },
  4795. ready: function () {
  4796. 'use strict';
  4797. var img = $('#full_image');
  4798. $.openImage(img.src, {
  4799. referer: true,
  4800. });
  4801. },
  4802. });
  4803. $.register({
  4804. rule: {
  4805. host: /^fastpic\.ru$/,
  4806. path: /^\/view\//,
  4807. },
  4808. ready: function () {
  4809. 'use strict';
  4810. var img = $('#picContainer #image');
  4811. $.openImage(img.src, {
  4812. referer: true,
  4813. });
  4814. },
  4815. });
  4816. $.register({
  4817. rule: 'http://www.fotolink.su/v.php?id=*',
  4818. ready: function () {
  4819. 'use strict';
  4820. var i = $('#content img');
  4821. $.openImage(i.src);
  4822. },
  4823. });
  4824. $.register({
  4825. rule: 'http://www.fotosik.pl/pokaz_obrazek/pelny/*.html',
  4826. ready: function () {
  4827. 'use strict';
  4828. var i = $('a.noborder img');
  4829. $.openImage(i.src);
  4830. },
  4831. });
  4832. $.register({
  4833. rule: {
  4834. host: /^freakimage\.com|www\.hostpic\.org$/,
  4835. path: /^\/view\.php$/,
  4836. query: /^\?filename=([^&]+)/,
  4837. },
  4838. start: function (m) {
  4839. 'use strict';
  4840. $.openImage('/images/' + m.query[1]);
  4841. },
  4842. });
  4843. $.register({
  4844. rule: {
  4845. host: /^freeimgup\.com$/,
  4846. path: /^\/xxx\//,
  4847. },
  4848. ready: function () {
  4849. 'use strict';
  4850. var img = $('#mainimage');
  4851. $.openImage(img.src);
  4852. },
  4853. });
  4854. $.register({
  4855. rule: [
  4856. 'http://funkyimg.com/viewer.php?img=*',
  4857. 'http://funkyimg.com/view/*',
  4858. ],
  4859. ready: function () {
  4860. 'use strict';
  4861. var i = $('#viewer img');
  4862. $.openImage(i.src);
  4863. },
  4864. });
  4865. $.register({
  4866. rule: {
  4867. host: /^(www\.)?gallery(nova|sense)\.se$/,
  4868. path: /^\/site\/v\//,
  4869. },
  4870. ready: function () {
  4871. 'use strict';
  4872. var i = $('#myUniqueImg').parentNode;
  4873. $.openImage(i.href);
  4874. },
  4875. });
  4876. $.register({
  4877. rule: {
  4878. host: /^(www\.)?gallerynova\.se$/,
  4879. path: /^\/site\/viewImage\/(\w+)/,
  4880. },
  4881. ready: function (m) {
  4882. 'use strict';
  4883. var confirm = $.searchScripts(/\$\("#confirmImage"\).val\("([^"]+)"\)/)[1];
  4884. $.post('/site/viewConfirmCode/' + m.path[1], {
  4885. confirm: confirm
  4886. }).then(function (rawJson) {
  4887. var json = _.parseJSON(rawJson);
  4888. var decodedHTML = document.createTextNode(json.content).data;
  4889. var imgURL = decodedHTML.match(/<a href="([^"]+)" target="_blank">/)[1];
  4890. $.openImage(imgURL);
  4891. });
  4892. },
  4893. });
  4894. (function () {
  4895. 'use strict';
  4896. var hostRule = /^goimagehost\.com$/;
  4897. $.register({
  4898. rule: {
  4899. host: hostRule,
  4900. path: /^\/xxx\/images\//,
  4901. },
  4902. });
  4903. $.register({
  4904. rule: {
  4905. host: hostRule,
  4906. path: /^\/xxx\/(.+)/,
  4907. },
  4908. start: function (m) {
  4909. $.openImage('/xxx/images/' + m.path[1]);
  4910. },
  4911. });
  4912. $.register({
  4913. rule: {
  4914. host: hostRule,
  4915. query: /^\?v=(.+)/,
  4916. },
  4917. start: function (m) {
  4918. $.openImage('/xxx/images/' + m.query[1]);
  4919. },
  4920. });
  4921. })();
  4922. $.register({
  4923. rule: {
  4924. host: /www\.(h-animes|adultmove)\.info/,
  4925. path: /^\/.+\/.+\/.+\.html$/,
  4926. },
  4927. ready: function () {
  4928. 'use strict';
  4929. var a = $('.dlbutton2 > a');
  4930. $.openImage(a.href);
  4931. },
  4932. });
  4933. $.register({
  4934. rule: 'http://hentaimg.com/mg/lndex-1.php?img=*',
  4935. ready: function () {
  4936. 'use strict';
  4937. $.openLink('index-1.php' + window.location.search);
  4938. },
  4939. });
  4940. $.register({
  4941. rule: 'http://hentaimg.com/mg/index-1.php?img=*',
  4942. ready: function () {
  4943. 'use strict';
  4944. var i = $('#content img');
  4945. $.openImage(i.src);
  4946. },
  4947. });
  4948. $.register({
  4949. rule: 'http://www.hostingpics.net/viewer.php?id=*',
  4950. ready: function () {
  4951. 'use strict';
  4952. var i = $('#img_viewer');
  4953. $.openImage(i.src);
  4954. },
  4955. });
  4956. $.register({
  4957. rule: {
  4958. host: /^ichan\.org$/,
  4959. path: /^\/image\.php$/,
  4960. query: /path=(.+)$/,
  4961. },
  4962. start: function (m) {
  4963. 'use strict';
  4964. $.openImage('/' + m.query[1]);
  4965. },
  4966. });
  4967. $.register({
  4968. rule: {
  4969. host: /ichan\.org$/,
  4970. },
  4971. ready: function () {
  4972. 'use strict';
  4973. $.$$('a').each(function (a) {
  4974. if (a.href.indexOf('/url/http://') > -1) {
  4975. a.href = a.href.replace(/http:\/\/.+\/url\/(?=http:\/\/)/, '');
  4976. }
  4977. });
  4978. },
  4979. });
  4980. $.register({
  4981. rule: 'http://ifotos.pl/zobacz/*',
  4982. ready: function () {
  4983. 'use strict';
  4984. var m = $('meta[property="og:image"]');
  4985. $.openImage(m.content);
  4986. },
  4987. });
  4988. $.register({
  4989. rule: {
  4990. host: /^ima\.so$/,
  4991. },
  4992. ready: function () {
  4993. 'use strict';
  4994. var a = $('#image_block a');
  4995. $.openImage(a.href);
  4996. },
  4997. });
  4998. $.register({
  4999. rule: [
  5000. 'http://image18.org/show/*',
  5001. 'http://screenlist.ru/details.php?image_id=*',
  5002. 'http://www.imagenetz.de/*/*.html',
  5003. ],
  5004. ready: function () {
  5005. 'use strict';
  5006. var img = $('#picture');
  5007. $.openImage(img.src);
  5008. },
  5009. });
  5010. $.register({
  5011. rule: {
  5012. host: /^image2you\.ru$/,
  5013. path: /^\/\d+\/\d+/,
  5014. },
  5015. ready: function () {
  5016. 'use strict';
  5017. var i = $.$('div.t_tips2 div > img');
  5018. if (!i) {
  5019. $.openLink('', {
  5020. post: {
  5021. _confirm: '',
  5022. },
  5023. });
  5024. return;
  5025. }
  5026. $.openImage(i.src);
  5027. },
  5028. });
  5029. $.register({
  5030. rule: 'http://imagearn.com/image.php?id=*',
  5031. ready: function () {
  5032. 'use strict';
  5033. var i = $('#img');
  5034. $.openImage(i.src);
  5035. },
  5036. });
  5037. $.register({
  5038. rule: 'http://www.imagebam.com/image/*',
  5039. ready: function () {
  5040. 'use strict';
  5041. var o = $('.image-container img[id]');
  5042. $.openImage(o.src, {
  5043. replace: true,
  5044. });
  5045. },
  5046. });
  5047. $.register({
  5048. rule: {
  5049. host: /^imageheli\.com|imgtube\.net|pixliv\.com$/,
  5050. path: /^\/img-([a-zA-Z0-9\-]+)\..+$/,
  5051. },
  5052. ready: function () {
  5053. 'use strict';
  5054. var a = $.$('a[rel="lightbox"]');
  5055. if (!a) {
  5056. $.openLink('', {
  5057. post: {
  5058. browser_fingerprint: '',
  5059. ads: '0',
  5060. },
  5061. });
  5062. return;
  5063. }
  5064. $.openImage(a.href);
  5065. },
  5066. });
  5067. $.register({
  5068. rule: 'http://www.imagehousing.com/image/*',
  5069. ready: function () {
  5070. 'use strict';
  5071. var i = $('td.text_item img');
  5072. $.openImage(i.src);
  5073. },
  5074. });
  5075. $.register({
  5076. rule: 'http://imageno.com/*.html',
  5077. ready: function () {
  5078. 'use strict';
  5079. var i = $('#image_div img');
  5080. $.openImage(i.src);
  5081. },
  5082. });
  5083. $.register({
  5084. rule: 'http://imagepix.org/image/*.html',
  5085. ready: function () {
  5086. 'use strict';
  5087. var i = $('img[border="0"]');
  5088. $.openImage(i.src);
  5089. },
  5090. });
  5091. (function () {
  5092. 'use strict';
  5093. function run () {
  5094. var o = $('#download_box img[id]');
  5095. $.openImage(o.src);
  5096. }
  5097. $.register({
  5098. rule: {
  5099. host: /^www\.imageporter\.com$/,
  5100. path: /^\/\w{12}\/.*\.html$/,
  5101. },
  5102. ready: run,
  5103. });
  5104. $.register({
  5105. rule: {
  5106. host: /^(www\.)?(image(carry|dunk|porter|switch)|pic(leet|turedip|tureturn)|imgspice)\.com|(piclambo|yankoimages)\.net$/,
  5107. },
  5108. ready: run,
  5109. });
  5110. })();
  5111. $.register({
  5112. rule: [
  5113. {
  5114. host: /^imagescream\.com$/,
  5115. path: /^\/img\/(soft\/)?/,
  5116. },
  5117. {
  5118. host: /^(www\.)?(picturescream|picturevip)\.com$/,
  5119. path: /^\/x\//,
  5120. },
  5121. {
  5122. host: [
  5123. /^picturescream\.asia$/,
  5124. /^uploadimage\.eu$/,
  5125. ],
  5126. },
  5127. {
  5128. host: /^postscreens\.info/,
  5129. path: /^\/.*/,
  5130. },
  5131. ],
  5132. ready: function () {
  5133. 'use strict';
  5134. var i = $('#shortURL-content img');
  5135. $.openImage(i.src);
  5136. },
  5137. });
  5138. $.register({
  5139. rule: {
  5140. host: /^(imagescream|anonpic)\.com|all-poster\.ru$/,
  5141. query: /^\?v=/,
  5142. },
  5143. ready: function () {
  5144. 'use strict';
  5145. var i = $('#imagen img');
  5146. $.openImage(i.src);
  5147. },
  5148. });
  5149. $.register({
  5150. rule: {
  5151. host: /^bunnyforum\.org$/,
  5152. query: /^\?v=/,
  5153. },
  5154. ready: function () {
  5155. 'use strict';
  5156. var i = $('img[title^=Click]');
  5157. $.openImage(i.src);
  5158. },
  5159. });
  5160. (function () {
  5161. 'use strict';
  5162. var host = /^imageshack\.us$/;
  5163. $.register({
  5164. rule: {
  5165. host: host,
  5166. path: /^\/photo\/.+\/(.+)\/([^\/]+)/,
  5167. },
  5168. start: function (m) {
  5169. $.openImage(_.T('/f/{0}/{1}/')(m.path[1], m.path[2]));
  5170. },
  5171. });
  5172. $.register({
  5173. rule: {
  5174. host: host,
  5175. path: /^\/f\/.+\/[^\/]+/,
  5176. },
  5177. ready: function () {
  5178. var i = $('#fullimg');
  5179. $.openImage(i.src);
  5180. },
  5181. });
  5182. })();
  5183. $.register({
  5184. rule: 'http://imageshost.ru/photo/*/id*.html',
  5185. ready: function () {
  5186. 'use strict';
  5187. var a = $('#bphoto a');
  5188. $.openImage(a.href);
  5189. },
  5190. });
  5191. (function () {
  5192. 'use strict';
  5193. function run () {
  5194. var i = $('#img_obj');
  5195. $.openImage(i.src, {
  5196. referer: true,
  5197. });
  5198. }
  5199. function run2 () {
  5200. var i = $('#img_obj');
  5201. $.openImage(i.src, {
  5202. replace: true,
  5203. });
  5204. }
  5205. $.register({
  5206. rule: [
  5207. {
  5208. host: /^www\.(freebunker|imagesnake|imgcarry|imgshots)\.com$/,
  5209. path: /^\/show\.php$/,
  5210. query: /^\?/,
  5211. },
  5212. {
  5213. host: /^www\.(freebunker|imgshots)\.com$/,
  5214. path: /^\/show\//,
  5215. },
  5216. {
  5217. host: /^www\.(imagesnake|imagefruit)\.com$/,
  5218. path: /^\/(img|show)\/.+/,
  5219. },
  5220. {
  5221. host: /^imageban\.(ru|net)$/,
  5222. path: /^\/show\/\d{4}\/\d{2}\/\d{2}\/.+/,
  5223. },
  5224. 'http://fotoo.pl/show.php?img=*.html',
  5225. {
  5226. host: /^www\.(fotoszok\.pl|imagestime)\.com$/,
  5227. path: /^\/show\.php\/.*\.html$/,
  5228. },
  5229. ],
  5230. ready: run,
  5231. });
  5232. $.register({
  5233. rule: {
  5234. host: /^www\.imgcarry\.com$/,
  5235. path: /^\/show\//,
  5236. },
  5237. ready: run2,
  5238. });
  5239. })();
  5240. (function () {
  5241. 'use strict';
  5242. function run (rp) {
  5243. $.window.jQuery.prototype.append = undefined;
  5244. var i = $('img.pic');
  5245. $.openImage(i.src, {
  5246. replace: rp,
  5247. });
  5248. }
  5249. $.register({
  5250. rule: {
  5251. host: /^imagenpic\.com$/,
  5252. path: /^\/.*\/.+\.html$/,
  5253. },
  5254. ready: _.P(run, true),
  5255. });
  5256. $.register({
  5257. rule: {
  5258. host: /^imagecherry\.com$/,
  5259. },
  5260. ready: _.P(run, true),
  5261. });
  5262. $.register({
  5263. rule: {
  5264. host: /^imagetwist\.com$/,
  5265. },
  5266. ready: _.P(run, false),
  5267. });
  5268. })();
  5269. $.register({
  5270. rule: 'http://imageupper.com/i/?*',
  5271. ready: function () {
  5272. 'use strict';
  5273. var i = $('#img');
  5274. $.openImage(i.src);
  5275. },
  5276. });
  5277. $.register({
  5278. rule: [
  5279. 'http://*.imagevenue.com/img.php?*',
  5280. 'http://hotchyx.com/d/adult-image-hosting-view-08.php?id=*',
  5281. 'http://www.hostingfailov.com/photo/*',
  5282. ],
  5283. ready: function () {
  5284. 'use strict';
  5285. var i = $('#thepic');
  5286. $.openImage(i.src);
  5287. },
  5288. });
  5289. $.register({
  5290. rule: {
  5291. host: /^imagezilla\.net$/,
  5292. },
  5293. ready: function () {
  5294. 'use strict';
  5295. var i = $('#photo');
  5296. $.openImage(i.src, {
  5297. referer: true,
  5298. });
  5299. },
  5300. });
  5301. $.register({
  5302. rule: {
  5303. host: /^imagik\.fr$/,
  5304. path: /^\/view(-rl)?\/(.+)/,
  5305. },
  5306. start: function (m) {
  5307. 'use strict';
  5308. $.openImage('/uploads/' + m.path[2]);
  5309. },
  5310. });
  5311. $.register({
  5312. rule: 'http://img.3ezy.net/*.htm',
  5313. ready: function () {
  5314. 'use strict';
  5315. var l = $('link[rel="image_src"]');
  5316. $.openImage(l.href);
  5317. },
  5318. });
  5319. $.register({
  5320. rule: 'http://img1.imagilive.com/*/*',
  5321. ready: function () {
  5322. 'use strict';
  5323. var a = $.$('#page a.button');
  5324. if (a) {
  5325. $.redirect(a.href);
  5326. return;
  5327. }
  5328. var i = $('#page > img:not([id])');
  5329. $.openImage(i.src);
  5330. },
  5331. });
  5332. $.register({
  5333. rule: {
  5334. host: /^img24\.org$/,
  5335. },
  5336. ready: function () {
  5337. 'use strict';
  5338. var f = $.$('img.img-polaroid + form');
  5339. if (f) {
  5340. f.submit();
  5341. return;
  5342. }
  5343. f = $('img.img-polaroid');
  5344. $.openImage(f.src, {
  5345. referer: true,
  5346. });
  5347. },
  5348. });
  5349. $.register({
  5350. rule: {
  5351. host: /^img3x\.net$/,
  5352. },
  5353. ready: function () {
  5354. 'use strict';
  5355. var f = $.$('form');
  5356. if (f) {
  5357. f.submit();
  5358. return;
  5359. }
  5360. f = $('#show_image');
  5361. $.openImage(f.src);
  5362. },
  5363. });
  5364. $.register({
  5365. rule: {
  5366. host: /^www\.img(babes|flare)\.com$/,
  5367. },
  5368. ready: function () {
  5369. 'use strict';
  5370. var i = $.$('input[onclick]');
  5371. if (i) {
  5372. $.window.Decode();
  5373. return;
  5374. }
  5375. var i = $('#this_image');
  5376. $.openImage(i.src);
  5377. },
  5378. });
  5379. $.register({
  5380. rule: {
  5381. host: /^imgbar\.net$/,
  5382. path: /^\/img_show\.php$/,
  5383. query: /^\?view_id=/,
  5384. },
  5385. ready: function () {
  5386. 'use strict';
  5387. var i = $('center img');
  5388. $.openImage(i.src);
  5389. },
  5390. });
  5391. $.register({
  5392. rule: {
  5393. host: /^imgbar\.net$/,
  5394. },
  5395. ready: function () {
  5396. 'use strict';
  5397. var i = $('div.panel.top form input[name=sid]');
  5398. $.openLink('/img_show.php?view_id=' + i.value);
  5399. },
  5400. });
  5401. $.register({
  5402. rule: {
  5403. host: /^imgbin\.me$/,
  5404. path: /^\/view\/([A-Z]+)$/,
  5405. },
  5406. start: function (m) {
  5407. 'use strict';
  5408. var tpl = _.T('/image/{0}.jpg');
  5409. $.openImage(tpl(m.path[1]));
  5410. },
  5411. });
  5412. $.register({
  5413. rule: {
  5414. host: /^imgbox\.com$/,
  5415. path: /^\/[\d\w]+$/,
  5416. },
  5417. ready: function () {
  5418. 'use strict';
  5419. $.removeNodes('iframe');
  5420. var i = $('#img');
  5421. $.openImage(i.src);
  5422. },
  5423. });
  5424. (function () {
  5425. 'use strict';
  5426. function helper (doReplace) {
  5427. if ($.window.confirmAge) {
  5428. $.window.confirmAge(1);
  5429. return;
  5430. }
  5431. var i = $('#container-home img[onclick]');
  5432. $.openImage(i.src, {
  5433. replace: doReplace,
  5434. });
  5435. }
  5436. $.register({
  5437. rule: {
  5438. host: [
  5439. /^img(fantasy|leech|\.pornleech|smile|nemo|sense|curl)\.com$/,
  5440. /^(imagedomino|lovechix)\.com$/,
  5441. /^0img\.net$/,
  5442. /^daily-img\.com$/,
  5443. /^picangel\.in$/,
  5444. /^imagebic\.com$/,
  5445. /^bunnyforum\.org$/,
  5446. ],
  5447. query: /^\?[pv]=/,
  5448. },
  5449. ready: _.P(helper, false),
  5450. });
  5451. $.register({
  5452. rule: {
  5453. host: /^imgsay\.com$/,
  5454. query: /^\?[pv]=/,
  5455. },
  5456. ready: _.P(helper, true),
  5457. });
  5458. })();
  5459. $.register({
  5460. rule: {
  5461. host: /^imglocker\.com$/,
  5462. path: [
  5463. /^(\/\w+)\/(.+)\.html$/,
  5464. /^(\/\w+)\/(.+)$/,
  5465. ],
  5466. },
  5467. start: function (m) {
  5468. 'use strict';
  5469. var url = _.T('//img.imglocker.com{0}_{1}');
  5470. $.openImage(url(m.path[1], m.path[2]));
  5471. },
  5472. });
  5473. $.register({
  5474. rule: {
  5475. host: [
  5476. /^imgnova\.xyz$/,
  5477. /^www\.hentai-hot\.xyz$/,
  5478. /^www\.hentai-king\.online$/,
  5479. ],
  5480. path: /^\/i\/.+\.php$/,
  5481. query: /f=(.+)$/,
  5482. },
  5483. start: function (m) {
  5484. 'use strict';
  5485. $.openImage('f/' + m.query[1]);
  5486. },
  5487. });
  5488. (function () {
  5489. 'use strict';
  5490. function waitDOM (element, fn) {
  5491. return _.D(function (resolve, reject) {
  5492. var observer = new MutationObserver(function (mutations) {
  5493. mutations.forEach(function (mutation) {
  5494. if (mutation.type !== 'childList') {
  5495. return;
  5496. }
  5497. var result = _.C(mutation.addedNodes).find(function (child) {
  5498. return fn(child) ? child : _.none;
  5499. });
  5500. if (!result) {
  5501. return;
  5502. }
  5503. observer.disconnect();
  5504. resolve(result.payload);
  5505. });
  5506. });
  5507. observer.observe(element, {
  5508. childList: true,
  5509. });
  5510. });
  5511. }
  5512. var pathRule = /^\/([0-9a-zA-Z]+)(\.|\/|$)/;
  5513. function go (id, pre, next) {
  5514. $.openLink('', {
  5515. post: {
  5516. op: 'view',
  5517. id: id,
  5518. pre: pre,
  5519. next: next,
  5520. adb: '0',
  5521. },
  5522. });
  5523. }
  5524. function getNext1 (i) {
  5525. return i.value;
  5526. }
  5527. function getNext2 (i) {
  5528. var next = i.onclick && i.onclick.toString().match(/value='([^']+)'/);
  5529. if (next) {
  5530. next = next[1];
  5531. return next;
  5532. } else {
  5533. return i.value;
  5534. }
  5535. }
  5536. function helper (id, getNext) {
  5537. var recaptcha = $.$('#recaptcha_widget, #captcha');
  5538. if (recaptcha) {
  5539. _.info('stop because recaptcha');
  5540. return;
  5541. }
  5542. var i = $.$('input[name="next"]');
  5543. if (i) {
  5544. var next = getNext(i);
  5545. go(id, $('input[name="pre"]').value, next);
  5546. return;
  5547. }
  5548. i = $.$('img.pic');
  5549. if (i) {
  5550. $.openImage(i.src);
  5551. return;
  5552. }
  5553. _.info('do nothing');
  5554. }
  5555. $.register({
  5556. rule: {
  5557. host: [
  5558. /^img(universal|paying|mega|zeus|monkey|trex|ve|dew|diamond)\.com$/,
  5559. /^(www\.)?imgsee\.me$/,
  5560. /^img(click|maid)\.net$/,
  5561. /^(uploadrr|imageeer|imzdrop|www\.uimgshare|pic-maniac)\.com$/,
  5562. /^imgdrive\.co$/,
  5563. /^cuteimg\.cc$/,
  5564. /^img(tiger|gold)\.org$/,
  5565. /^myimg\.club$/,
  5566. /^foxyimg\.link$/,
  5567. /^hulkimge\.com$/,
  5568. /^(core|iron)img\.net$/,
  5569. ],
  5570. path: pathRule,
  5571. },
  5572. ready: function (m) {
  5573. helper(m.path[1], getNext1);
  5574. },
  5575. });
  5576. $.register({
  5577. rule: {
  5578. host: [
  5579. /^img(rock|town|view)\.net$/,
  5580. /^img(maze|outlet)\.com$/,
  5581. ],
  5582. path: pathRule,
  5583. },
  5584. ready: function () {
  5585. var i = $.$('img.pic');
  5586. if (i) {
  5587. $.openImage(i.src);
  5588. return;
  5589. }
  5590. var d = $('div[id^="imageviewi"]');
  5591. waitDOM(d, function (node) {
  5592. return node.nodeName === 'FORM' && $.$('input[name="id"]', node);
  5593. }).then(function (node) {
  5594. node.submit();
  5595. }).catch(function (e) {
  5596. _.warn(e);
  5597. });
  5598. },
  5599. });
  5600. $.register({
  5601. rule: {
  5602. host: /^chronos\.to$/,
  5603. path: pathRule,
  5604. },
  5605. ready: function (m) {
  5606. helper(m.path[1], getNext2);
  5607. },
  5608. });
  5609. $.register({
  5610. rule: {
  5611. host: /^imgfiles\.org$/,
  5612. path: pathRule,
  5613. },
  5614. ready: function (m) {
  5615. var i = $.$('img.pic');
  5616. if (i) {
  5617. $.openImage(i.src);
  5618. return;
  5619. }
  5620. var f = $('form');
  5621. f.submit();
  5622. },
  5623. });
  5624. $.register({
  5625. rule: 'http://imgview.net/tpind.php',
  5626. ready: function () {
  5627. var i = $.$('img.pic');
  5628. if (i) {
  5629. $.openImage(i.src, {replace: true});
  5630. return;
  5631. }
  5632. _.wait(500).then(function () {
  5633. var d = $('div[id^="imageviewi"] input[type="submit"][style=""]');
  5634. d = d.parentNode;
  5635. d.submit();
  5636. });
  5637. },
  5638. });
  5639. $.register({
  5640. rule: /^http:\/\/imgdragon\.com\/(getfil\.php|dl)$/,
  5641. ready: function () {
  5642. var i = $.$('img.pic');
  5643. if (i) {
  5644. $.openImage(i.src);
  5645. return;
  5646. }
  5647. _.wait(500).then(function () {
  5648. var f = $('#ContinueFRM');
  5649. f.submit();
  5650. });
  5651. },
  5652. });
  5653. })();
  5654. $.register({
  5655. rule: {
  5656. host: /^(imgsure|picexposed)\.com$/,
  5657. },
  5658. ready: function () {
  5659. 'use strict';
  5660. var i = $('img.pic');
  5661. $.openImage(i.src);
  5662. },
  5663. });
  5664. $.register({
  5665. rule: 'http://imgtheif.com/image/*.html',
  5666. ready: function () {
  5667. 'use strict';
  5668. var a = $('div.content-container a');
  5669. $.openImage(a.href);
  5670. },
  5671. });
  5672. $.register({
  5673. rule: {
  5674. host: /^imgvault\.pw$/,
  5675. path: /^\/view-image\//,
  5676. },
  5677. ready: function () {
  5678. 'use strict';
  5679. var a = $('article div.span7 a[target="_blank"]');
  5680. $.openImage(a.href);
  5681. },
  5682. });
  5683. $.register({
  5684. rule: 'http://ipic.su/?page=img&pic=*',
  5685. ready: function () {
  5686. 'use strict';
  5687. var i = $('#fz');
  5688. $.openImage(i.src);
  5689. },
  5690. });
  5691. $.register({
  5692. rule: {
  5693. host: /^javcity\.com$/,
  5694. },
  5695. ready: function () {
  5696. 'use strict';
  5697. var a = $('.entry-content > h1:nth-child(1) > a:nth-child(1)');
  5698. var url = a.onclick.toString();
  5699. url = url.match(/window\.open\('([^']+)'\)/);
  5700. if (!url) {
  5701. _.info('pattern changed')
  5702. return;
  5703. }
  5704. $.openImage(url[1]);
  5705. },
  5706. });
  5707. $.register({
  5708. rule: {
  5709. host: /keptarolo\.hu$/,
  5710. path: /^(\/[^\/]+\/[^\/]+\.jpg)$/,
  5711. },
  5712. start: function (m) {
  5713. 'use strict';
  5714. $.openImage('http://www.keptarolo.hu/kep' + m.path[1]);
  5715. },
  5716. });
  5717. $.register({
  5718. rule: {
  5719. host: /^lostpic\.net$/,
  5720. query: /^\?photo=\d+$/,
  5721. },
  5722. ready: function () {
  5723. 'use strict';
  5724. var i = $('img.notinline.circle');
  5725. $.openImage(i.src);
  5726. },
  5727. });
  5728. (function () {
  5729. 'use strict';
  5730. function helper (m) {
  5731. $.openImage('/images/' + m.query[1]);
  5732. }
  5733. $.register({
  5734. rule: {
  5735. host: [
  5736. /^(hentai-hosting|miragepics|funextra\.hostzi|imgrex|cdn\.javtotal|img3x)\.com$/,
  5737. /^bilder\.nixhelp\.de$/,
  5738. /^imagecurl\.(com|org)$/,
  5739. /^imagevau\.eu$/,
  5740. /^img\.deli\.sh$/,
  5741. /^img(dream|soo|nm|silo)\.net$/,
  5742. /^imgsicily\.it$/,
  5743. /^www\.imghere\.net$/,
  5744. ],
  5745. path: /^\/viewer\.php$/,
  5746. query: /file=([^&]+)/,
  5747. },
  5748. start: helper,
  5749. });
  5750. $.register({
  5751. rule: {
  5752. host: /^(dwimg|imgsin|www\.pictureshoster)\.com$/,
  5753. path: /^\/viewer\.php$/,
  5754. query: /file=([^&]+)/,
  5755. },
  5756. start: function (m) {
  5757. $.openImage('/files/' + m.query[1]);
  5758. },
  5759. });
  5760. $.register({
  5761. rule: {
  5762. host: [
  5763. /img(nip|central|cream)\.com$/,
  5764. /imageview\.me|244pix\.com|postimg\.net$/,
  5765. ],
  5766. path: /^\/viewerr.*\.php$/,
  5767. query: /file=([^&]+)/,
  5768. },
  5769. start: helper,
  5770. });
  5771. $.register({
  5772. rule: [
  5773. 'http://www.overpic.net/viewer.php?file=*',
  5774. ],
  5775. ready: function () {
  5776. var i = $('#main_img');
  5777. $.openImage(i.src);
  5778. },
  5779. });
  5780. $.register({
  5781. rule: {
  5782. host: /(empireload|loadsanook)\.com$/,
  5783. query: /file=([^&]+)/,
  5784. },
  5785. start: function (m) {
  5786. $.openImage('files/' + m.query[1]);
  5787. },
  5788. });
  5789. $.register({
  5790. rule: {
  5791. host: /^dumppix\.com$/,
  5792. path: /^\/viewer\.php$/,
  5793. query: /file=([^&]+)/,
  5794. },
  5795. start: function (m) {
  5796. $.openImage('/images/' + m.query[1], {
  5797. referer: true,
  5798. });
  5799. },
  5800. });
  5801. $.register({
  5802. rule: {
  5803. host: /^xxxhost\.me$/,
  5804. path: /^\/viewer5\.php$/,
  5805. query: /file=([^&]+)/,
  5806. },
  5807. start: function (m) {
  5808. $.openImage('files/' + m.query[1]);
  5809. },
  5810. });
  5811. })();
  5812. $.register({
  5813. rule: {
  5814. host: /^www\.mrjh\.org$/,
  5815. path: /^\/gallery\.php$/,
  5816. query: /^\?entry=(.+)$/,
  5817. },
  5818. ready: function (m) {
  5819. 'use strict';
  5820. var url = m.query[1];
  5821. $.openImage('/' + url);
  5822. },
  5823. });
  5824. $.register({
  5825. rule: {
  5826. host: /^www\.noelshack\.com$/
  5827. },
  5828. ready: function () {
  5829. var i = $('#elt_to_aff');
  5830. $.openImage(i.src);
  5831. },
  5832. });
  5833. $.register({
  5834. rule: 'http://pic-money.ru/*.html',
  5835. ready: function () {
  5836. 'use strict';
  5837. var f = document.forms[0];
  5838. var sig = $('input[name="sig"]', f).value;
  5839. var pic_id = $('input[name="pic_id"]', f).value;
  5840. var referer = $('input[name="referer"]', f).value;
  5841. var url = _.T('/pic.jpeg?pic_id={pic_id}&sig={sig}&referer={referer}');
  5842. $.openImage(url({
  5843. sig: sig,
  5844. pic_id: pic_id,
  5845. referer: referer,
  5846. }));
  5847. },
  5848. });
  5849. $.register({
  5850. rule: 'http://www.pic-upload.de/view-*.html',
  5851. ready: function () {
  5852. 'use strict';
  5853. $.removeNodes('.advert');
  5854. var i = $('img.preview_picture_2b, img.original_picture_2b');
  5855. $.openImage(i.src);
  5856. },
  5857. });
  5858. $.register({
  5859. rule: {
  5860. host: /^pic(2profit|p2)\.com$/,
  5861. },
  5862. ready: function () {
  5863. 'use strict';
  5864. var i = $('form > #d1 ~ input[name=bigimg]');
  5865. $.openImage(i.value);
  5866. },
  5867. });
  5868. $.register({
  5869. rule: {
  5870. host: /^pic(4|5)you.ru$/
  5871. },
  5872. ready: function () {
  5873. if ($.$('#d1 > img') != null) {
  5874. var URLparams = location.href.split("/", 5);
  5875. var next = URLparams[0] + '/' + URLparams[1] + '/' + URLparams[2] + '/' + URLparams[3] + '/' + URLparams[4] + '/1/';
  5876. $.setCookie('p4yclick','1');
  5877. $.openLink(next);
  5878. } else {
  5879. var i = $('#d1 img').src;
  5880. $.openImage(i);
  5881. }
  5882. },
  5883. });
  5884. $.register({
  5885. rule: {
  5886. host: /^(www\.)?piccash\.net$/
  5887. },
  5888. ready: function () {
  5889. var i = $('.container > img');
  5890. var m =i.onclick.toString().match(/mshow\('([^']+)'\);/);
  5891. $.openImage(m[1]);
  5892. },
  5893. });
  5894. $.register({
  5895. rule: [
  5896. 'http://amateurfreak.org/share-*.html',
  5897. 'http://amateurfreak.org/share.php?id=*',
  5898. 'http://images.maxigame.by/share-*.html',
  5899. 'http://picfox.org/*',
  5900. 'http://www.euro-pic.eu/share.php?id=*',
  5901. 'http://www.gratisimage.dk/share-*.html',
  5902. 'http://xxx.freeimage.us/share.php?id=*',
  5903. 'http://npicture.net/share-*.html',
  5904. 'http://www.onlinepic.net/share.php?id=*',
  5905. 'http://www.pixsor.com/share.php?id=*',
  5906. 'http://www.pixsor.com/share-*.html',
  5907. 'http://pixsor.com/XXX/share-*.html',
  5908. 'http://holdthemoan.net/x/share-*.html',
  5909. 'http://imgurx.net/x/share-*.html',
  5910. 'http://www.imgz.pw/share-*.html',
  5911. ],
  5912. ready: function () {
  5913. 'use strict';
  5914. var o = $('#iimg');
  5915. $.openImage(o.src);
  5916. },
  5917. });
  5918. $.register({
  5919. rule: 'http://picmoe.net/d.php?id=*',
  5920. ready: function () {
  5921. 'use strict';
  5922. var i = $('img');
  5923. $.openImage(i.src);
  5924. },
  5925. });
  5926. $.register({
  5927. rule: [
  5928. 'http://pics-money.ru/allpicfree/*',
  5929. 'http://www.pics-money.ru/allimage/*',
  5930. ],
  5931. });
  5932. $.register({
  5933. rule: {
  5934. host: /^pics-money\.ru$/,
  5935. path: /^\/v\.php$/,
  5936. },
  5937. ready: function () {
  5938. 'use strict';
  5939. $.removeNodes('iframe');
  5940. var i = $('center img:not([id])');
  5941. $.openImage(i.src);
  5942. },
  5943. });
  5944. $.register({
  5945. rule: {
  5946. host: /^www\.pics-money\.ru$/,
  5947. },
  5948. ready: function () {
  5949. 'use strict';
  5950. $.removeNodes('iframe');
  5951. var i = $('#d1 img');
  5952. i = i.onclick.toString();
  5953. i = i.match(/mshow\('(.+)'\)/);
  5954. i = i[1];
  5955. $.openImage(i);
  5956. },
  5957. });
  5958. $.register({
  5959. rule: 'http://picshare.geenza.com/pics/*',
  5960. ready: function () {
  5961. 'use strict';
  5962. var i = $('#picShare_image_container');
  5963. $.openImage(i.src);
  5964. },
  5965. });
  5966. $.register({
  5967. rule: {
  5968. host: /^picstream\.tv$/,
  5969. path: /^\/.*\/.*\.html$/,
  5970. },
  5971. ready: function () {
  5972. 'use strict';
  5973. var img = $('#view1 > div:nth-child(1) > img:nth-child(1)');
  5974. $.openImage(img.src);
  5975. },
  5976. });
  5977. $.register({
  5978. rule: {
  5979. host: /^(www\.)?pimpandhost\.com$/,
  5980. path: /^\/image\//,
  5981. },
  5982. ready: function () {
  5983. 'use strict';
  5984. var a = $('#image_original');
  5985. var el = document.createElement('div');
  5986. el.innerHTML = a.value;
  5987. var img = $('img', el);
  5988. $.openImage(img.src);
  5989. },
  5990. });
  5991. $.register({
  5992. rule: {
  5993. host: /^pixhub\.eu$/,
  5994. },
  5995. ready: function () {
  5996. 'use strict';
  5997. $.removeNodes('iframe, .adultpage, #FFN_Banner_Holder');
  5998. var i = $('.image-show img');
  5999. $.openImage(i.src);
  6000. },
  6001. });
  6002. $.register({
  6003. rule: {
  6004. host: /^(www\.)?pixroute\.com$/
  6005. },
  6006. ready: function () {
  6007. 'use strict';
  6008. var o = $('.fr4me > div:nth-child(20) > a:nth-child(1) > img:nth-child(1)');
  6009. $.openImage(o.src);
  6010. },
  6011. });
  6012. $.register({
  6013. rule: {
  6014. host: /^www\.pixsense\.net$/,
  6015. path: /^\/site\/v\/(\d+)$/,
  6016. },
  6017. start: function (m) {
  6018. 'use strict';
  6019. $.openLink('/site/viewFinalImage/' + m.path[1]);
  6020. },
  6021. });
  6022. $.register({
  6023. rule: {
  6024. host: /^www\.pixsense\.net$/,
  6025. path: /^\/site\/viewFinalImage\/\d+$/,
  6026. },
  6027. ready: function () {
  6028. 'use strict';
  6029. var i = $('#myUniqueImg');
  6030. $.openLink(i.src);
  6031. },
  6032. });
  6033. $.register({
  6034. rule: {
  6035. host: /^pixxxels\.org$/,
  6036. },
  6037. ready: function () {
  6038. 'use strict';
  6039. var img = $.$('#main-image');
  6040. $.openImage(img.dataset.full);
  6041. },
  6042. });
  6043. $.register({
  6044. rule: {
  6045. host: /^www\.pornimagex\.com$/,
  6046. path: /^\/image\/.*$/,
  6047. },
  6048. ready: function () {
  6049. 'use strict';
  6050. var img = $('#fixed img.border2px');
  6051. $.openImage(img.src);
  6052. },
  6053. });
  6054. $.register({
  6055. rule: {
  6056. host: /^prntscr\.com$/
  6057. },
  6058. ready: function () {
  6059. 'use strict';
  6060. var i = $('#screenshot-image');
  6061. $.openImage(i.src);
  6062. },
  6063. });
  6064. $.register({
  6065. rule: {
  6066. host: /^pronpic\.org$/,
  6067. },
  6068. ready: function () {
  6069. 'use strict';
  6070. var img = $('table.new_table2:nth-child(2) img.link');
  6071. var url = img.src.replace('th_', '');
  6072. $.openImage(url);
  6073. },
  6074. });
  6075. $.register({
  6076. rule: {
  6077. host: /^(qrrro|greenpiccs)\.com$/,
  6078. path: /^(\/images\/.+)\.html$/,
  6079. },
  6080. start: function (m) {
  6081. 'use strict';
  6082. $.openImage(m.path[1]);
  6083. },
  6084. });
  6085. (function () {
  6086. 'use strict';
  6087. function action (firstSelector, secondSelector) {
  6088. $.removeNodes('iframe, #adblock_detect, .popupOverlay');
  6089. var node = $.$(firstSelector);
  6090. if (node) {
  6091. _.wait(500).then(function () {
  6092. node.removeAttribute('disabled');
  6093. return _.wait(500);
  6094. }).then(function () {
  6095. node.focus();
  6096. node.click();
  6097. node.click();
  6098. node.click();
  6099. });
  6100. return;
  6101. }
  6102. var i = $(secondSelector);
  6103. $.openImage(i.src);
  6104. }
  6105. var defaultAction = _.P(action, '#continuetoimage > form input', 'img[class^=centred]');
  6106. $.register({
  6107. rule: [
  6108. {
  6109. host: [
  6110. /^image(ontime|corn|picsa|horse)\.com$/,
  6111. /^(zonezeed|zelje|croft|myhot|bok|hostur|greasy)image\.com$/,
  6112. /^img(icy|next|savvy|\.spicyzilla|twyti|xyz|devil|tzar|ban|pu|beer|wet|tornado|kicks|-pay|nimz|binbou|2share|22|cover|hit|main|trial|blank|-uploads|reputa|fapper)\.com$/,
  6113. /^img-(zone|planet)\.com$/,
  6114. /^www\.img(blow|lemon|4sharing)\.com$/,
  6115. /^www\.imagefolks\.com$/,
  6116. /^xxx(imagenow|screens)\.com$/,
  6117. /^(playimg|picstwist|ericsony|wpc8|uplimg|lexiit|thumbnailus|newimagepost|fapingpics|dimtus|tinizo)\.com$/,
  6118. /^((i|hentai)\.)?imgslip\.com$/,
  6119. /^(i|xxx)\.hentaiyoutube\.com$/,
  6120. /^(go|er)imge\.com$/,
  6121. /^(like\.)?08lkk\.com$/,
  6122. /^(www\.)?\.imgult\.com$/,
  6123. /^nim(plus|zshare)\.com$/,
  6124. /^nudeximg\.com$/,
  6125. /imgseeds?\.com$/,
  6126. /xxxsparrow?\.com$/,
  6127. /damimage\.com$/,
  6128. /imagedecode\.com$/,
  6129. /^www\.freephotohostin\.com$/,
  6130. /^img(serve|coin|fap|candy|master|-view|run|boom|project|python|pics)\.net$/,
  6131. /^(imagesouls|naughtygate|gallerycloud|imagelaser|picture-bang|project-photo|pix-link|funimg|golfpit|xximg)\.net$/,
  6132. /^(shot|adult)img\.org$/,
  6133. /^img(studio|spot)\.org$/,
  6134. /^image(\.adlock|on|team)\.org$/,
  6135. /^(voyeur|drag|teen|mega)image\.org$/,
  6136. /^teenshot\.org$/,
  6137. /^(hotimages|55888)\.eu$/,
  6138. /^img(cloud|mag)\.co$/,
  6139. /^pixup\.us$/,
  6140. /^(bulkimg|photo-up|myimg|pop-img|img-pop|ads-img)\.info$/,
  6141. /^vava\.in$/,
  6142. /^(pixxx|picspornfree|imgload|fapat)\.me$/,
  6143. /^(domaink|pic2pic|porno-pirat|24avarii|loftlm|18pron|imgplus)\.ru$/,
  6144. /^www\.hotimage\.uk$/,
  6145. /^imgease\.re$/,
  6146. /^goimg\.xyz$/,
  6147. /^pic2pic\.site$/,
  6148. /^darpix\.ga$/,
  6149. /^sxpics\.nl$/,
  6150. /^darpix\.desi$/,
  6151. /^pic4you\.top$/,
  6152. /^imgsen\.se$/,
  6153. /^ipicture\.su$/
  6154. ],
  6155. path: /^\/img-.*\.html/,
  6156. },
  6157. {
  6158. host: [
  6159. /^img(run|twyti)\.net$/,
  6160. /^imgtwyti\.com$/,
  6161. /^hentai-(pop|baka)\.com$/,
  6162. /^star-hentai\.com$/,
  6163. /^(jav|img)-hentai\.host$/,
  6164. /^hentai-king\.host$/,
  6165. /^img-king\.xyz$/,
  6166. ],
  6167. path: /^\/[ti]\/img-.*\.html/,
  6168. },
  6169. {
  6170. host: /^imgking\.co$/,
  6171. path: /^\/img4?-.*\.html/,
  6172. },
  6173. {
  6174. host: /^imgbb\.net$/,
  6175. path: /^\/.-.+$/,
  6176. },
  6177. {
  6178. host: /^cdn\.javtotal\.com$/,
  6179. path: /^\/img\/.+$/,
  6180. },
  6181. {
  6182. host: /^imgtor\.pw$/,
  6183. path: /^\/img2\/.+$/,
  6184. },
  6185. ],
  6186. ready: defaultAction,
  6187. });
  6188. $.register({
  6189. rule: {
  6190. host: /^imgtor\.pw$/,
  6191. path: /^\/img\/.*$/,
  6192. },
  6193. start: function (m) {
  6194. var imageUrl = 'http://' + m.host[0] + m.path[0].replace("img","img2");
  6195. $.openLink(imageUrl);
  6196. },
  6197. });
  6198. $.register({
  6199. rule: {
  6200. host: /^imgrat\.com$/,
  6201. path: /^\/img-.*\.html/,
  6202. },
  6203. ready: _.P(action, '#close', '#main_image img.center-block.img-responsive'),
  6204. });
  6205. $.register({
  6206. rule: {
  6207. host: [
  6208. /^imageporn\.eu$/,
  6209. /^imgzizi\.xyz$/,
  6210. ],
  6211. path: /^\/img-.*\.html/,
  6212. },
  6213. start: function () {
  6214. $.window.document.createElement = null;
  6215. },
  6216. ready: defaultAction,
  6217. });
  6218. $.register({
  6219. rule: {
  6220. host: [
  6221. /^www\.img(taxi|adult|wallet)\.com$/,
  6222. /^www\.imgdrive\.net$/,
  6223. ],
  6224. path: /^\/img-.*\.html$/,
  6225. },
  6226. start: function () {
  6227. var c = $.getCookie('img_c_d') || $.getCookie('img_p_d');
  6228. if (c) {
  6229. return;
  6230. }
  6231. $.post(window.location.href.toString(), {
  6232. cti: 1,
  6233. ref: '',
  6234. rc: 1,
  6235. }).then(function (data) {
  6236. window.location.reload();
  6237. });
  6238. },
  6239. ready: function () {
  6240. $.removeNodes('iframe');
  6241. var node = $.$('#continuetoimage > form input');
  6242. if (node) {
  6243. node.click();
  6244. node.click();
  6245. return;
  6246. }
  6247. $.resetCookies();
  6248. var i = $('img[class^=centred]');
  6249. $.openImage(i.src);
  6250. },
  6251. });
  6252. function helper () {
  6253. $.window.setTimeout = _.nop;
  6254. return $.get(window.location.toString()).then(function (data) {
  6255. return $.toDOM(data);
  6256. });
  6257. }
  6258. $.register({
  6259. rule: {
  6260. host: /^08lkk\.com$/,
  6261. path: /^\/Photo\/img-.+\.html$/,
  6262. },
  6263. start: function () {
  6264. helper().then(function (page) {
  6265. var i = $('img[class^=centred]', page);
  6266. $.openImage(i.src);
  6267. });
  6268. },
  6269. });
  6270. $.register({
  6271. rule: {
  6272. host: /^08lkk\.com$/,
  6273. path: /^\/\d+\/img-.*\.html$/,
  6274. },
  6275. start: function () {
  6276. helper().then(function (page) {
  6277. var bbcode = $.$('#imagecodes input', page);
  6278. bbcode = bbcode.value.match(/.+\[IMG\]([^\[]+)\[\/IMG\].+/);
  6279. bbcode = bbcode[1];
  6280. bbcode = bbcode.replace('small', 'big');
  6281. $.openImage(bbcode);
  6282. });
  6283. },
  6284. });
  6285. $.register({
  6286. rule: [
  6287. {
  6288. host: /^imgking\.co$/,
  6289. path: /^\/img[3s]-.*\.html/,
  6290. },
  6291. {
  6292. host: [
  6293. /^imgkings\.com$/,
  6294. /^imagerar\.com$/,
  6295. ],
  6296. path: /^\/img-.*\.html/,
  6297. },
  6298. ],
  6299. ready: function () {
  6300. var url = $.window.linkid;
  6301. $.openImage(url);
  6302. },
  6303. });
  6304. $.register({
  6305. rule: {
  6306. host: /^imgkings\.com$/,
  6307. path: /^\/img2-.*\.html/,
  6308. },
  6309. ready: defaultAction,
  6310. });
  6311. $.register({
  6312. rule: [
  6313. {
  6314. host: /^imagerar\.com$/,
  6315. path: /^\/img2-/,
  6316. },
  6317. {
  6318. host: /^imgking\.co$/,
  6319. path: /^\/imgv-.*\.html/,
  6320. },
  6321. ],
  6322. ready: function () {
  6323. var i = $('img[alt]');
  6324. $.openImage(i.src);
  6325. },
  6326. });
  6327. $.register({
  6328. rule: {
  6329. host: /^img\.yt$/,
  6330. path: /^\/img-.*\.html/,
  6331. },
  6332. ready: _.P(action, '#continuebutton', 'img[class^=centred]'),
  6333. });
  6334. })();
  6335. $.register({
  6336. rule: 'http://www.subirimagenes.com/*.html',
  6337. ready: function () {
  6338. 'use strict';
  6339. var i = $('#ImagenVisualizada');
  6340. $.openImage(i.src);
  6341. },
  6342. });
  6343. $.register({
  6344. rule: 'http://tinypic.com/view.php?pic=*',
  6345. ready: function () {
  6346. 'use strict';
  6347. var i = $('#imgElement');
  6348. $.openImage(i.src);
  6349. },
  6350. });
  6351. $.register({
  6352. rule: {
  6353. host: /^www\.turboimagehost\.com$/,
  6354. path: /^\/p\//,
  6355. },
  6356. ready: function () {
  6357. 'use strict';
  6358. var i = $('#imageid');
  6359. $.openImage(i.src);
  6360. },
  6361. });
  6362. $.register({
  6363. rule: 'http://vvcap.net/db/*.htp',
  6364. ready: function () {
  6365. 'use strict';
  6366. var i = $('img');
  6367. $.openImage(i.src, {
  6368. replace: true,
  6369. });
  6370. },
  6371. });
  6372. $.register({
  6373. rule: {
  6374. host: /^x\.pixfarm\.net$/,
  6375. path: /^\/sexy\/\d+\/\d+\/.+\.html$/,
  6376. },
  6377. ready: function () {
  6378. 'use strict';
  6379. var i = $('img');
  6380. $.openImage(i.src);
  6381. },
  6382. });
  6383. $.register({
  6384. rule: {
  6385. host: /\.yfrog\.com$/,
  6386. },
  6387. ready: function () {
  6388. 'use strict';
  6389. if (/^\/z/.test(window.location.pathname)) {
  6390. var i = $('#the-image img');
  6391. $.openImage(i.src);
  6392. return;
  6393. }
  6394. var a = $.$('#continue-link a, #main_image');
  6395. if (a) {
  6396. $.openLink('/z' + window.location.pathname);
  6397. return;
  6398. }
  6399. },
  6400. });
  6401. $.register({
  6402. rule: {
  6403. host: /^akoam\.com$/,
  6404. path: /^\/download\//,
  6405. },
  6406. start: function () {
  6407. 'use strict';
  6408. var location_link = location.hash;
  6409. $.post(location_link).then(function (data) {
  6410. data = JSON.parse(data);
  6411. if (!data.hash_data) {
  6412. _.warn('rule changed');
  6413. return;
  6414. }
  6415. $.openLink(data.direct_link);
  6416. });
  6417. },
  6418. });
  6419. $.register({
  6420. rule: {
  6421. host: /^www\.anafile\.com$/,
  6422. },
  6423. ready: function () {
  6424. 'use strict';
  6425. var b = $.$('#btn_download');
  6426. if (b) {
  6427. b.disabled = false;
  6428. $.removeNodes('div[align=center]');
  6429. return;
  6430. }
  6431. b = $('#plans_free form [type=submit]');
  6432. b.click();
  6433. },
  6434. });
  6435. $.register({
  6436. rule: {
  6437. host: /^(www\.)?arab\.sh$/,
  6438. path: /^\/\w+$/,
  6439. },
  6440. ready: function () {
  6441. 'use strict';
  6442. var f = $('form[name=F1]');
  6443. setTimeout(function() {
  6444. f.submit();
  6445. }, 20000);
  6446. },
  6447. });
  6448. $.register({
  6449. rule: {
  6450. host: /^(www\.)?coolrom\.com$/,
  6451. path: /^\/dlpop\.php$/,
  6452. },
  6453. ready: function () {
  6454. 'use strict';
  6455. var matches = $.searchScripts(/<form method="POST" action="([^"]+)">/);
  6456. $.openLink(matches[1]);
  6457. },
  6458. });
  6459. (function() {
  6460. 'use strict';
  6461. $.register({
  6462. rule: {
  6463. host: /^(www\.)?dl-protect\.com$/,
  6464. path: /\/[A-Z0-9]+/,
  6465. },
  6466. ready: function () {
  6467. if ($.$('#captcha')) {
  6468. return;
  6469. }
  6470. var f = $.$('form[name=ccerure]');
  6471. if (f) {
  6472. var observer = new MutationObserver(function (mutations) {
  6473. var iIn = $('input[id=in]');
  6474. for (var i = 0; i < mutations.length; i++) {
  6475. if (mutations[i].target.value && mutations[i].attributeName === 'value') {
  6476. observer.disconnect();
  6477. iIn.value = "Tracking too much hurts users' privacy";
  6478. if (!canFastRedirect()) {
  6479. return;
  6480. }
  6481. setTimeout(function() {
  6482. f.submit();
  6483. }, 600);
  6484. break;
  6485. }
  6486. }
  6487. });
  6488. var iIn = $('input[id=in]');
  6489. if (iIn.value) {
  6490. setTimeout(function() {
  6491. f.submit();
  6492. }, 600);
  6493. } else {
  6494. observer.observe(iIn, {
  6495. attributes: true,
  6496. });
  6497. }
  6498. return;
  6499. }
  6500. var l = $.$$('#slinks > a');
  6501. if (l.size() === 1) {
  6502. $.openLink(l.at(0).href);
  6503. }
  6504. },
  6505. });
  6506. function canFastRedirect () {
  6507. return !$.$('form[name=ccerure]').onsubmit && !$.$('form[name=ccerure] input[name=pwd]');
  6508. }
  6509. })();
  6510. $.register({
  6511. rule: {
  6512. host: /^(www\.)?embedupload\.com$/,
  6513. path: /^\/$/,
  6514. query: /^\?\w{2}=\w+$/
  6515. },
  6516. ready: function () {
  6517. 'use strict';
  6518. var downloadPage = $('.categories a[target=_blank]');
  6519. $.openLink(downloadPage);
  6520. },
  6521. });
  6522. $.register({
  6523. rule: {
  6524. host: /^www\.fileproject\.com\.br$/,
  6525. path: /^\/files\/+/,
  6526. },
  6527. ready: function () {
  6528. 'use strict';
  6529. var m = $.searchScripts(/<a id="down" href="([^"]+)">/);
  6530. $.openLink(m[1]);
  6531. },
  6532. });
  6533. $.register({
  6534. rule: {
  6535. host: /^(www\.)?(firedrive|putlocker)\.com$/,
  6536. path: /^\/file\/[0-9A-F]+$/,
  6537. },
  6538. ready: function () {
  6539. 'use strict';
  6540. var c = $('#confirm_form');
  6541. c.submit();
  6542. },
  6543. });
  6544. $.register({
  6545. rule: {
  6546. host: /^iori\.us$/,
  6547. },
  6548. ready: function () {
  6549. 'use strict';
  6550. var a = $('#wrapper .tombol a');
  6551. $.openLink(a.href);
  6552. },
  6553. });
  6554. $.register({
  6555. rule: {
  6556. host: /^(www\.)?jheberg\.net$/,
  6557. path: /^\/captcha\//,
  6558. },
  6559. ready: function () {
  6560. 'use strict';
  6561. $('.dl-button').click();
  6562. },
  6563. });
  6564. $.register({
  6565. rule: {
  6566. host: /^(www\.)?jheberg\.net$/,
  6567. path: /^\/redirect\//,
  6568. },
  6569. ready: function () {
  6570. 'use strict';
  6571. $.removeAllTimer();
  6572. var matches = $.searchScripts(/'slug':\s*'([^']+)',\s*'hoster':\s*'([^']+)'/);
  6573. var slug = matches[1];
  6574. var hoster = matches[2];
  6575. $.post('/get/link/', {
  6576. 'slug': slug,
  6577. 'hoster': hoster
  6578. }).then(function(response) {
  6579. var respJSON = _.parseJSON(response);
  6580. $.openLink(respJSON.url);
  6581. });
  6582. },
  6583. });
  6584. $.register({
  6585. rule: {
  6586. host: /^(www\.)?larashare\.com$/,
  6587. path: /^\/do\.php$/,
  6588. query: /id=\d+/,
  6589. },
  6590. start: function () {
  6591. 'use strict';
  6592. $.openLink(document.location.href.replace('id=','down='));
  6593. },
  6594. });
  6595. $.register({
  6596. rule: {
  6597. host: /^(www\.)?maxmirror\.com$/,
  6598. path: /^\/redirect\//,
  6599. },
  6600. ready: function () {
  6601. 'use strict';
  6602. var l = $('#download_url > a');
  6603. $.openLink(l.href);
  6604. },
  6605. });
  6606. $.register({
  6607. rule: {
  6608. host: /^(www\.)?mirrorcreator\.com$/,
  6609. path: /^\/showurl\.php$/,
  6610. },
  6611. ready: function () {
  6612. 'use strict';
  6613. var a = $.$('#redirectlink a');
  6614. if (a) {
  6615. $.openLink(a.href);
  6616. return;
  6617. }
  6618. a = $('#redirectlink > div.redirecturl');
  6619. a = a.innerHTML;
  6620. if (!a.match(/^http/)) {
  6621. throw new _.AdsBypasserError('not a valid URL');
  6622. }
  6623. $.openLink(a);
  6624. },
  6625. });
  6626. $.register({
  6627. rule: {
  6628. host: /^www.mirrorupload.net$/,
  6629. },
  6630. ready: function () {
  6631. 'use strict';
  6632. var accessForm = $('form[name=form_upload]');
  6633. var accessInput = document.createElement('input');
  6634. accessInput.type = 'hidden';
  6635. accessInput.name = 'access';
  6636. accessInput.value = Math.random();
  6637. accessForm.appendChild(accessInput);
  6638. accessForm.submit();
  6639. },
  6640. });
  6641. $.register({
  6642. rule: {
  6643. host: /^www\.multiupfile\.com$/,
  6644. path: /^\/f\//,
  6645. },
  6646. ready: function () {
  6647. 'use strict';
  6648. var f = $('#yw0');
  6649. f.submit();
  6650. },
  6651. });
  6652. $.register({
  6653. rule: {
  6654. host: /^mylinkgen\.com$/,
  6655. path: /^\/p\/(.+)$/,
  6656. },
  6657. start: function (m) {
  6658. 'use strict';
  6659. $.openLink('/g/' + m.path[1]);
  6660. },
  6661. });
  6662. $.register({
  6663. rule: {
  6664. host: /^mylinkgen\.com$/,
  6665. path: /^\/g\//,
  6666. },
  6667. ready: function () {
  6668. 'use strict';
  6669. var a = $('#main-content a.btn.btn-default');
  6670. $.openLink(a.href);
  6671. },
  6672. });
  6673. $.register({
  6674. rule: {
  6675. host: /^openload\.co$/,
  6676. path: /^\/f\/.*/,
  6677. },
  6678. start: function (m) {
  6679. $.window.adblock = false;
  6680. $.window.adblock2 = false;
  6681. $.window.popAdsLoaded = true;
  6682. },
  6683. ready: function () {
  6684. 'use strict';
  6685. setTimeout(function () {
  6686. var timer = $('#downloadTimer');
  6687. timer.style.display = 'none';
  6688. var dlCtn = $('#realdl');
  6689. dlCtn.style.display = 'inline-block';
  6690. var dlBtn = $('a', dlCtn);
  6691. var ePath = $('#streamurl');
  6692. dlBtn.href = "/stream/" + ePath.textContent;
  6693. var videoCtn = $.$('.videocontainer');
  6694. if (videoCtn) {
  6695. var overlay = $('#videooverlay', videoCtn);
  6696. overlay.click();
  6697. dlBtn.addEventListener('click', function (evt) {
  6698. evt.preventDefault();
  6699. var iframe = document.createElement('iframe');
  6700. iframe.src = dlBtn.href;
  6701. document.body.appendChild(iframe);
  6702. });
  6703. _.info(_.T('{0} -> {1}')(window.location, dlBtn.href));
  6704. dlBtn.click();
  6705. } else {
  6706. $.openLink(dlBtn.href);
  6707. }
  6708. }, 500);
  6709. }
  6710. });
  6711. $.register({
  6712. rule: {
  6713. host: /^(www\.)?upmirror\.info$/,
  6714. },
  6715. ready: function () {
  6716. 'use strict';
  6717. $.setCookie('user', 'ppp');
  6718. if ($.$('#countDownText')) {
  6719. $.openLink(document.location.toString());
  6720. }
  6721. },
  6722. });
  6723. $.register({
  6724. rule: {
  6725. host: /^(www\.)?vidto\.me$/,
  6726. },
  6727. ready: function () {
  6728. 'use strict';
  6729. var f = $('#btn_download').form;
  6730. setTimeout(function() {
  6731. f.submit();
  6732. }, 6000);
  6733. },
  6734. });
  6735. (function () {
  6736. 'use strict';
  6737. var sUrl = '(\\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])';
  6738. function isLink (text) {
  6739. var rUrl = new RegExp(_.T('^{0}$')(sUrl), 'i');
  6740. return rUrl.test(text);
  6741. }
  6742. function linkify (text) {
  6743. var rUrl = new RegExp(sUrl, 'ig');
  6744. return text.replace(rUrl, function(match) {
  6745. return _.T("<a href='{0}'>{0}</a>")(match);
  6746. });
  6747. }
  6748. $.register({
  6749. rule: {
  6750. host: /^(www\.)?([a-zA-Z0-9]+\.)?binbox\.io$/,
  6751. path: /\/([a-zA-Z0-9]+)/,
  6752. hash: /(?:#([a-zA-Z0-9]+))?/,
  6753. },
  6754. ready: function (m) {
  6755. var sjcl = $.window.sjcl;
  6756. var paste_id = m.path[1];
  6757. var paste_salt = m.hash[1];
  6758. var API_URL = _.T('https://binbox.io/{0}.json')(paste_id);
  6759. $.get(API_URL, false, {
  6760. Origin: _.none,
  6761. Referer: _.none,
  6762. Cookie: 'referrer=1',
  6763. 'X-Requested-With': _.none,
  6764. }).then(function (pasteInfo) {
  6765. pasteInfo = _.parseJSON(pasteInfo);
  6766. if (!pasteInfo.ok) {
  6767. throw new _.AdsBypasserError("error when getting paste information");
  6768. }
  6769. if (pasteInfo.paste.url) {
  6770. $.openLink(pasteInfo.paste.url);
  6771. return;
  6772. }
  6773. var raw_paste = sjcl.decrypt(paste_salt, pasteInfo.paste.text);
  6774. if (isLink(raw_paste)) {
  6775. $.openLink(raw_paste);
  6776. return;
  6777. }
  6778. var elm = document.createElement('pre');
  6779. elm.id = 'paste-text';
  6780. elm.innerHTML = linkify(raw_paste);
  6781. var frame = $('#paste-frame, #captcha-page');
  6782. frame.parentNode.replaceChild(elm, frame);
  6783. });
  6784. },
  6785. });
  6786. })();
  6787. $.register({
  6788. rule: {
  6789. host: /^(www\.)?pasted\.co$/,
  6790. path: /^\/\w+$/,
  6791. },
  6792. ready: function () {
  6793. 'use strict';
  6794. $.removeNodes('#captcha_overlay');
  6795. },
  6796. });
  6797. (function (context, factory) {
  6798. if (typeof module === 'object' && typeof module.exports === 'object') {
  6799. module.exports = function (context, GM) {
  6800. var _ = require('lodash');
  6801. var core = require('./core.js');
  6802. var misc = require('./misc.js');
  6803. var dispatcher = require('./dispatcher.js');
  6804. var modules = [misc, dispatcher].map(function (v) {
  6805. return v.call(null, context, GM);
  6806. });
  6807. var $ = _.assign.apply(_, modules);
  6808. return factory(context, GM, core, $);
  6809. };
  6810. } else {
  6811. factory(context, {
  6812. openInTab: GM_openInTab,
  6813. registerMenuCommand: GM_registerMenuCommand,
  6814. }, context._, context.$);
  6815. }
  6816. }(this, function (context, GM, _, $) {
  6817. 'use strict';
  6818. var window = context.window;
  6819. var document = window.document;
  6820. var isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0;
  6821. function disableWindowOpen () {
  6822. $.window.open = _.nop;
  6823. $.window.alert = _.nop;
  6824. $.window.confirm = _.nop;
  6825. }
  6826. function disableLeavePrompt (element) {
  6827. if (!element) {
  6828. return;
  6829. }
  6830. var seal = {
  6831. set: function () {
  6832. _.info('blocked onbeforeunload');
  6833. },
  6834. };
  6835. element.onbeforeunload = undefined;
  6836. if (isSafari) {
  6837. element.__defineSetter__('onbeforeunload', seal.set);
  6838. } else {
  6839. $.window.Object.defineProperty(element, 'onbeforeunload', {
  6840. configurable: true,
  6841. enumerable: false,
  6842. get: undefined,
  6843. set: seal.set,
  6844. });
  6845. }
  6846. var oael = element.addEventListener;
  6847. var nael = function (type) {
  6848. if (type === 'beforeunload') {
  6849. _.info('blocked addEventListener onbeforeunload');
  6850. return;
  6851. }
  6852. return oael.apply(this, arguments);
  6853. };
  6854. element.addEventListener = nael;
  6855. }
  6856. function changeTitle () {
  6857. document.title += ' - AdsBypasser';
  6858. }
  6859. function beforeDOMReady (handler) {
  6860. _.info('working on\n%s \nwith\n%s', window.location.toString(), JSON.stringify($.config));
  6861. disableLeavePrompt($.window);
  6862. disableWindowOpen();
  6863. handler.start();
  6864. }
  6865. function afterDOMReady (handler) {
  6866. disableLeavePrompt($.window.document.body);
  6867. changeTitle();
  6868. handler.ready();
  6869. }
  6870. function waitDOM () {
  6871. return _.D(function (resolve, reject) {
  6872. if (document.readyState !== 'loading') {
  6873. resolve();
  6874. return;
  6875. }
  6876. document.addEventListener('DOMContentLoaded', function () {
  6877. resolve();
  6878. });
  6879. });
  6880. }
  6881. $._main = function () {
  6882. var findHandler = $._findHandler;
  6883. delete $._main;
  6884. delete $._findHandler;
  6885. if (window.top !== window.self) {
  6886. return;
  6887. }
  6888. GM.registerMenuCommand('AdsBypasser - Configure', function () {
  6889. GM.openInTab('https://adsbypasser.github.io/configure.html');
  6890. });
  6891. var handler = findHandler(true);
  6892. if (handler) {
  6893. if ($.config.logLevel <= 0) {
  6894. _._quiet = true;
  6895. }
  6896. beforeDOMReady(handler);
  6897. waitDOM().then(function () {
  6898. afterDOMReady(handler);
  6899. });
  6900. return;
  6901. }
  6902. if ($.config.logLevel < 2) {
  6903. _._quiet = true;
  6904. }
  6905. _.info('does not match location on `%s`, will try HTML content', window.location.toString());
  6906. waitDOM().then(function () {
  6907. handler = findHandler(false);
  6908. if (!handler) {
  6909. _.info('does not match HTML content on `%s`', window.location.toString());
  6910. return;
  6911. }
  6912. beforeDOMReady(handler);
  6913. afterDOMReady(handler);
  6914. });
  6915. };
  6916. return $;
  6917. }));
  6918. $._main();