下载卫士

拒绝高(捆)速(绑)下载,隐藏高速下载器的链接

安装此脚本?
作者推荐脚本

您可能也喜欢提取码管家

安装此脚本
  1. // ==UserScript==
  2. // @name 下载卫士
  3. // @namespace http://go.newday.me/s/down-home
  4. // @version 0.2.0
  5. // @icon http://cdn.newday.me/addon/down/favicon.ico
  6. // @author 哩呵
  7. // @description 拒绝高(捆)速(绑)下载,隐藏高速下载器的链接
  8. // @match *://*.onlinedown.net/*
  9. // @match *://*.cr173.com/*
  10. // @match *://*.xiazaiba.com/*
  11. // @match *://*.mydown.com/*
  12. // @match *://*.pc6.com/*
  13. // @match *://*.zol.com.cn/*
  14. // @match *://*.pconline.com.cn/*
  15. // @match *://*.jb51.net/*
  16. // @match *://*.cncrk.com/*
  17. // @match *://pc.qq.com/*
  18. // @match *://*.crsky.com/*
  19. // @match *://*.duote.com/*
  20. // @match *://*.downza.cn/*
  21. // @match *://*.yesky.com/*
  22. // @match *://*.ddooo.com/*
  23. // @match *://*.pchome.net/*
  24. // @match *://*.xpgod.com/*
  25. // @match *://*.52z.com/*
  26. // @match *://*.opdown.com/*
  27. // @match *://*.newday.me/*
  28. // @match *://*.likestyle.cn/*
  29. // @connect newday.me
  30. // @connect likestyle.cn
  31. // @require https://cdn.staticfile.org/jquery/1.12.4/jquery.min.js
  32. // @run-at document-start
  33. // @grant unsafeWindow
  34. // @grant GM_getValue
  35. // @grant GM_setValue
  36. // @grant GM_deleteValue
  37. // @grant GM_listValues
  38. // @grant GM_openInTab
  39. // @grant GM_notification
  40. // @grant GM_xmlhttpRequest
  41. // ==/UserScript==
  42.  
  43. (function () {
  44. 'use strict';
  45.  
  46. var manifest = {
  47. "name": "xzws",
  48. "urls": {},
  49. "apis": {
  50. "version": "https://api.newday.me/share/down/version"
  51. },
  52. "logger_level": 3,
  53. "options_page": "http://go.newday.me/s/down-option"
  54. };
  55.  
  56. var container = (function () {
  57. var obj = {
  58. defines: {},
  59. modules: {}
  60. };
  61.  
  62. obj.define = function (name, requires, callback) {
  63. name = obj.processName(name);
  64. obj.defines[name] = {
  65. requires: requires,
  66. callback: callback
  67. };
  68. };
  69.  
  70. obj.require = function (name, cache) {
  71. if (typeof cache == "undefined") {
  72. cache = true;
  73. }
  74.  
  75. name = obj.processName(name);
  76. if (cache && obj.modules.hasOwnProperty(name)) {
  77. return obj.modules[name];
  78. } else if (obj.defines.hasOwnProperty(name)) {
  79. var requires = obj.defines[name].requires;
  80. var callback = obj.defines[name].callback;
  81.  
  82. var module = obj.use(requires, callback);
  83. cache && obj.register(name, module);
  84. return module;
  85. }
  86. };
  87.  
  88. obj.use = function (requires, callback) {
  89. var module = {
  90. exports: undefined
  91. };
  92. var params = obj.buildParams(requires, module);
  93. var result = callback.apply(this, params);
  94. if (typeof result != "undefined") {
  95. return result;
  96. } else {
  97. return module.exports;
  98. }
  99. };
  100.  
  101. obj.register = function (name, module) {
  102. name = obj.processName(name);
  103. obj.modules[name] = module;
  104. };
  105.  
  106. obj.buildParams = function (requires, module) {
  107. var params = [];
  108. requires.forEach(function (name) {
  109. params.push(obj.require(name));
  110. });
  111. params.push(obj.require);
  112. params.push(module.exports);
  113. params.push(module);
  114. return params;
  115. };
  116.  
  117. obj.processName = function (name) {
  118. return name.toLowerCase();
  119. };
  120.  
  121. return {
  122. define: obj.define,
  123. use: obj.use,
  124. register: obj.register,
  125. modules: obj.modules
  126. };
  127. })();
  128.  
  129. container.define("gm", [], function () {
  130. var obj = {};
  131.  
  132. obj.ready = function (callback) {
  133. if (typeof GM_getValue != "undefined") {
  134. callback && callback();
  135. }
  136. else {
  137. setTimeout(function () {
  138. obj.ready(callback);
  139. }, 100);
  140. }
  141. };
  142.  
  143. return obj;
  144. });
  145.  
  146. /** common **/
  147. container.define("gmDao", [], function () {
  148. var obj = {
  149. items: {}
  150. };
  151.  
  152. obj.get = function (name) {
  153. return GM_getValue(name);
  154. };
  155.  
  156. obj.getBatch = function (names) {
  157. var items = {};
  158. names.forEach(function (name) {
  159. items[name] = obj.get(name);
  160. });
  161. return items;
  162. };
  163.  
  164. obj.getAll = function () {
  165. return obj.getBatch(GM_listValues());
  166. };
  167.  
  168. obj.set = function (name, item) {
  169. GM_setValue(name, item);
  170. };
  171.  
  172. obj.setBatch = function (items) {
  173. for (var name in items) {
  174. obj.set(name, items[name]);
  175. }
  176. };
  177.  
  178. obj.setAll = function (items) {
  179. var names = GM_listValues();
  180. names.forEach(function (name) {
  181. if (!items.hasOwnProperty(name)) {
  182. obj.remove(name);
  183. }
  184. });
  185. obj.setBatch(items);
  186. };
  187.  
  188. obj.remove = function (name) {
  189. GM_deleteValue(name);
  190. };
  191.  
  192. obj.removeBatch = function (names) {
  193. names.forEach(function (name) {
  194. obj.remove(name);
  195. });
  196. };
  197.  
  198. obj.removeAll = function () {
  199. obj.removeBatch(GM_listValues());
  200. };
  201.  
  202. return obj;
  203. });
  204.  
  205. container.define("ScopeDao", [], function () {
  206. return function (dao, scope) {
  207. var obj = {
  208. items: {}
  209. };
  210.  
  211. obj.get = function (name) {
  212. return obj.items[name];
  213. };
  214.  
  215. obj.getBatch = function (names) {
  216. var items = {};
  217. names.forEach(function (name) {
  218. if (obj.items.hasOwnProperty(name)) {
  219. items[name] = obj.items[name];
  220. }
  221. });
  222. return items;
  223. };
  224.  
  225. obj.getAll = function () {
  226. return obj.items;
  227. };
  228.  
  229. obj.set = function (name, item) {
  230. obj.items[name] = item;
  231.  
  232. obj.sync();
  233. };
  234.  
  235. obj.setBatch = function (items) {
  236. obj.items = Object.assign(obj.items, items);
  237.  
  238. obj.sync();
  239. };
  240.  
  241. obj.setAll = function (items) {
  242. obj.items = Object.assign({}, items);
  243.  
  244. obj.sync();
  245. };
  246.  
  247. obj.remove = function (name) {
  248. delete obj.items[name];
  249.  
  250. obj.sync();
  251. };
  252.  
  253. obj.removeBatch = function (names) {
  254. names.forEach(function (name) {
  255. delete obj.items[name];
  256. });
  257.  
  258. obj.sync();
  259. };
  260.  
  261. obj.removeAll = function () {
  262. obj.items = {};
  263.  
  264. obj.getDao().remove(obj.getScope());
  265. };
  266.  
  267. obj.init = function () {
  268. var items = obj.getDao().get(obj.getScope());
  269. if (items instanceof Object) {
  270. obj.items = items;
  271. }
  272. };
  273.  
  274. obj.sync = function () {
  275. obj.getDao().set(obj.getScope(), obj.items);
  276. };
  277.  
  278. obj.getDao = function () {
  279. return dao;
  280. };
  281.  
  282. obj.getScope = function () {
  283. return scope;
  284. };
  285.  
  286. return obj.init(), obj;
  287. };
  288. });
  289.  
  290. container.define("config", ["factory"], function (factory) {
  291. var obj = {};
  292.  
  293. obj.getConfig = function (name) {
  294. return obj.getDao().get(name);
  295. };
  296.  
  297. obj.setConfig = function (name, value) {
  298. obj.getDao().set(name, value);
  299. };
  300.  
  301. obj.getAll = function () {
  302. return obj.getDao().getAll();
  303. };
  304.  
  305. obj.getDao = function () {
  306. return factory.getConfigDao();
  307. };
  308.  
  309. return obj;
  310. });
  311.  
  312. container.define("storage", ["factory"], function (factory) {
  313. var obj = {};
  314.  
  315. obj.getValue = function (name) {
  316. return obj.getDao().get(name);
  317. };
  318.  
  319. obj.setValue = function (name, value) {
  320. obj.getDao().set(name, value);
  321. };
  322.  
  323. obj.getAll = function () {
  324. return obj.getDao().getAll();
  325. };
  326.  
  327. obj.getDao = function () {
  328. return factory.getStorageDao();
  329. };
  330.  
  331. return obj;
  332. });
  333.  
  334. container.define("option", ["config", "constant"], function (config, constant) {
  335. var obj = {
  336. name: "option",
  337. constant: constant.option
  338. };
  339.  
  340. obj.isOptionActive = function (item) {
  341. var name = item.name;
  342. var option = obj.getOption();
  343. return option.indexOf(name) >= 0 ? true : false;
  344. };
  345.  
  346. obj.setOptionActive = function (item) {
  347. var name = item.name;
  348. var option = obj.getOption();
  349. if (option.indexOf(name) < 0) {
  350. option.push(name);
  351. obj.setOption(option);
  352. }
  353. };
  354.  
  355. obj.setOptionUnActive = function (item) {
  356. var name = item.name;
  357. var option = obj.getOption();
  358. var index = option.indexOf(name);
  359. if (index >= 0) {
  360. delete option[index];
  361. obj.setOption(option);
  362. }
  363. };
  364.  
  365. obj.getOption = function () {
  366. var option = [];
  367. var optionList = obj.getOptionList();
  368. Object.values(obj.constant).forEach(function (item) {
  369. var name = item.name;
  370. if (optionList.hasOwnProperty(name)) {
  371. if (optionList[name] != "no") {
  372. option.push(name);
  373. }
  374. }
  375. else if (item.value != "no") {
  376. option.push(name);
  377. }
  378. });
  379. return option;
  380. };
  381.  
  382. obj.setOption = function (option) {
  383. var optionList = {};
  384. Object.values(obj.constant).forEach(function (item) {
  385. var name = item.name;
  386. if (option.indexOf(name) >= 0) {
  387. optionList[name] = "yes";
  388. } else {
  389. optionList[name] = "no";
  390. }
  391. });
  392. obj.setOptionList(optionList);
  393. };
  394.  
  395. obj.getOptionList = function () {
  396. var optionList = config.getConfig(obj.name);
  397. return optionList ? optionList : {};
  398. };
  399.  
  400. obj.setOptionList = function (optionList) {
  401. config.setConfig(obj.name, optionList);
  402. };
  403.  
  404. return obj;
  405. });
  406.  
  407. container.define("manifest", [], function () {
  408. var obj = {
  409. manifest: manifest
  410. };
  411.  
  412. obj.getItem = function (name) {
  413. return obj.manifest[name];
  414. };
  415.  
  416. obj.getManifest = function () {
  417. return obj.manifest;
  418. };
  419.  
  420. obj.getName = function () {
  421. return obj.getItem("name");
  422. };
  423.  
  424. obj.getAppName = function () {
  425. return obj.getItem("app_name");
  426. };
  427.  
  428. obj.getUrl = function (name) {
  429. var urls = obj.getItem("urls");
  430. (urls instanceof Object) || (urls = {});
  431. return urls[name];
  432. };
  433.  
  434. obj.getApi = function (name) {
  435. var apis = obj.getItem("apis");
  436. (apis instanceof Object) || (apis = {});
  437. return apis[name];
  438. };
  439.  
  440. obj.getOptionsPage = function () {
  441. if (GM_info.script.optionUrl) {
  442. return GM_info.script.optionUrl;
  443. }
  444. else {
  445. return obj.getItem("options_page");
  446. }
  447. };
  448.  
  449. return obj;
  450. });
  451.  
  452. container.define("env", ["config", "manifest"], function (config, manifest) {
  453. var obj = {
  454. modes: {
  455. ADDON: "addon",
  456. SCRIPT: "script"
  457. },
  458. browsers: {
  459. FIREFOX: "firefox",
  460. EDG: "edg",
  461. EDGE: "edge",
  462. BAIDU: "baidu",
  463. LIEBAO: "liebao",
  464. UC: "uc",
  465. QQ: "qq",
  466. SOGOU: "sogou",
  467. OPERA: "opera",
  468. MAXTHON: "maxthon",
  469. IE2345: "2345",
  470. SE360: "360",
  471. CHROME: "chrome",
  472. SAFIRI: "safari",
  473. OTHER: "other"
  474. }
  475. };
  476.  
  477. obj.getName = function () {
  478. return manifest.getName();
  479. };
  480.  
  481. obj.getMode = function () {
  482. if (GM_info.mode) {
  483. return GM_info.mode;
  484. }
  485. else {
  486. return obj.modes.SCRIPT;
  487. }
  488. };
  489.  
  490. obj.getAid = function () {
  491. if (GM_info.scriptHandler) {
  492. return GM_info.scriptHandler.toLowerCase();
  493. }
  494. else {
  495. return "unknown";
  496. }
  497. };
  498.  
  499. obj.getUid = function () {
  500. var uid = config.getConfig("uid");
  501. if (!uid) {
  502. uid = obj.randString(32);
  503. config.setConfig("uid", uid);
  504. }
  505. return uid;
  506. };
  507.  
  508. obj.getBrowser = function () {
  509. if (!obj._browser) {
  510. obj._browser = obj.matchBrowserType(navigator.userAgent);
  511. }
  512. return obj._browser;
  513. };
  514.  
  515. obj.getVersion = function () {
  516. return GM_info.script.version;
  517. };
  518.  
  519. obj.getEdition = function () {
  520. return GM_info.version;
  521. };
  522.  
  523. obj.getInfo = function () {
  524. return {
  525. mode: obj.getMode(),
  526. aid: obj.getAid(),
  527. uid: obj.getUid(),
  528. browser: obj.getBrowser(),
  529. version: obj.getVersion(),
  530. edition: obj.getEdition()
  531. };
  532. };
  533.  
  534. obj.matchBrowserType = function (userAgent) {
  535. var browser = obj.browsers.OTHER;
  536. userAgent = userAgent.toLowerCase();
  537. if (userAgent.match(/firefox/) != null) {
  538. browser = obj.browsers.FIREFOX;
  539. } else if (userAgent.match(/edge/) != null) {
  540. browser = obj.browsers.EDGE;
  541. } else if (userAgent.match(/edg/) != null) {
  542. browser = obj.browsers.EDG;
  543. } else if (userAgent.match(/bidubrowser/) != null) {
  544. browser = obj.browsers.BAIDU;
  545. } else if (userAgent.match(/lbbrowser/) != null) {
  546. browser = obj.browsers.LIEBAO;
  547. } else if (userAgent.match(/ubrowser/) != null) {
  548. browser = obj.browsers.UC;
  549. } else if (userAgent.match(/qqbrowse/) != null) {
  550. browser = obj.browsers.QQ;
  551. } else if (userAgent.match(/metasr/) != null) {
  552. browser = obj.browsers.SOGOU;
  553. } else if (userAgent.match(/opr/) != null) {
  554. browser = obj.browsers.OPERA;
  555. } else if (userAgent.match(/maxthon/) != null) {
  556. browser = obj.browsers.MAXTHON;
  557. } else if (userAgent.match(/2345explorer/) != null) {
  558. browser = obj.browsers.IE2345;
  559. } else if (userAgent.match(/chrome/) != null) {
  560. if (navigator.mimeTypes.length > 10) {
  561. browser = obj.browsers.SE360;
  562. } else {
  563. browser = obj.browsers.CHROME;
  564. }
  565. } else if (userAgent.match(/safari/) != null) {
  566. browser = obj.browsers.SAFIRI;
  567. }
  568. return browser;
  569. };
  570.  
  571. obj.randString = function (length) {
  572. var possible = "abcdefghijklmnopqrstuvwxyz0123456789";
  573. var text = "";
  574. for (var i = 0; i < length; i++) {
  575. text += possible.charAt(Math.floor(Math.random() * possible.length));
  576. }
  577. return text;
  578. };
  579.  
  580. return obj;
  581. });
  582.  
  583. container.define("http", [], function () {
  584. var obj = {};
  585.  
  586. obj.ajax = function (option) {
  587. var details = {
  588. method: option.type,
  589. url: option.url,
  590. responseType: option.dataType,
  591. onload: function (result) {
  592. option.success && option.success(result.response);
  593. },
  594. onerror: function (result) {
  595. option.error && option.error(result.error);
  596. }
  597. };
  598.  
  599. // 提交数据
  600. if (option.data instanceof Object) {
  601. if (option.data instanceof FormData) {
  602. details.data = option.data;
  603. }
  604. else {
  605. var formData = new FormData();
  606. for (var i in option.data) {
  607. formData.append(i, option.data[i]);
  608. }
  609. details.data = formData;
  610. }
  611. }
  612.  
  613. // 自定义头
  614. if (option.headers) {
  615. details.headers = option.headers;
  616. }
  617.  
  618. // 超时
  619. if (option.timeout) {
  620. details.timeout = option.timeout;
  621. }
  622.  
  623. GM_xmlhttpRequest(details);
  624. };
  625.  
  626. return obj;
  627. });
  628.  
  629. container.define("router", [], function () {
  630. var obj = {};
  631.  
  632. obj.getUrl = function () {
  633. return location.href;
  634. };
  635.  
  636. obj.goUrl = function (url) {
  637. location.href = url;
  638. };
  639.  
  640. obj.openUrl = function (url) {
  641. window.open(url);
  642. };
  643.  
  644. obj.openTab = function (url, active) {
  645. GM_openInTab(url, !active);
  646. };
  647.  
  648. obj.jumpLink = function (jumpUrl, jumpMode) {
  649. switch (jumpMode) {
  650. case 9:
  651. // self
  652. obj.goUrl(jumpUrl);
  653. break;
  654. case 6:
  655. // new
  656. obj.openUrl(jumpUrl);
  657. break;
  658. case 3:
  659. // new & not active
  660. obj.openTab(jumpUrl, false);
  661. break;
  662. case 1:
  663. // new & active
  664. obj.openTab(jumpUrl, true);
  665. break;
  666. }
  667. };
  668.  
  669. obj.getUrlParam = function (name) {
  670. var param = obj.parseUrlParam(obj.getUrl());
  671. if (name) {
  672. return param.hasOwnProperty(name) ? param[name] : null;
  673. }
  674. else {
  675. return param;
  676. }
  677. };
  678.  
  679. obj.parseUrlParam = function (url) {
  680. if (url.indexOf("?")) {
  681. url = url.split("?")[1];
  682. }
  683. var reg = /([^=&\s]+)[=\s]*([^=&\s]*)/g;
  684. var obj = {};
  685. while (reg.exec(url)) {
  686. obj[RegExp.$1] = RegExp.$2;
  687. }
  688. return obj;
  689. };
  690.  
  691. return obj;
  692. });
  693.  
  694. container.define("calendar", [], function () {
  695. var obj = {};
  696.  
  697. obj.getTime = function () {
  698. return (new Date()).getTime();
  699. };
  700.  
  701. obj.formatTime = function (format, timestamp) {
  702. format || (format = "Y-m-d H:i:s");
  703. timestamp || (timestamp = obj.getTime());
  704. var date = new Date(timestamp);
  705. var year = 1900 + date.getYear();
  706. var month = "0" + (date.getMonth() + 1);
  707. var day = "0" + date.getDate();
  708. var hour = "0" + date.getHours();
  709. var minute = "0" + date.getMinutes();
  710. var second = "0" + date.getSeconds();
  711. var vars = {
  712. "Y": year,
  713. "m": month.substring(month.length - 2, month.length),
  714. "d": day.substring(day.length - 2, day.length),
  715. "H": hour.substring(hour.length - 2, hour.length),
  716. "i": minute.substring(minute.length - 2, minute.length),
  717. "s": second.substring(second.length - 2, second.length)
  718. };
  719. return obj.replaceVars(vars, format);
  720. };
  721.  
  722. obj.replaceVars = function (vars, value) {
  723. Object.keys(vars).forEach(function (key) {
  724. value = value.replace(key, vars[key]);
  725. });
  726. return value;
  727. };
  728.  
  729. return obj;
  730. });
  731.  
  732. container.define("logger", ["env", "manifest"], function (env, manifest) {
  733. var obj = {
  734. constant: {
  735. DEBUG: 0,
  736. INFO: 1,
  737. WARN: 2,
  738. ERROR: 3,
  739. NONE: 4
  740. }
  741. };
  742.  
  743. obj.debug = function (message) {
  744. obj.log(message, obj.constant.DEBUG);
  745. };
  746.  
  747. obj.info = function (message) {
  748. obj.log(message, obj.constant.INFO);
  749. };
  750.  
  751. obj.warn = function (message) {
  752. obj.log(message, obj.constant.WARN);
  753. };
  754.  
  755. obj.error = function (message) {
  756. obj.log(message, obj.constant.ERROR);
  757. };
  758.  
  759. obj.log = function (message, level) {
  760. if (level < manifest.getItem("logger_level")) {
  761. return false;
  762. }
  763.  
  764. console.group("[" + env.getName() + "]" + env.getMode());
  765. console.log(message);
  766. console.groupEnd();
  767. };
  768.  
  769. return obj;
  770. });
  771.  
  772. container.define("meta", ["env", "$"], function (env, $) {
  773. var obj = {};
  774.  
  775. obj.existMeta = function (name) {
  776. name = obj.processName(name);
  777. if ($("meta[name='" + name + "']").length) {
  778. return true;
  779. }
  780. else {
  781. return false;
  782. }
  783. };
  784.  
  785. obj.appendMeta = function (name, content) {
  786. name = obj.processName(name);
  787. content || (content = "on");
  788. $('<meta name="' + name + '" content="on">').appendTo($("head"));
  789. };
  790.  
  791. obj.processName = function (name) {
  792. return env.getName() + "::" + name;
  793. };
  794.  
  795. return obj;
  796. });
  797.  
  798. container.define("unsafeWindow", [], function () {
  799. if (typeof unsafeWindow == "undefined") {
  800. return window;
  801. }
  802. else {
  803. return unsafeWindow;
  804. }
  805. });
  806.  
  807. container.define("calendar", [], function () {
  808. var obj = {};
  809.  
  810. obj.getTime = function () {
  811. return (new Date()).getTime();
  812. };
  813.  
  814. obj.formatTime = function (format, timestamp) {
  815. format || (format = "Y-m-d H:i:s");
  816. timestamp || (timestamp = obj.getTime());
  817. var date = new Date(timestamp);
  818. var year = 1900 + date.getYear();
  819. var month = "0" + (date.getMonth() + 1);
  820. var day = "0" + date.getDate();
  821. var hour = "0" + date.getHours();
  822. var minute = "0" + date.getMinutes();
  823. var second = "0" + date.getSeconds();
  824. var vars = {
  825. "Y": year,
  826. "m": month.substring(month.length - 2, month.length),
  827. "d": day.substring(day.length - 2, day.length),
  828. "H": hour.substring(hour.length - 2, hour.length),
  829. "i": minute.substring(minute.length - 2, minute.length),
  830. "s": second.substring(second.length - 2, second.length)
  831. };
  832. return obj.replaceVars(vars, format);
  833. };
  834.  
  835. obj.replaceVars = function (vars, value) {
  836. Object.keys(vars).forEach(function (key) {
  837. value = value.replace(key, vars[key]);
  838. });
  839. return value;
  840. };
  841.  
  842. return obj;
  843. });
  844.  
  845. container.define("oneData", ["env", "http"], function (env, http) {
  846. var obj = {};
  847.  
  848. obj.requestOneApi = function (url, data, callback) {
  849. http.ajax({
  850. type: "post",
  851. url: url,
  852. dataType: "json",
  853. data: Object.assign(env.getInfo(), data),
  854. success: function (response) {
  855. callback && callback(response);
  856. },
  857. error: function () {
  858. callback && callback("");
  859. }
  860. });
  861. };
  862.  
  863. return obj;
  864. });
  865.  
  866. container.define("appRunner", ["router", "logger", "meta", "$"], function (router, logger, meta, $, require) {
  867. var obj = {};
  868.  
  869. obj.run = function (appList) {
  870. var metaName = "status";
  871. if (meta.existMeta(metaName)) {
  872. logger.info("setup already");
  873. }
  874. else {
  875. // 添加meta
  876. meta.appendMeta(metaName);
  877.  
  878. // 运行应用
  879. $(function () {
  880. obj.runAppList(appList);
  881. });
  882. }
  883. };
  884.  
  885. obj.runAppList = function (appList) {
  886. var url = router.getUrl();
  887. for (var i in appList) {
  888. var app = appList[i];
  889.  
  890. var match = obj.matchApp(url, app);
  891. if (match == false) {
  892. continue;
  893. }
  894.  
  895. if (require(app.name).run() == true) {
  896. break;
  897. }
  898. }
  899. };
  900.  
  901. obj.matchApp = function (url, app) {
  902. var match = false;
  903. app.matchs.forEach(function (item) {
  904. if (url.indexOf(item) > 0 || item == "*") {
  905. match = true;
  906. }
  907. });
  908. return match;
  909. };
  910.  
  911. return obj;
  912. });
  913.  
  914. /** custom **/
  915. container.define("factory", ["gmDao", "ScopeDao"], function (gmDao, ScopeDao) {
  916. var obj = {
  917. daos: {}
  918. };
  919.  
  920. obj.getConfigDao = function () {
  921. return obj.getDao("config", function () {
  922. return ScopeDao(gmDao, "$config");
  923. });
  924. };
  925.  
  926. obj.getStorageDao = function () {
  927. return obj.getDao("storage", function () {
  928. return ScopeDao(gmDao, "$storage");
  929. });
  930. };
  931.  
  932. obj.getDao = function (key, createFunc) {
  933. if (!obj.daos.hasOwnProperty(key)) {
  934. obj.daos[key] = createFunc();
  935. }
  936. return obj.daos[key];
  937. };
  938.  
  939. return obj;
  940. });
  941.  
  942. container.define("constant", [], function () {
  943. return {
  944. option: {
  945. site_onlinedown: {
  946. name: "site_onlinedown",
  947. value: "yes"
  948. },
  949. site_cr173: {
  950. name: "site_cr173",
  951. value: "yes"
  952. },
  953. site_xiazaiba: {
  954. name: "site_xiazaiba",
  955. value: "yes"
  956. },
  957. site_mydown: {
  958. name: "site_mydown",
  959. value: "yes"
  960. },
  961. site_pc6: {
  962. name: "site_pc6",
  963. value: "yes"
  964. },
  965. site_zol: {
  966. name: "site_zol",
  967. value: "yes"
  968. },
  969. site_pconline: {
  970. name: "site_pconline",
  971. value: "yes"
  972. },
  973. site_jb51: {
  974. name: "site_jb51",
  975. value: "yes"
  976. },
  977. site_cncrk: {
  978. name: "site_cncrk",
  979. value: "yes"
  980. },
  981. site_pc_qq: {
  982. name: "site_pc_qq",
  983. value: "yes"
  984. },
  985. site_crsky: {
  986. name: "site_crsky",
  987. value: "yes"
  988. },
  989. site_duote: {
  990. name: "site_duote",
  991. value: "yes"
  992. },
  993. site_downza: {
  994. name: "site_downza",
  995. value: "yes"
  996. },
  997. site_yesky: {
  998. name: "site_yesky",
  999. value: "yes"
  1000. },
  1001. site_ddooo: {
  1002. name: "site_ddooo",
  1003. value: "yes"
  1004. },
  1005. site_pchome: {
  1006. name: "site_pchome",
  1007. value: "yes"
  1008. },
  1009. site_xpgod: {
  1010. name: "site_xpgod",
  1011. value: "yes"
  1012. },
  1013. site_52z: {
  1014. name: "site_52z",
  1015. value: "yes"
  1016. },
  1017. site_opdown: {
  1018. name: "site_opdown",
  1019. value: "yes"
  1020. }
  1021. }
  1022. };
  1023. });
  1024.  
  1025. container.define("api", ["manifest", "oneData"], function (manifest, oneData) {
  1026. var obj = {};
  1027.  
  1028. obj.versionQuery = function (callback) {
  1029. oneData.requestOneApi(manifest.getApi("version"), {}, callback);
  1030. };
  1031.  
  1032. return obj;
  1033. });
  1034.  
  1035. container.define("runtime", ["router", "manifest", "calendar", "storage", "api"], function (router, manifest, calendar, storage, api) {
  1036. var obj = {};
  1037.  
  1038. obj.openOptionsPage = function () {
  1039. router.openTab(manifest.getOptionsPage(), true);
  1040. };
  1041.  
  1042. obj.initVersion = function () {
  1043. var versionDate = parseInt(storage.getValue("version_date"));
  1044. var currentDate = calendar.formatTime("Ymd");
  1045. if (!versionDate || versionDate < currentDate) {
  1046. api.versionQuery(function (response) {
  1047. storage.setValue("version_date", currentDate);
  1048.  
  1049. if (response && response.code == 1 && response.data instanceof Object) {
  1050. var versionPayload = response.data;
  1051. storage.setValue("version_payload", versionPayload);
  1052. storage.setValue("version_latest", versionPayload.version);
  1053. }
  1054. });
  1055. }
  1056. };
  1057.  
  1058. obj.initRuntime = function () {
  1059. obj.initVersion();
  1060. };
  1061.  
  1062. return obj;
  1063. });
  1064.  
  1065. container.define("core", ["runtime"], function (runtime) {
  1066. var obj = {};
  1067.  
  1068. obj.ready = function (callback) {
  1069. runtime.initRuntime();
  1070.  
  1071. callback && callback();
  1072. };
  1073.  
  1074. return obj;
  1075. });
  1076.  
  1077. container.define("guarder", ["$"], function ($) {
  1078. var obj = {};
  1079.  
  1080. obj.hideSelectorTip = function (selector) {
  1081. $(selector).each(function () {
  1082. obj.hideSingleTip(this);
  1083. });
  1084. };
  1085.  
  1086. obj.hideSingleTip = function (element) {
  1087. var $element = $(element);
  1088. var text = $element.text();
  1089. if (text.indexOf("下载器") >= 0) {
  1090. $element.hide();
  1091. }
  1092. };
  1093.  
  1094. obj.hideSelectorHref = function (selector) {
  1095. $(selector).each(function () {
  1096. obj.hideSingleHref(this);
  1097. });
  1098. };
  1099.  
  1100. obj.hideSingleHref = function (element) {
  1101. var $element = $(element);
  1102. var href = $element.attr("href");
  1103. if (href.indexOf("@") >= 0 && href.indexOf(".exe") >= 0) {
  1104. $element.hide();
  1105. }
  1106. else if (href.indexOf("javascript") >= 0) {
  1107. $element.hide();
  1108. }
  1109. };
  1110.  
  1111. return obj;
  1112. });
  1113.  
  1114. /** app **/
  1115. // http://www.onlinedown.net/soft/5.htm
  1116. container.define("app_onlinedown", ["router", "option", "$"], function (router, option, $) {
  1117. var obj = {};
  1118.  
  1119. obj.run = function () {
  1120. var url = router.getUrl();
  1121. if (url.indexOf("onlinedown.net/soft") > 0) {
  1122. option.isOptionActive(option.constant.site_onlinedown) && obj.initDownloadPage();
  1123. return true;
  1124. }
  1125. else {
  1126. return false;
  1127. }
  1128. };
  1129.  
  1130. obj.initDownloadPage = function () {
  1131. // 顶部高速下载
  1132. $(".onedownbtn2").hide();
  1133.  
  1134. // 底部高速下载
  1135. $($(".downDz h4").get(0)).hide();
  1136. $(".downDz .gaosu").hide();
  1137.  
  1138. // 移除弹窗
  1139. $(".wxWp").remove();
  1140. };
  1141.  
  1142. return obj;
  1143. });
  1144.  
  1145. // https://www.cr173.com/soft/18645.html
  1146. container.define("app_cr173", ["router", "option", "$"], function (router, option, $) {
  1147. var obj = {};
  1148.  
  1149. obj.run = function () {
  1150. var url = router.getUrl();
  1151. if (url.indexOf("cr173.com/soft") > 0 || url.indexOf("cr173.com/game") > 0) {
  1152. option.isOptionActive(option.constant.site_cr173) && obj.initSoftPage();
  1153. return true;
  1154. }
  1155. else {
  1156. return false;
  1157. }
  1158. };
  1159.  
  1160. obj.initSoftPage = function () {
  1161. // 顶部高速下载
  1162. $(".downnowgaosu").hide();
  1163.  
  1164. // 底部高速下载
  1165. $(".ul_Address").each(function () {
  1166. if ($(this).find(".f-gsh3").length > 1) {
  1167. $($(this).find(".f-gsh3").get(0)).hide();
  1168. }
  1169. });
  1170. $(".ul_Address .downurl").hide();
  1171. };
  1172.  
  1173. return obj;
  1174. });
  1175.  
  1176. // https://www.xiazaiba.com/html/82.html
  1177. container.define("app_xiazaiba", ["router", "option", "$"], function (router, option, $) {
  1178. var obj = {};
  1179.  
  1180. obj.run = function () {
  1181. var url = router.getUrl();
  1182. if (url.indexOf("xiazaiba.com/html") > 0) {
  1183. option.isOptionActive(option.constant.site_xiazaiba) && obj.initDownloadPage();
  1184. return true;
  1185. }
  1186. else {
  1187. return false;
  1188. }
  1189. };
  1190.  
  1191. obj.initDownloadPage = function () {
  1192. // 顶部高速下载
  1193. $(".hspeed").hide();
  1194.  
  1195. // 底部高速下载
  1196. $(".needfast").parent().hide();
  1197. };
  1198.  
  1199. return obj;
  1200. });
  1201.  
  1202. // http://www.mydown.com/soft/421/472030921.shtml
  1203. container.define("app_mydown", ["router", "option", "$"], function (router, option, $) {
  1204. var obj = {};
  1205.  
  1206. obj.run = function () {
  1207. var url = router.getUrl();
  1208. if (url.indexOf("mydown.com/soft") > 0) {
  1209. option.isOptionActive(option.constant.site_mydown) && obj.initDownloadPage();
  1210. return true;
  1211. }
  1212. else {
  1213. return false;
  1214. }
  1215. };
  1216.  
  1217. obj.initDownloadPage = function () {
  1218. // 高速下载
  1219. $(".downbtn").hide();
  1220. };
  1221.  
  1222. return obj;
  1223. });
  1224.  
  1225. // http://www.pc6.com/softview/SoftView_1822.html
  1226. // http://www.pc6.com/mod/647389.html
  1227. // http://www.pc6.com/az/254734.html
  1228. container.define("app_pc6", ["router", "option", "$"], function (router, option, $) {
  1229. var obj = {};
  1230.  
  1231. obj.run = function () {
  1232. var url = router.getUrl();
  1233. if (url.indexOf("pc6.com/softview") > 0) {
  1234. option.isOptionActive(option.constant.site_pc6) && obj.initDownloadPageSoft();
  1235. return true;
  1236. }
  1237. else if (url.indexOf("pc6.com/mod") > 0) {
  1238. option.isOptionActive(option.constant.site_pc6) && obj.initDownloadPageSoft();
  1239. return true;
  1240. }
  1241. else if (url.indexOf("pc6.com/az") > 0) {
  1242. option.isOptionActive(option.constant.site_pc6) && obj.initDownloadPageAndroid();
  1243. return true;
  1244. }
  1245. else {
  1246. return false;
  1247. }
  1248. };
  1249.  
  1250. obj.initDownloadPageSoft = function () {
  1251. // 顶部高速下载
  1252. $("#xzbtn .downnow").hide();
  1253.  
  1254. // 底部高速下载
  1255. $(".ul_Address").each(function () {
  1256. if ($(this).find("h3").length > 1) {
  1257. $($(this).find("h3").get(0)).hide();
  1258. }
  1259. });
  1260. $(".ul_Address #gaosuxiazai").hide();
  1261. };
  1262.  
  1263. obj.initDownloadPageAndroid = function () {
  1264. $(".ul_Address").each(function () {
  1265. if ($(this).find("h3").length > 1) {
  1266. $($(this).find("h3").get(0)).hide();
  1267. }
  1268. });
  1269. $(".ul_Address #gaosuxiazai").hide();
  1270. };
  1271.  
  1272. return obj;
  1273. });
  1274.  
  1275. // http://xiazai.zol.com.cn/detail/9/89734.shtml
  1276. // http://xiazai.zol.com.cn/index.php?c=Detail_DetailMini&n=e4bd1f21d0c761d05&softid=89734
  1277. container.define("app_zol", ["router", "option", "$"], function (router, option, $) {
  1278. var obj = {};
  1279.  
  1280. obj.run = function () {
  1281. var url = router.getUrl();
  1282. if (url.indexOf("zol.com.cn/detail") > 0) {
  1283. option.isOptionActive(option.constant.site_zol) && obj.initDownloadPage();
  1284. return true;
  1285. }
  1286. else if (url.indexOf("zol.com.cn/index.php") > 0) {
  1287. option.isOptionActive(option.constant.site_zol) && obj.initDownloadPageMini();
  1288. return true;
  1289. }
  1290. else {
  1291. return false;
  1292. }
  1293. };
  1294.  
  1295. obj.initDownloadPage = function () {
  1296. // 顶部高速下载
  1297. $(".soft-text-l").hide();
  1298. $(".soft-text-r").addClass("soft-text-l").removeClass("soft-text-r");
  1299.  
  1300. // 底部高速下载
  1301. $(".box-top-ad").hide();
  1302. };
  1303.  
  1304. obj.initDownloadPageMini = function () {
  1305. $(".down-h4").parent().hide();
  1306. $(".down-jisu").hide();
  1307. };
  1308.  
  1309. return obj;
  1310. });
  1311.  
  1312. // https://dl.pconline.com.cn/download/91034.html
  1313. container.define("app_pconline", ["router", "option", "$"], function (router, option, $) {
  1314. var obj = {};
  1315.  
  1316. obj.run = function () {
  1317. var url = router.getUrl();
  1318. if (url.indexOf("pconline.com.cn/download") > 0) {
  1319. option.isOptionActive(option.constant.site_pconline) && obj.initDownloadPage();
  1320. return true;
  1321. }
  1322. else {
  1323. return false;
  1324. }
  1325. };
  1326.  
  1327. obj.initDownloadPage = function () {
  1328. // 顶部高速下载
  1329. $("#JhsBtn").hide();
  1330.  
  1331. // 底部高速下载
  1332. $(".links p").not(".mb10").hide();
  1333.  
  1334. // 误导性广告
  1335. $(".ivy").hide();
  1336. };
  1337.  
  1338. return obj;
  1339. });
  1340.  
  1341. // https://www.jb51.net/softs/40589.html
  1342. // https://www.jb51.net/fonts/658225.html
  1343. // https://www.jb51.net/game/649384.html
  1344. // https://www.jb51.net/codes/575492.html
  1345. container.define("app_jb51", ["router", "option", "$"], function (router, option, $) {
  1346. var obj = {};
  1347.  
  1348. obj.run = function () {
  1349. var url = router.getUrl();
  1350. if (url.indexOf("jb51.net/softs") > 0) {
  1351. option.isOptionActive(option.constant.site_jb51) && obj.initDownloadPage();
  1352. return true;
  1353. }
  1354. else if (url.indexOf("jb51.net/fonts") > 0) {
  1355. option.isOptionActive(option.constant.site_jb51) && obj.initDownloadPage();
  1356. return true;
  1357. }
  1358. else if (url.indexOf("jb51.net/game") > 0) {
  1359. option.isOptionActive(option.constant.site_jb51) && obj.initDownloadPage();
  1360. return true;
  1361. }
  1362. else if (url.indexOf("jb51.net/codes") > 0) {
  1363. option.isOptionActive(option.constant.site_jb51) && obj.initDownloadPage();
  1364. return true;
  1365. }
  1366. else {
  1367. return false;
  1368. }
  1369. };
  1370.  
  1371. obj.initDownloadPage = function () {
  1372. // 顶部高速下载
  1373. $(".gsdw").hide();
  1374.  
  1375. // 底部高速下载
  1376. $($(".address-wrap .gs").get(0)).hide();
  1377. $("#gaosu").hide();
  1378. };
  1379.  
  1380. return obj;
  1381. });
  1382.  
  1383. // http://www.cncrk.com/downinfo/180262.html
  1384. container.define("app_cncrk", ["router", "option", "$"], function (router, option, $) {
  1385. var obj = {};
  1386.  
  1387. obj.run = function () {
  1388. var url = router.getUrl();
  1389. if (url.indexOf("cncrk.com/downinfo") > 0) {
  1390. option.isOptionActive(option.constant.site_cncrk) && obj.initDownloadPage();
  1391. return true;
  1392. }
  1393. else {
  1394. return false;
  1395. }
  1396. };
  1397.  
  1398. obj.initDownloadPage = function () {
  1399. // 高速下载
  1400. $("#gsxza").hide();
  1401. $(".gsdt").html("<p>全是高(捆)速(绑)下载,已作隐藏处理</p>");
  1402. };
  1403.  
  1404. return obj;
  1405. });
  1406.  
  1407. // https://pc.qq.com/detail/8/detail_11488.html
  1408. container.define("app_qq", ["router", "option", "$"], function (router, option, $) {
  1409. var obj = {};
  1410.  
  1411. obj.run = function () {
  1412. var url = router.getUrl();
  1413. if (url.indexOf("pc.qq.com/detail") > 0) {
  1414. option.isOptionActive(option.constant.site_pc_qq) && obj.initDownloadPage();
  1415. return true;
  1416. }
  1417. else {
  1418. return false;
  1419. }
  1420. };
  1421.  
  1422. obj.initDownloadPage = function () {
  1423. // 高速下载
  1424. $(".detail-install-fast").hide();
  1425. };
  1426.  
  1427. return obj;
  1428. });
  1429.  
  1430. // https://www.crsky.com/soft/48442.html
  1431. container.define("app_crsky", ["router", "option", "$"], function (router, option, $) {
  1432. var obj = {};
  1433.  
  1434. obj.run = function () {
  1435. var url = router.getUrl();
  1436. if (url.indexOf("crsky.com/soft") > 0) {
  1437. option.isOptionActive(option.constant.site_crsky) && obj.initDownloadPage();
  1438. return true;
  1439. }
  1440. else {
  1441. return false;
  1442. }
  1443. };
  1444.  
  1445. obj.initDownloadPage = function () {
  1446. $($(".i_dwon a").get(1)).hide();
  1447.  
  1448. $(".Adown_dli").hide();
  1449. };
  1450.  
  1451. return obj;
  1452. });
  1453.  
  1454. // http://www.duote.com/soft/314065.html
  1455. container.define("app_duote", ["router", "option", "$"], function (router, option, $) {
  1456. var obj = {};
  1457.  
  1458. obj.run = function () {
  1459. var url = router.getUrl();
  1460. if (url.indexOf("duote.com/soft") > 0) {
  1461. option.isOptionActive(option.constant.site_duote) && obj.initDownloadPage();
  1462. return true;
  1463. }
  1464. else {
  1465. return false;
  1466. }
  1467. };
  1468.  
  1469. obj.initDownloadPage = function () {
  1470. // 误导广告
  1471. $(".dl-banner").hide();
  1472.  
  1473. // 底部高速下载
  1474. $(".down-lists").each(function () {
  1475. if ($(this).find(".download-box").length > 1) {
  1476. $($(this).find(".download-box").get(0)).hide();
  1477. }
  1478. });
  1479. };
  1480.  
  1481. return obj;
  1482. });
  1483.  
  1484. // http://www.downza.cn/soft/193456.html
  1485. container.define("app_downza", ["router", "option", "$"], function (router, option, $) {
  1486. var obj = {};
  1487.  
  1488. obj.run = function () {
  1489. var url = router.getUrl();
  1490. if (url.indexOf("downza.cn/soft") > 0 || url.indexOf("downza.cn/android") > 0) {
  1491. option.isOptionActive(option.constant.site_downza) && obj.initDownloadPage();
  1492. return true;
  1493. }
  1494. else {
  1495. return false;
  1496. }
  1497. };
  1498.  
  1499. obj.initDownloadPage = function () {
  1500. // 顶部高速下载
  1501. $("#xzqIMG1").hide();
  1502.  
  1503. // 底部高速下载
  1504. $($(".pc-down_url_left .pull-left div").get(0)).hide();
  1505. $(".pc-down_url_left .down_top").hide();
  1506. };
  1507.  
  1508. return obj;
  1509. });
  1510.  
  1511. // http://mydown.yesky.com/pcsoft/266126.html
  1512. container.define("app_yesky", ["router", "option", "guarder", "$"], function (router, option, guarder, $) {
  1513. var obj = {};
  1514.  
  1515. obj.run = function () {
  1516. var url = router.getUrl();
  1517. if (url.indexOf("yesky.com/pcsoft") > 0) {
  1518. option.isOptionActive(option.constant.site_yesky) && obj.initDownloadPage();
  1519. return true;
  1520. }
  1521. else if (url.indexOf("yesky.com/game") > 0) {
  1522. option.isOptionActive(option.constant.site_yesky) && obj.initDownloadPage();
  1523. return true;
  1524. }
  1525. else {
  1526. return false;
  1527. }
  1528. };
  1529.  
  1530. obj.initDownloadPage = function () {
  1531. // 顶部高速下载
  1532. $(".bkdown:not(#local_down)").hide();
  1533.  
  1534. // 高速下载提示
  1535. guarder.hideSelectorTip(".bk-soft_downurl h4");
  1536.  
  1537. // 底部高速下载
  1538. $(".bk-soft_downurl .down_referer").hide();
  1539.  
  1540. // 隐藏横线
  1541. $(".bk-soft_downurl hr").hide();
  1542. };
  1543.  
  1544. return obj;
  1545. });
  1546.  
  1547. // http://www.ddooo.com/softdown/65448.htm
  1548. container.define("app_ddooo", ["router", "option", "guarder", "$"], function (router, option, guarder, $) {
  1549. var obj = {};
  1550.  
  1551. obj.run = function () {
  1552. var url = router.getUrl();
  1553. if (url.indexOf("ddooo.com/softdown") > 0) {
  1554. option.isOptionActive(option.constant.site_ddooo) && obj.initDownloadPage();
  1555. return true;
  1556. }
  1557. else {
  1558. return false;
  1559. }
  1560. };
  1561.  
  1562. obj.initDownloadPage = function () {
  1563. // 顶部高速下载
  1564. $(".gsbtn").hide();
  1565.  
  1566. // 底部高速下载
  1567. guarder.hideSelectorHref(".gs_list a");
  1568. };
  1569.  
  1570. return obj;
  1571. });
  1572.  
  1573. // https://download.pchome.net/mobile/games/other/download-193583.html
  1574. container.define("app_pchome", ["router", "option", "$"], function (router, option, $) {
  1575. var obj = {};
  1576.  
  1577. obj.run = function () {
  1578. var url = router.getUrl();
  1579. if (url.indexOf("download.pchome.net") > 0 && url.indexOf("/download-") > 0) {
  1580. option.isOptionActive(option.constant.site_pchome) && obj.initDownloadPage();
  1581. return true;
  1582. }
  1583. else {
  1584. return false;
  1585. }
  1586. };
  1587.  
  1588. obj.initDownloadPage = function () {
  1589. // 不需提示
  1590. $(".dl-tip").hide();
  1591.  
  1592. // 混淆广告
  1593. $(".mod_banner").hide();
  1594. };
  1595.  
  1596. return obj;
  1597. });
  1598.  
  1599. // https://www.xpgod.com/soft/121.html
  1600. container.define("app_xpgod", ["router", "option", "$"], function (router, option, $) {
  1601. var obj = {};
  1602.  
  1603. obj.run = function () {
  1604. var url = router.getUrl();
  1605. if (url.indexOf("xpgod.com/soft") > 0) {
  1606. option.isOptionActive(option.constant.site_xpgod) && obj.initDownloadPage();
  1607. return true;
  1608. }
  1609. else {
  1610. return false;
  1611. }
  1612. };
  1613.  
  1614. obj.initDownloadPage = function () {
  1615. if ($(".bzxz").length) {
  1616. $("#bzxz a:not(#maodian)").hide();
  1617.  
  1618. // 底部高速下载
  1619. $(".show_xzq").hide();
  1620. }
  1621. else {
  1622. setTimeout(obj.initDownloadPage, 1000);
  1623. }
  1624. };
  1625.  
  1626. return obj;
  1627. });
  1628.  
  1629. // https://www.52z.com/soft/389669.html
  1630. container.define("app_52z", ["router", "option", "guarder", "$"], function (router, option, guarder, $) {
  1631. var obj = {};
  1632.  
  1633. obj.run = function () {
  1634. var url = router.getUrl();
  1635. if (url.indexOf("52z.com/soft") > 0) {
  1636. option.isOptionActive(option.constant.site_52z) && obj.initDownloadPage();
  1637. return true;
  1638. }
  1639. else {
  1640. return false;
  1641. }
  1642. };
  1643.  
  1644. obj.initDownloadPage = function () {
  1645. if ($(".elYxxzIn").length) {
  1646. guarder.hideSelectorHref(".elYxxzIn a");
  1647. }
  1648. else {
  1649. setTimeout(obj.initDownloadPage, 1000);
  1650. }
  1651. };
  1652.  
  1653. return obj;
  1654. });
  1655.  
  1656. // http://www.opdown.com/soft/23485.html
  1657. container.define("app_opdown", ["router", "option", "guarder", "$"], function (router, option, guarder, $) {
  1658. var obj = {};
  1659.  
  1660. obj.run = function () {
  1661. var url = router.getUrl();
  1662. if (url.indexOf("opdown.com/soft") > 0) {
  1663. option.isOptionActive(option.constant.site_opdown) && obj.initDownloadPage();
  1664. return true;
  1665. }
  1666. else {
  1667. return false;
  1668. }
  1669. };
  1670.  
  1671. obj.initDownloadPage = function () {
  1672. if ($(".listaddr").length) {
  1673. $(".downnows").hide();
  1674.  
  1675. guarder.hideSelectorTip(".downbox div");
  1676.  
  1677. guarder.hideSelectorHref(".downbox a");
  1678. }
  1679. else {
  1680. setTimeout(obj.initDownloadPage, 1000);
  1681. }
  1682. };
  1683.  
  1684. return obj;
  1685. });
  1686.  
  1687. container.define("app_manage", ["meta", "unsafeWindow"], function (meta, unsafeWindow) {
  1688. var obj = {};
  1689.  
  1690. obj.run = function () {
  1691. if (meta.existMeta("manage")) {
  1692. unsafeWindow.OneDown = container;
  1693. return true;
  1694. }
  1695. else {
  1696. return false;
  1697. }
  1698. };
  1699.  
  1700. return obj;
  1701. });
  1702.  
  1703. container.define("app", ["appRunner"], function (appRunner) {
  1704. var obj = {};
  1705.  
  1706. obj.run = function () {
  1707. appRunner.run([
  1708. {
  1709. name: "app_onlinedown",
  1710. matchs: [
  1711. "onlinedown.net"
  1712. ],
  1713. switch: obj.check_switch
  1714. },
  1715. {
  1716. name: "app_cr173",
  1717. matchs: [
  1718. "cr173.com"
  1719. ],
  1720. switch: obj.check_switch
  1721. },
  1722. {
  1723. name: "app_xiazaiba",
  1724. matchs: [
  1725. "xiazaiba.com"
  1726. ],
  1727. switch: obj.check_switch
  1728. },
  1729. {
  1730. name: "app_mydown",
  1731. matchs: [
  1732. "mydown.com"
  1733. ],
  1734. switch: obj.check_switch
  1735. },
  1736. {
  1737. name: "app_pc6",
  1738. matchs: [
  1739. "pc6.com"
  1740. ],
  1741. switch: obj.check_switch
  1742. },
  1743. {
  1744. name: "app_zol",
  1745. matchs: [
  1746. "zol.com.cn"
  1747. ],
  1748. switch: obj.check_switch
  1749. },
  1750. {
  1751. name: "app_pconline",
  1752. matchs: [
  1753. "pconline.com.cn"
  1754. ],
  1755. switch: obj.check_switch
  1756. },
  1757. {
  1758. name: "app_jb51",
  1759. matchs: [
  1760. "jb51.net"
  1761. ],
  1762. switch: obj.check_switch
  1763. },
  1764. {
  1765. name: "app_cncrk",
  1766. matchs: [
  1767. "cncrk.com"
  1768. ],
  1769. switch: obj.check_switch
  1770. },
  1771. {
  1772. name: "app_qq",
  1773. matchs: [
  1774. "pc.qq.com"
  1775. ],
  1776. switch: obj.check_switch
  1777. },
  1778. {
  1779. name: "app_crsky",
  1780. matchs: [
  1781. "www.crsky.com"
  1782. ],
  1783. switch: obj.check_switch
  1784. },
  1785. {
  1786. name: "app_duote",
  1787. matchs: [
  1788. "duote.com"
  1789. ],
  1790. switch: obj.check_switch
  1791. },
  1792. {
  1793. name: "app_downza",
  1794. matchs: [
  1795. "downza.cn"
  1796. ],
  1797. switch: obj.check_switch
  1798. },
  1799. {
  1800. name: "app_yesky",
  1801. matchs: [
  1802. "yesky.com"
  1803. ],
  1804. switch: obj.check_switch
  1805. },
  1806. {
  1807. name: "app_ddooo",
  1808. matchs: [
  1809. "ddooo.com"
  1810. ],
  1811. switch: obj.check_switch
  1812. },
  1813. {
  1814. name: "app_pchome",
  1815. matchs: [
  1816. "pchome.net"
  1817. ],
  1818. switch: obj.check_switch
  1819. },
  1820. {
  1821. name: "app_xpgod",
  1822. matchs: [
  1823. "xpgod.com"
  1824. ],
  1825. switch: obj.check_switch
  1826. },
  1827. {
  1828. name: "app_52z",
  1829. matchs: [
  1830. "52z.com"
  1831. ],
  1832. switch: obj.check_switch
  1833. },
  1834. {
  1835. name: "app_opdown",
  1836. matchs: [
  1837. "opdown.com"
  1838. ],
  1839. switch: obj.check_switch
  1840. },
  1841. {
  1842. name: "app_manage",
  1843. matchs: [
  1844. "*"
  1845. ]
  1846. }
  1847. ]);
  1848. };
  1849.  
  1850. return obj;
  1851. });
  1852.  
  1853. /** lib **/
  1854. container.define("$", [], function () {
  1855. return window.$;
  1856. });
  1857.  
  1858. container.use(["gm", "core", "app"], function (gm, core, app) {
  1859. gm.ready(function () {
  1860. core.ready(app.run);
  1861. });
  1862. });
  1863.  
  1864. })();

QingJ © 2025

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