全网VIP视频免费破解【专注一个脚本只做一件事件】

全网VIP视频免费破解【专注一个脚本只做一件事件】。支持:腾讯、爱奇艺、优酷、芒果、pptv、乐视等其它网站;

  1. // ==UserScript==
  2. // @name 全网VIP视频免费破解【专注一个脚本只做一件事件】
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.7.0
  5. // @description 全网VIP视频免费破解【专注一个脚本只做一件事件】。支持:腾讯、爱奇艺、优酷、芒果、pptv、乐视等其它网站;
  6. // @icon data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAkACQAAD//gAUU29mdHdhcmU6IFNuaXBhc3Rl/9sAQwADAgIDAgIDAwMDBAMDBAUIBQUEBAUKBwcGCAwKDAwLCgsLDQ4SEA0OEQ4LCxAWEBETFBUVFQwPFxgWFBgSFBUU/9sAQwEDBAQFBAUJBQUJFA0LDRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQU/8AAEQgAGgAeAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/aAAwDAQACEQMRAD8A8/stTivZLhFV0eBtrhwB+PXpXc/Bj4bXXxy1ObTdE1XTrDUE3GO31PzkMyqMsytHE64Gf4iD6A15TrUx0fUriVQcXcBUY/vjivpb9hGz+w/GLTocYK6dcbvqQCa/Q6ec46dWth21zUFNzdt3zfuvS8btng5rwnkuCy3DZrSi3DGyoqiuZ6JQf1m/flq2hG+yMPTf2e9X1nVPEFlZa9olx/YTmO9nDXKxo4LB1G6AMxUockDB7E1i+Jvg/rnhzw/peuRSWut6RqP+pu9MMjgHBIDK6KwOAe3bBwa+g/hQEPiP41CVmSM6ndbmRdxA3zZIGRn8xXkniP42Wdr4C0Dwp4XhvPI0/wDeTX2oIsbyvhshUR2AGWJ5Y9h71+cUuKuK8ZxVisry6KqUqFSkpJxSiqc6DnKUp7qXPyqKV7pv3WtV8NWyzLKGAhXrNxlNTtZ3fNGdkku3Le/5njU1tDcbfNiSXacrvUHB9q3/AA/438R+Eo5o9D1/VNGSYhpV0+8kgDkdCwRhn8axaK/od0abbbitd9N7bXPh/rNflhDndo3sruyvvbtfrbc6Kf4j+LLq4uJ5vFGszT3CCOaSTUJmaVBnCsS2SBk8H1Nc7RRUU8NRoylOlBRcrXaSTdtFfvZbGU6tSpbnk3buz//Z
  7. // @author w__yi
  8. // @match *://*.youku.com/*
  9. // @match *://*.iqiyi.com/*
  10. // @match *://*.iq.com/*
  11. // @match *://*.le.com/*
  12. // @match *://v.qq.com/*
  13. // @match *://m.v.qq.com/*
  14. // @match *://*.tudou.com/*
  15. // @match *://*.mgtv.com/*
  16. // @match *://tv.sohu.com/*
  17. // @match *://film.sohu.com/*
  18. // @match *://*.1905.com/*
  19. // @match *://*.bilibili.com/*
  20. // @match *://*.pptv.com/*
  21.  
  22. // @require https://cdn.bootcdn.net/ajax/libs/jquery/3.2.1/jquery.min.js
  23. // @grant unsafeWindow
  24. // @grant GM_addStyle
  25. // @grant GM_openInTab
  26. // @grant GM_getValue
  27. // @grant GM_setValue
  28. // @grant GM_xmlhttpRequest
  29. // @grant GM_log
  30. // @charset UTF-8
  31. // @license GPL License
  32. // ==/UserScript==
  33.  
  34. const util = (function () {
  35.  
  36. function findTargetElement(targetContainer) {
  37. const body = window.document;
  38. let tabContainer;
  39. let tryTime = 0;
  40. const maxTryTime = 120;
  41. let startTimestamp;
  42. return new Promise((resolve, reject) => {
  43. function tryFindElement(timestamp) {
  44. if (!startTimestamp) {
  45. startTimestamp = timestamp;
  46. }
  47. const elapsedTime = timestamp - startTimestamp;
  48.  
  49. if (elapsedTime >= 500) {
  50. GM_log("查找元素:" + targetContainer + ",第" + tryTime + "次");
  51. tabContainer = body.querySelector(targetContainer);
  52. if (tabContainer) {
  53. resolve(tabContainer);
  54. } else if (++tryTime === maxTryTime) {
  55. reject();
  56. } else {
  57. startTimestamp = timestamp;
  58. }
  59. }
  60. if (!tabContainer && tryTime < maxTryTime) {
  61. requestAnimationFrame(tryFindElement);
  62. }
  63. }
  64.  
  65. requestAnimationFrame(tryFindElement);
  66. });
  67. }
  68.  
  69. function urlChangeReload() {
  70. const oldHref = window.location.href;
  71. let interval = setInterval(() => {
  72. let newHref = window.location.href;
  73. if (oldHref !== newHref) {
  74. clearInterval(interval);
  75. window.location.reload();
  76. }
  77. }, 500);
  78. }
  79.  
  80. function reomveVideo() {
  81. setInterval(() => {
  82. for (let video of document.getElementsByTagName("video")) {
  83. if (video.src) {
  84. video.removeAttribute("src");
  85. video.muted = true;
  86. video.load();
  87. video.pause();
  88. }
  89. }
  90. }, 500);
  91. }
  92.  
  93. function syncRequest(option) {
  94. return new Promise((resolve, reject) => {
  95. option.onload = (res) => {
  96. resolve(res);
  97. };
  98. option.onerror = (err) => {
  99. reject(err);
  100. };
  101. GM_xmlhttpRequest(option);
  102. });
  103. }
  104.  
  105. return {
  106. req: (option) => syncRequest(option),
  107. findTargetEle: (targetEle) => findTargetElement(targetEle),
  108. urlChangeReload: () => urlChangeReload(),
  109. reomveVideo: () => reomveVideo()
  110. }
  111. })();
  112.  
  113.  
  114. const superVip = (function () {
  115.  
  116. const _CONFIG_ = {
  117. isMobile: navigator.userAgent.match(/(Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini)/i),
  118. currentPlayerNode: null,
  119. vipBoxId: 'vip_jx_box' + Math.ceil(Math.random() * 100000000),
  120. flag: "flag_vip",
  121. autoPlayerKey: "auto_player_key" + window.location.host,
  122. autoPlayerVal: "auto_player_value_" + window.location.host,
  123. videoParseList: [
  124. {"name": "综合", "type": "1,3", "url": "https://jx.jsonplayer.com/player/?url="},
  125. {"name": "CK", "type": "1,3", "url": "https://www.ckplayer.vip/jiexi/?url="},
  126. {"name": "YT", "type": "1,3", "url": "https://jx.yangtu.top/?url="},
  127. {"name": "Player-JY", "type": "1,3", "url": "https://jx.playerjy.com/?url="},
  128. {"name": "yparse", "type": "1,2", "url": "https://jx.yparse.com/index.php?url="},
  129. {"name": "8090", "type": "1,3", "url": "https://www.8090g.cn/?url="},
  130. {"name": "剖元", "type": "1,3", "url": "https://www.pouyun.com/?url="},
  131. {"name": "虾米", "type": "1,3", "url": "https://jx.xmflv.com/?url="},
  132. {"name": "全民", "type": "1,3", "url": "https://43.240.74.102:4433?url="},
  133.  
  134. {"name": "爱豆", "type": "1,3", "url": "https://jx.aidouer.net/?url="},
  135. {"name": "夜幕", "type": "1,3", "url": "https://www.yemu.xyz/?url="},
  136. {"name": "m1907", "type": "1,2", "url": "https://im1907.top/?jx="},
  137.  
  138. {"name": "M3U8TV", "type": "1,3", "url": "https://jx.m3u8.tv/jiexi/?url="},
  139. {"name": "冰豆", "type": "1,3", "url": "https://bd.jx.cn/?url="},
  140. {"name": "playm3u8", "type": "1,3", "url": "https://www.playm3u8.cn/jiexi.php?url="},
  141. ],
  142. playerContainers: [
  143. {
  144. host: "v.qq.com",
  145. container: "#mod_player,#player-container,.container-player",
  146. name: "Default",
  147. displayNodes: ["#mask_layer", ".mod_vip_popup", "#mask_layer", ".panel-tip-pay"]
  148. },
  149. {
  150. host: "m.v.qq.com",
  151. container: ".mod_player,#player",
  152. name: "Default",
  153. displayNodes: [".mod_vip_popup", "[class^=app_],[class^=app-],[class*=_app_],[class*=-app-],[class$=_app],[class$=-app]", "div[dt-eid=open_app_bottom]", "div.video_function.video_function_new", "a[open-app]", "section.mod_source", "section.mod_box.mod_sideslip_h.mod_multi_figures_h,section.mod_sideslip_privileges,section.mod_game_rec", ".at-app-banner"]
  154. },
  155.  
  156. {host: "w.mgtv.com", container: "#mgtv-player-wrap", name: "Default", displayNodes: []},
  157. {host: "www.mgtv.com", container: "#mgtv-player-wrap", name: "Default", displayNodes: []},
  158. {
  159. host: "m.mgtv.com",
  160. container: ".video-area",
  161. name: "Default",
  162. displayNodes: ["div[class^=mg-app]", ".video-area-bar", ".open-app-popup"]
  163. },
  164. {host: "www.bilibili.com", container: "#player_module,#bilibiliPlayer,#bilibili-player", name: "Default", displayNodes: []},
  165. {host: "m.bilibili.com", container: ".player-wrapper,.player-container,.mplayer", name: "Default", displayNodes: []},
  166. {host: "www.iqiyi.com", container: "#flashbox", name: "Default", displayNodes: ["#playerPopup", "div[class^=qy-header-login-pop]", "section[class^=modal-cover_]" ,".toast"]},
  167. {
  168. host: "m.iqiyi.com",
  169. container: ".m-video-player-wrap",
  170. name: "Default",
  171. displayNodes: ["div.m-iqyGuide-layer", "a[down-app-android-url]", "[name=m-extendBar]", "[class*=ChannelHomeBanner]", "section.m-hotWords-bottom"]
  172. },
  173. {host: "www.iq.com", container: ".intl-video-wrap", name: "Default", displayNodes: []},
  174. {host: "v.youku.com", container: "#player", name: "Default", displayNodes: ["#iframaWrapper", "#checkout_counter_mask", "#checkout_counter_popup"]},
  175. {
  176. host: "m.youku.com",
  177. container: "#player,.h5-detail-player",
  178. name: "Default",
  179. displayNodes: [".callEnd_box", ".h5-detail-guide", ".h5-detail-vip-guide"]
  180. },
  181. {host: "tv.sohu.com", container: "#player", name: "Default", displayNodes: []},
  182. {host: "film.sohu.com", container: "#playerWrap", name: "Default", displayNodes: []},
  183. {host: "www.le.com", container: "#le_playbox", name: "Default", displayNodes: []},
  184. {host: "video.tudou.com", container: ".td-playbox", name: "Default", displayNodes: []},
  185. {host: "v.pptv.com", container: "#pptv_playpage_box", name: "Default", displayNodes: []},
  186. {host: "vip.pptv.com", container: ".w-video", name: "Default", displayNodes: []},
  187. {host: "www.wasu.cn", container: "#flashContent", name: "Default", displayNodes: []},
  188. {host: "www.acfun.cn", container: "#player", name: "Default", displayNodes: []},
  189. {host: "vip.1905.com", container: "#player,#vodPlayer", name: "Default", displayNodes: []},
  190. {host: "www.1905.com", container: "#player,#vodPlayer", name: "Default", displayNodes: []},
  191. ]
  192. };
  193.  
  194. class BaseConsumer {
  195. constructor() {
  196. this.parse = () => {
  197. util.findTargetEle('body')
  198. .then((container) => this.preHandle(container))
  199. .then((container) => this.generateElement(container))
  200. .then((container) => this.bindEvent(container))
  201. .then((container) => this.autoPlay(container))
  202. .then((container) => this.postHandle(container));
  203. }
  204. }
  205.  
  206. preHandle(container) {
  207. _CONFIG_.currentPlayerNode.displayNodes.forEach((item, index) => {
  208. util.findTargetEle(item)
  209. .then((obj) => obj.style.display = 'none')
  210. .catch(e => console.warn("不存在元素", e));
  211. });
  212. return new Promise((resolve, reject) => resolve(container));
  213. }
  214.  
  215. generateElement(container) {
  216. GM_addStyle(`
  217. #${_CONFIG_.vipBoxId} {cursor:pointer; position:fixed; top:120px; left:0px; z-index:9999999; text-align:left;}
  218. #${_CONFIG_.vipBoxId} .img_box{width:32px; height:32px;line-height:32px;text-align:center;background-color:#1c84c6;margin:10px 0px;}
  219. #${_CONFIG_.vipBoxId} .vip_list {display:none; position:absolute; border-radius:5px; left:32px; top:0; text-align:center; background-color: #3f4149; border:1px solid white;padding:10px 0px; width:380px; max-height:400px; overflow-y:auto;}
  220. #${_CONFIG_.vipBoxId} .vip_list li{border-radius:2px; font-size:12px; color:#DCDCDC; text-align:center; width:calc(25% - 14px); line-height:21px; float:left; border:1px solid gray; padding:0 4px; margin:4px 2px;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;-o-text-overflow:ellipsis;}
  221. #${_CONFIG_.vipBoxId} .vip_list li:hover{color:#1c84c6; border:1px solid #1c84c6;}
  222. #${_CONFIG_.vipBoxId} .vip_list ul{padding-left: 10px;}
  223. #${_CONFIG_.vipBoxId} .vip_list::-webkit-scrollbar{width:5px; height:1px;}
  224. #${_CONFIG_.vipBoxId} .vip_list::-webkit-scrollbar-thumb{box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.2); background:#A8A8A8;}
  225. #${_CONFIG_.vipBoxId} .vip_list::-webkit-scrollbar-track{box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.2); background:#F1F1F1;}
  226. #${_CONFIG_.vipBoxId} li.selected{color:#1c84c6; border:1px solid #1c84c6;}
  227. `);
  228.  
  229. if (_CONFIG_.isMobile) {
  230. GM_addStyle(`
  231. #${_CONFIG_.vipBoxId} {top:300px;}
  232. #${_CONFIG_.vipBoxId} .vip_list {width:300px;}
  233. `);
  234. }
  235.  
  236. let type_1_str = "";
  237. let type_2_str = "";
  238. let type_3_str = "";
  239. _CONFIG_.videoParseList.forEach((item, index) => {
  240. if (item.type.includes("1")) {
  241. type_1_str += `<li class="nq-li" title="${item.name}1" data-index="${index}">${item.name}</li>`;
  242. }
  243. if (item.type.includes("2")) {
  244. type_2_str += `<li class="tc-li" title="${item.name}" data-index="${index}">${item.name}</li>`;
  245. }
  246. if (item.type.includes("3")) {
  247. type_3_str += `<li class="tc-li" title="${item.name}" data-index="${index}">${item.name}</li>`;
  248. }
  249. });
  250.  
  251. let autoPlay = !!GM_getValue(_CONFIG_.autoPlayerKey, null) ? "开" : "关";
  252.  
  253. $(container).append(`
  254. <div id="${_CONFIG_.vipBoxId}">
  255. <div class="vip_icon">
  256. <div class="img_box" title="选择解析源" style="color:white;font-size:16px;font-weight:bold;border-radius:5px;"><span style="color: red;">V</span>I<span style="color: yellow;">P</span></div>
  257. <div class="vip_list">
  258. <div>
  259. <h3 style="color:#1c84c6; font-weight: bold; font-size: 16px; padding:5px 0px;">[内嵌播放]</h3>
  260. <ul>
  261. ${type_1_str}
  262. <div style="clear:both;"></div>
  263. </ul>
  264. </div>
  265. <div>
  266. <h3 style="color:#1c84c6; font-weight: bold; font-size: 16px; padding:5px 0px;">[弹窗播放带选集]</h3>
  267. <ul>
  268. ${type_2_str}
  269. <div style="clear:both;"></div>
  270. </ul>
  271. </div>
  272. <div>
  273. <h3 style="color:#1c84c6; font-weight: bold; font-size: 16px; padding:5px 0px;">[弹窗播放不带选集]</h3>
  274. <ul>
  275. ${type_3_str}
  276. <div style="clear:both;"></div>
  277. </ul>
  278. </div>
  279. <div style="text-align:left;color:#FFF;font-size:10px;padding:0px 10px;margin-top:10px;">
  280. <b>自动解析功能说明:</b>
  281. <br>&nbsp;&nbsp;1、自动解析功能默认关闭(自动解析只支持内嵌播放源)
  282. <br>&nbsp;&nbsp;2、开启自动解析,网页打开后脚本将根据当前选中的解析源自动解析视频。如解析失败,请手动选择不同的解析源尝试
  283. <br>&nbsp;&nbsp;3、没有选中解析源将随机选取一个
  284. <br>&nbsp;&nbsp;4、如某些网站有会员可以关闭自动解析功能
  285. </div>
  286. </div>
  287. </div>
  288. <div class="img_box" id="vip_auto" style="color:white;font-size:16px;font-weight:bold;border-radius:5px;" title="是否打开自动解析。若自动解析失败,请手动选择其它接口尝试!!">${autoPlay}</div>
  289. </div>`);
  290. return new Promise((resolve, reject) => resolve(container));
  291. }
  292.  
  293. bindEvent(container) {
  294. const vipBox = $(`#${_CONFIG_.vipBoxId}`);
  295. if (_CONFIG_.isMobile) {
  296. vipBox.find(".vip_icon").on("click", () => vipBox.find(".vip_list").toggle());
  297. } else {
  298. vipBox.find(".vip_icon").on("mouseover", () => vipBox.find(".vip_list").show());
  299. vipBox.find(".vip_icon").on("mouseout", () => vipBox.find(".vip_list").hide());
  300. }
  301.  
  302. let _this = this;
  303. vipBox.find(".vip_list .nq-li").each((liIndex, item) => {
  304. item.addEventListener("click", () => {
  305. const index = parseInt($(item).attr("data-index"));
  306. GM_setValue(_CONFIG_.autoPlayerVal, index);
  307. GM_setValue(_CONFIG_.flag, "true");
  308. _this.showPlayerWindow(_CONFIG_.videoParseList[index]);
  309. vipBox.find(".vip_list li").removeClass("selected");
  310. $(item).addClass("selected");
  311. });
  312. });
  313. vipBox.find(".vip_list .tc-li").each((liIndex, item) => {
  314. item.addEventListener("click", () => {
  315. const index = parseInt($(item).attr("data-index"));
  316. const videoObj = _CONFIG_.videoParseList[index];
  317. let url = videoObj.url + window.location.href;
  318. GM_openInTab(url, {active: true, insert: true, setParent: true});
  319. });
  320. });
  321.  
  322. //右键移动位置
  323. vipBox.mousedown(function (e) {
  324. if (e.which !== 3) {
  325. return;
  326. }
  327. e.preventDefault()
  328. vipBox.css("cursor", "move");
  329. const positionDiv = $(this).offset();
  330. let distenceX = e.pageX - positionDiv.left;
  331. let distenceY = e.pageY - positionDiv.top;
  332.  
  333. $(document).mousemove(function (e) {
  334. let x = e.pageX - distenceX;
  335. let y = e.pageY - distenceY;
  336. const windowWidth = $(window).width();
  337. const windowHeight = $(window).height();
  338.  
  339. if (x < 0) {
  340. x = 0;
  341. } else if (x > windowWidth - vipBox.outerWidth(true) - 100) {
  342. x = windowWidth - vipBox.outerWidth(true) - 100;
  343. }
  344.  
  345. if (y < 0) {
  346. y = 0;
  347. } else if (y > windowHeight - vipBox.outerHeight(true)) {
  348. y = windowHeight - vipBox.outerHeight(true);
  349. }
  350. vipBox.css("left", x);
  351. vipBox.css("top", y);
  352. });
  353. $(document).mouseup(function () {
  354. $(document).off('mousemove');
  355. vipBox.css("cursor", "pointer");
  356. });
  357. $(document).contextmenu(function (e) {
  358. e.preventDefault();
  359. })
  360. });
  361. return new Promise((resolve, reject) => resolve(container));
  362. }
  363.  
  364. autoPlay(container) {
  365. const vipBox = $(`#${_CONFIG_.vipBoxId}`);
  366. vipBox.find("#vip_auto").on("click", function () {
  367. if (!!GM_getValue(_CONFIG_.autoPlayerKey, null)) {
  368. GM_setValue(_CONFIG_.autoPlayerKey, null);
  369. $(this).html("关");
  370. $(this).attr("title", "是否打开自动解析。若自动解析失败,请手动选择其它接口尝试!!");
  371. } else {
  372. GM_setValue(_CONFIG_.autoPlayerKey, "true");
  373. $(this).html("开");
  374. }
  375. setTimeout(function () {
  376. window.location.reload();
  377. }, 200);
  378. });
  379.  
  380. if (!!GM_getValue(_CONFIG_.autoPlayerKey, null)) {
  381. this.selectPlayer(container);
  382. }
  383. return new Promise((resolve, reject) => resolve(container));
  384. }
  385.  
  386. selectPlayer(container) {
  387. let index = GM_getValue(_CONFIG_.autoPlayerVal, 2);
  388. let autoObj = _CONFIG_.videoParseList[index];
  389. let _th = this;
  390. if (autoObj.type.includes("1")) {
  391. setTimeout(function () {
  392. _th.showPlayerWindow(autoObj);
  393. const vipBox = $(`#${_CONFIG_.vipBoxId}`);
  394. vipBox.find(`.vip_list [title="${autoObj.name}1"]`).addClass("selected");
  395. $(container).find("#vip_auto").attr("title", `自动解析源:${autoObj.name}`);
  396. }, 2500);
  397. }
  398. }
  399.  
  400. showPlayerWindow(videoObj) {
  401. util.findTargetEle(_CONFIG_.currentPlayerNode.container)
  402. .then((container) => {
  403. const type = videoObj.type;
  404. let url = videoObj.url + window.location.href;
  405. if (type.includes("1")) {
  406. util.reomveVideo();
  407. $(container).empty();
  408. $(container).empty();
  409. let iframeDivCss = "width:100%;height:100%;z-index:999999;";
  410. if (_CONFIG_.isMobile) {
  411. iframeDivCss = "width:100%;height:220px;z-index:999999;";
  412. }
  413. if (_CONFIG_.isMobile && window.location.href.indexOf("iqiyi.com") !== -1) {
  414. iframeDivCss = "width:100%;height:220px;z-index:999999;margin-top:-56.25%;";
  415. }
  416. $(container).append(`<div style="${iframeDivCss}"><iframe id="iframe-player-4a5b6c" src="${url}" style="border:none;" allowfullscreen="true" width="100%" height="100%"></iframe></div>`);
  417. }
  418. });
  419. }
  420.  
  421. postHandle(container) {
  422. if (!!GM_getValue(_CONFIG_.autoPlayerKey, null)) {
  423. util.urlChangeReload();
  424. } else {
  425. let oldHref = window.location.href;
  426. let interval = setInterval(() => {
  427. let newHref = window.location.href;
  428. if (oldHref !== newHref) {
  429. oldHref = newHref;
  430. if (!!GM_getValue(_CONFIG_.flag, null)) {
  431. clearInterval(interval);
  432. window.location.reload();
  433. }
  434. }
  435. }, 1000);
  436. }
  437. }
  438.  
  439. }
  440.  
  441. class DefaultConsumer extends BaseConsumer {
  442. }
  443.  
  444. return {
  445. start: () => {
  446. GM_setValue(_CONFIG_.flag, null);
  447. let mallCase = 'Default';
  448. let playerNode = _CONFIG_.playerContainers.filter(value => value.host === window.location.host);
  449. if (playerNode === null || playerNode.length <= 0) {
  450. console.warn(window.location.host + "该网站暂不支持,请联系作者,作者将会第一时间处理(注意:请记得提供有问题的网址)");
  451. return;
  452. }
  453. _CONFIG_.currentPlayerNode = playerNode[0];
  454. mallCase = _CONFIG_.currentPlayerNode.name;
  455. const targetConsumer = eval(`new ${mallCase}Consumer`);
  456. targetConsumer.parse();
  457. }
  458. }
  459.  
  460. })();
  461.  
  462. (function () {
  463. superVip.start();
  464. })();