AdsBypasserLite

Bypass Ads

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

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