AdsBypasserLite

Bypass Ads

目前为 2016-05-29 提交的版本,查看 最新版本

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