AdsBypasserLite

Bypass Ads

目前为 2015-12-28 提交的版本。查看 最新版本

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

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址