AdsBypasserLite

Bypass Ads

当前为 2016-11-27 提交的版本,查看 最新版本

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