视频VIP助手 - VPlayer

视频VIP助手: 腾讯、爱奇艺、优酷、乐视、土豆、芒果TV; 解析更方便,播放更流畅,支持多端:手机端、电脑端

  1. // ==UserScript==
  2. // @name 视频VIP助手 - VPlayer
  3. // @namespace https://gf.qytechs.cn/zh-CN/scripts/521635-hua-vplayer
  4. // @version 0.0.22.8
  5. // @author Hua (VX: MoonlighTraveler)
  6. // @description 视频VIP助手: 腾讯、爱奇艺、优酷、乐视、土豆、芒果TV; 解析更方便,播放更流畅,支持多端:手机端、电脑端
  7. // @license MIT
  8. // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAAsTAAALEwEAmpwYAAADeElEQVR4nO2XzWuUVxSHj12I/QtK0kXJtFJUWjFtmMlXQyRGjV9JqsWUJm0UGaqJTRDFWtpYmpoxVBdD20AjiRgVbOlHRFEEP7BgUrvtoot2FdOtuHCpTzm5piBmGOI9ceaW+8CzmDOX3/ubw/u+JCKRSCQSiUQikblZ3sfi0m6OlnTxT2k3hGBJN9OlXWS0u/hS2kWm0D/IwwHvBZToNl1Y1X9LeXSBJ5ZVJPOSvdTM3gniy0t7QM03K7Z5rrPz5pUPQc03K7Z5rrPzZlka1HyzYpvnOjtvXt8FIeu9gPKdELLeC0h+AKoEhlnvmg5QJTDMete/B6oEhlnvNe+CKoFh1rtpO6gSGGa9t7wDqgSGWe+tW0H1r8SilhZSal8fz8kCY9a7rRVU35ztLQzOZrW1crutmUpZQKx6S3szqAY59zTn/XaX197Mw/YtnO7YwIveJRewt+zYDKpVTvdNSA/Czlb3uXMz9zs3cXjbNp73LjvH9byD0htBtcrpueX86DLsPgjpTW6e3shUegMd+q7wLm3YW7qaQLXK+fTXx/34DPR0uu9mXM/k7iaSxdJbeteBapUzeGMOr8PnX8O+t92ZnrU86F3Hqb2reaHQvWV/I6hWOUNXc/vNRej/BA6sd2f3N3L3QCNrCtlbDjWAapVz+kp+R85BZo87f6iBvwvZW/pWg2qVM34pv+fOwvFd7vxn9U+3AKve0l8HqlXOtQu5vfIjjOyD/np3tv8t7n5RR0Mhe0umFlSrnN/Hn/T2L3D+CBxf685kankwUMupLz1egla95Vg1qFY5f/70uLeyMNzivlO/quLGsWpWFktvyVaCapUz/YPzrxEY3wHZKjfPVjKVTdGB0R9CVr1lKAmqVc7UWbjeC99Vu8/fJrk/lOTwaB1LvMvOcT3voBMVoPrmDL/JPc0Zq3d5wxU8PFHB2MnUwvwzZNVbTr4BqkHO4GzWaDm/jZaT8i73DHrLmVWg+ubosz1WTkq1es6fRW/5fiWoEhhmvX9+DVQJDLPeF1aAKoFh1vvyMlAlMMx6X30VVAkMs943l4IqgWHWe+JlCFnvBUwmIGTNFiB5ZsU2jwtIxDsAq0dgWoMmEtQU8paez3yyjNqZWRl3xJfJBAOFfpE9rRMJjngv4I/lLH60hJk7IQjLuKM/Xrt7LyASiUQikUhE/qf8C11P8gg1P6hwAAAAAElFTkSuQmCC
  9. // @match *://v.qq.com/*
  10. // @match *://m.v.qq.com/*
  11. // @match *://video.qq.com/*
  12. // @match *://*.iqiyi.com/*
  13. // @match *://*.youku.com/*
  14. // @match *://*.le.com/*
  15. // @match *://*.tudou.com/*
  16. // @match *://*.bilibili.com/*
  17. // @match *://*.mgtv.com/*
  18. // @require https://cdn.jsdelivr.net/npm/react@18.3.1/umd/react.production.min.js
  19. // @require https://cdn.jsdelivr.net/npm/react-dom@18.3.1/umd/react-dom.production.min.js
  20. // @grant none
  21. // ==/UserScript==
  22.  
  23. (function(e){const o=document.createElement("style");o.id="monkey-hua-vplayer-popup-style-css",o.textContent=e,document.head.appendChild(o)})(" .App{--block-c-value: 0 0 0;--block-color: rgba(0, 0, 0, .8);--white-color: rgba(255, 255, 255, 1);--green-color: rgba(67, 231, 0, 1);--yellow-color: rgba(215, 127, 47, 1);--blue-color: rgba(0, 154, 255, 1);--card-top: 27px;--card-left: 105px}.App *,.App *:before,.App *:after{box-sizing:border-box}.App p{margin:0;font-size:13px;color:#888}.App ul{list-style:none;padding:0;margin:0}.App button{border:none;border-radius:4px}.App .card{position:fixed;top:var(--card-top);left:var(--card-left);z-index:20241222}.App .card button{padding:5px 8px;font-size:16px;color:var(--white-color);background-color:var(--green-color);cursor:pointer}.App dialog{max-width:var(--dialog-width, 0px);width:var(--dialog-width, 0px);max-height:fit-content;height:fit-content;background-color:var(--white-color);padding:0;border:none;border-radius:8px;grid-template-columns:2fr;transition:all .3s ease-in-out;overflow:hidden}.App dialog .header{--font-size: 20px;--close-size: 28px;display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.App dialog .header h2{margin:0;padding:0;color:var(--block-color);font-size:var(--font-size);font-weight:400}.App dialog .header .close{color:var(--white-color);background-color:var(--green-color);width:var(--close-size);height:var(--close-size);font-size:20px;font-weight:700;border-radius:3px;cursor:pointer}.App dialog .body{overflow-y:auto}.App dialog .body ul{--cols: 5;--li-font-size: 14px;display:grid;grid-template-columns:repeat(var(--cols),1fr);gap:8px;overflow:auto}.App dialog .body ul li{display:grid;justify-content:center;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--white-color);background-color:var(--blue-color);border-radius:4px;font-size:var(--li-font-size);transition:all .3s ease-in-out;cursor:pointer}.App dialog .body ul li:hover{background-color:var(--green-color)}.App dialog .body ul li.active{background-color:var(--green-color)}.App dialog .footer{margin:16px 0}.App dialog[open]{--dialog-width: 580px;display:grid;padding:16px;border:2px solid var(--green-color);align-content:flex-start}.App dialog::backdrop{background-color:rgba(var(--block-c-value),.2);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-radius:4px}@media screen and (max-width: 768px){.App{--card-top: 12px;--card-left: calc(100vw - 90px) }.App dialog[open]{--dialog-width: 85vw}.App dialog .header{--font-size: 20px;--close-size: 32px}.App dialog .body ul{--cols: 5;--li-py: 4px;--li-font-size: 10px;gap:4px}}:root{font-family:Inter,Avenir,Helvetica,Arial,sans-serif;font-size:16px;line-height:24px;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%} ");
  24.  
  25. (function () {
  26. 'use strict';
  27.  
  28. (function(global, factory) {
  29. typeof exports === "object" && typeof module !== "undefined" ? factory(require("react"), require("react-dom")) : typeof define === "function" && define.amd ? define(["react", "react-dom"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.React, global.ReactDOM));
  30. })(undefined, function(require$$0, require$$0$1) {
  31. function getDefaultExportFromCjs(x) {
  32. return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
  33. }
  34. var jsxRuntime = { exports: {} };
  35. var reactJsxRuntime_production_min = {};
  36. /**
  37. * @license React
  38. * react-jsx-runtime.production.min.js
  39. *
  40. * Copyright (c) Facebook, Inc. and its affiliates.
  41. *
  42. * This source code is licensed under the MIT license found in the
  43. * LICENSE file in the root directory of this source tree.
  44. */
  45. var hasRequiredReactJsxRuntime_production_min;
  46. function requireReactJsxRuntime_production_min() {
  47. if (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min;
  48. hasRequiredReactJsxRuntime_production_min = 1;
  49. var f = require$$0, k = Symbol.for("react.element"), l = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: true, ref: true, __self: true, __source: true };
  50. function q(c, a, g) {
  51. var b, d = {}, e = null, h = null;
  52. undefined !== g && (e = "" + g);
  53. undefined !== a.key && (e = "" + a.key);
  54. undefined !== a.ref && (h = a.ref);
  55. for (b in a) m.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);
  56. if (c && c.defaultProps) for (b in a = c.defaultProps, a) undefined === d[b] && (d[b] = a[b]);
  57. return { $$typeof: k, type: c, key: e, ref: h, props: d, _owner: n.current };
  58. }
  59. reactJsxRuntime_production_min.Fragment = l;
  60. reactJsxRuntime_production_min.jsx = q;
  61. reactJsxRuntime_production_min.jsxs = q;
  62. return reactJsxRuntime_production_min;
  63. }
  64. var hasRequiredJsxRuntime;
  65. function requireJsxRuntime() {
  66. if (hasRequiredJsxRuntime) return jsxRuntime.exports;
  67. hasRequiredJsxRuntime = 1;
  68. {
  69. jsxRuntime.exports = requireReactJsxRuntime_production_min();
  70. }
  71. return jsxRuntime.exports;
  72. }
  73. var jsxRuntimeExports = requireJsxRuntime();
  74. var client = {};
  75. var hasRequiredClient;
  76. function requireClient() {
  77. if (hasRequiredClient) return client;
  78. hasRequiredClient = 1;
  79. var m = require$$0$1;
  80. {
  81. client.createRoot = m.createRoot;
  82. client.hydrateRoot = m.hydrateRoot;
  83. }
  84. return client;
  85. }
  86. var clientExports = requireClient();
  87. const ReactDOM = /* @__PURE__ */ getDefaultExportFromCjs(clientExports);
  88. const _ = {
  89. getUserAgent: () => window.navigator.userAgent,
  90. isMobile: () => /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(_.getUserAgent()),
  91. getPlatfrom: () => _.isMobile() ? "mobile" : "pc",
  92. getPlatfromEnterprise: () => {
  93. const arr = ["bilibili", "iqiyi", "le", "mgtv", "qq", "tudou", "youku"];
  94. return arr.find((item) => location.hostname.includes(item));
  95. },
  96. isBoolean: (e) => Object.prototype.toString.call(e) === "[object Boolean]",
  97. isDate: (e) => Object.prototype.toString.call(e) === "[object Date]",
  98. isNumber: (e) => Object.prototype.toString.call(e) === "[object Number]",
  99. isString: (e) => Object.prototype.toString.call(e) === "[object String]",
  100. isArray: (e) => Array.isArray(e),
  101. isObject: (e) => Object.prototype.toString.call(e) === "[object Object]",
  102. isEmpty: (e) => _.isObject(e) && Object.keys(e).length === 0,
  103. isFn: (e) => Object.prototype.toString.call(e) === "[object Function]",
  104. getLines: (data) => _.isMobile() ? data.filter((e) => e.mobile) : data,
  105. waitTime: (ms) => new Promise((resolve) => setTimeout(resolve, ms)),
  106. selector: function(selector, cb, duration = 1500) {
  107. const parseData = (app) => {
  108. let lists = cb(app);
  109. let data = lists.list.flat();
  110. data = data.filter((e) => e.cid && e.vid);
  111. data = data.filter((e) => !e.isTrailer && !e.isNoStoreWatchHistory);
  112. return data;
  113. };
  114. const handler = (resolve, reject) => {
  115. const el = document.querySelector(selector);
  116. if (el) {
  117. return resolve(parseData(el) || []);
  118. }
  119. const cb2 = (mutations, observer2) => {
  120. for (const mutation of mutations) {
  121. if (mutation.type === "childList") {
  122. const el2 = document.querySelector(selector);
  123. if (el2) {
  124. observer2.disconnect();
  125. resolve(parseData(el2) || []);
  126. break;
  127. }
  128. }
  129. }
  130. setTimeout(() => {
  131. observer2.disconnect();
  132. reject([]);
  133. }, 1e3);
  134. };
  135. const observer = new MutationObserver(cb2);
  136. observer.observe(el ?? document.body, { childList: true, subtree: true });
  137. };
  138. return new Promise((resolve, reject) => {
  139. setTimeout(() => handler(resolve, reject), duration);
  140. });
  141. }
  142. };
  143. function createStyle(id, css, el) {
  144. const style = document.createElement("style");
  145. style.id = id;
  146. style.innerHTML = css;
  147. el && el.appendChild(style);
  148. return style;
  149. }
  150. function createObserver(el, callback) {
  151. if (!el) return () => {
  152. };
  153. const observer = new MutationObserver((mutationsList, observer2) => {
  154. console.log("%c Line:345 🍇 mutationsList", "color:#2eafb0", mutationsList);
  155. for (const mutation of mutationsList) {
  156. if (mutation.type === "childList") {
  157. callback(window.__PINIA__);
  158. break;
  159. }
  160. }
  161. });
  162. observer.observe(el, { childList: true });
  163. return observer.disconnect;
  164. }
  165. function getQuery(name, url) {
  166. if (!url && (name == null ? undefined : name.includes("?"))) {
  167. url = name;
  168. name = undefined;
  169. }
  170. const handle = new URL(url || window.location.href);
  171. const s = new URLSearchParams(handle.search);
  172. const o = Object.fromEntries(s.entries());
  173. return !name ? o : o.hasOwnProperty(name) ? o[name] : undefined;
  174. }
  175. const otos = (object) => {
  176. const result = [];
  177. for (let k in object) {
  178. result.push(`${k}:${object[k]}`);
  179. }
  180. return result.join(";");
  181. };
  182. const toQuery = (obj) => {
  183. const params = [];
  184. for (const key in obj) {
  185. let k = encodeURIComponent(key);
  186. let v = obj[key];
  187. if (obj.hasOwnProperty(key) && v !== undefined) {
  188. if (typeof v === "object" && v !== null) {
  189. params.push(k + "=" + encodeURIComponent(JSON.stringify(v)));
  190. } else {
  191. params.push(k + "=" + encodeURIComponent(v));
  192. }
  193. }
  194. }
  195. return params.join("&");
  196. };
  197. const cookie = {
  198. write: function(t, e, day = 30) {
  199. var a = [], r = "/", o = location.hostname, i = location.protocol.startsWith("https");
  200. a.push(t + "=" + encodeURIComponent(e)), a.push("expires=" + new Date(Date.now() + day * 864e5).toUTCString()), a.push("path=" + r), a.push("domain=" + o), true === i && a.push("secure"), document.cookie = a.join("; ");
  201. },
  202. read: function(t, defaultValue) {
  203. var e = document.cookie.match(new RegExp("(^|;\\s*)(" + t + ")=([^;]*)"));
  204. if (e && e.length) {
  205. return decodeURIComponent(e[3]);
  206. }
  207. if (defaultValue) {
  208. this.write(t, defaultValue);
  209. return defaultValue;
  210. }
  211. return null;
  212. },
  213. remove: function(t) {
  214. this.write(t, "", Date.now() - 864e5);
  215. }
  216. };
  217. const lines = [
  218. { mobile: 0, name: "云解析", url: "//jx.yparse.com/index.php?url=" },
  219. { mobile: 0, name: "IK9", url: "//yparse.ik9.cc/index.php?url=" },
  220. { mobile: 0, name: "B站", url: "//jx.playerjy.com/?ads=0&url=" },
  221. { mobile: 0, name: "M1907", url: "//z1.m1907.top/?jx=" },
  222. { mobile: 1, name: "乐视云", url: `//ys.lbbb.cc/?url=` },
  223. { mobile: 1, name: "西瓜云", url: "//pl.a6club.com/player/analysis.php?v=" },
  224. { mobile: 1, name: "虾米", url: "//jx.xmflv.com/?url=" },
  225. { mobile: 1, name: "虾米CC", url: "//jx.xmflv.cc/?url=" },
  226. { mobile: 1, name: "77TV", url: "//jx.77flv.cc/?url=" },
  227. { mobile: 1, name: "妲觅TV", url: "//jx.dmflv.cc/?url=" },
  228. { mobile: 1, name: "咸鱼TV", url: "//jx.xymp4.cc/?url=" },
  229. { mobile: 1, name: "酷狗", url: "//bfq.cddys1.me/youhuanle1/?url=" },
  230. { mobile: 1, name: "七哥", url: "//jx.nnxv.cn/tv.php?url=" },
  231. { mobile: 1, name: "WK", url: "//a.wkvip.net/index.php?url=" },
  232. { mobile: 0, name: "CK播放器", url: "//www.ckplayer.vip/jiexi/?url=" },
  233. { mobile: 1, name: "znb", url: "//v.znb.me/?url=" },
  234. { mobile: 1, name: "2S0", url: "//jx.2s0.cn/player/?url=" },
  235. { mobile: 1, name: "08BK", url: "//2.08bk.com/?url=" },
  236. { mobile: 1, name: "电影先生", url: "//dyxs20.com/" },
  237. { mobile: 1, name: "FF", url: "//pl.aszzys.com/player/ec.php?code=ffm3u8&if=1&url=" },
  238. { mobile: 1, name: "HM", url: "//pl.aszzys.com/player/ec.php?code=heimuer&if=1&url=" },
  239. { mobile: 1, name: "LZ", url: "//pl.aszzys.com/player/ec.php?code=lzm3u8&if=1&url=" },
  240. { mobile: 1, name: "IK", url: "//pl.aszzys.com/player/ec.php?code=ikm3u8&if=1&url=" }
  241. ];
  242. function toast(message, duration = 3e3) {
  243. duration = isNaN(duration) ? 3e3 : duration;
  244. let t = document.createElement("div");
  245. const style = `padding:8px 16px;min-height:32px;line-height:36px;text-align:center;transform:translate(-50%);border-radius:4px;color:rgb(255, 255, 255);position:fixed;top:15%;left:50%;z-index:202412111018;background-image:linear-gradient(45deg, #F44336, #03A9F4);font-size:15px; font-weight: bold;`;
  246. t.style.cssText = style;
  247. t.innerHTML = message;
  248. document.body.appendChild(t);
  249. setTimeout(function() {
  250. var d = 0.5;
  251. t.style.transition = `transform ${d}s ease-in, opacity ${d}s ease-in`;
  252. t.style.opacity = "0";
  253. setTimeout(function() {
  254. document.body.removeChild(t);
  255. }, d * 1e3);
  256. }, duration);
  257. }
  258. function logger(message) {
  259. console.log(
  260. `%c VIP助手 %c ${message}`,
  261. "color: #fff; background: #4bc729; padding:4px 8px; border-top-left-radius:3px; border-bottom-left-radius:3px;",
  262. "color: #fff; background: #f56156; padding:4px 8px; border-top-right-radius:3px; border-bottom-right-radius:3px;"
  263. );
  264. }
  265. const qq = {
  266. mobile: {
  267. container: "#player",
  268. episode: ".pl-episode",
  269. observer: () => document.querySelector(".pl-episode__container"),
  270. getParseUrl(e) {
  271. const { protocol, href } = window.location;
  272. if (e) {
  273. return protocol + `//v.qq.com/x/cover/${e.cid}/${e.vid}.html`;
  274. }
  275. return href;
  276. },
  277. injectCss() {
  278. return `
  279. #app .interactive-long{ display: none!important; }
  280. #app img.gaussian-blur-lcp-img { display: none!important; }
  281. #app .player .player-tip{ display: none!important; }
  282. #app .video-desc-long__title{ white-space: normal; }
  283. #app .pl-episode .b-scroll__scroller .video-item-episode__poster { display: none!important; }
  284. `;
  285. },
  286. async getEpisodeData() {
  287. let typeName = false;
  288. const data = await _.selector("#app", (el) => {
  289. const pinia = el.__vue_app__.config.globalProperties.$pinia;
  290. const state = pinia.state._rawValue;
  291. typeName = state.global.videoInfo.type_name === "综艺";
  292. return state.playlist.playList;
  293. });
  294. const excepts = ["预告", "花絮", "采访", "彩蛋", "碎片"];
  295. let result = data.filter((e) => !excepts.some((t) => e.title.includes(t) || e.playTitle.includes(t)));
  296. return typeName ? data : result.map(({ pic, ...item }) => ({ ...item, pic: null }));
  297. },
  298. selectedDefault(id) {
  299. const vid = getQuery("vid");
  300. return id == Number(vid) ? "active" : "";
  301. },
  302. getEpisodeData2: function(pinia) {
  303. var _a, _b;
  304. const list = pinia == null ? undefined : pinia.playlist.playList.list;
  305. const triva = ((_b = (_a = pinia == null ? undefined : pinia.playlist.playList.varityTrivas) == null ? undefined : _a.none) == null ? undefined : _b.triva) || [];
  306. let data = list.concat(triva).flat();
  307. const excepts = ["预告", "花絮", "采访", "彩蛋"];
  308. data = data.filter((e) => e.cid && e.vid);
  309. data = data.filter((e) => !excepts.some((t) => e.title.includes(t) || e.playTitle.includes(t)));
  310. data = qq.filterData(data);
  311. const getVideType = (e) => {
  312. if (!e.uniImgTag && e.videoType === "花絮") return "花絮";
  313. if (e.uniImgTag.includes("预告")) return "预告";
  314. if (e.uniImgTag.includes("VIP")) return "VIP";
  315. return "";
  316. };
  317. if (pinia.global.videoInfo.type_name === "综艺") {
  318. return data.filter((e) => e.videoType !== "花絮").map((e) => {
  319. const { title, pic, cid, vid, playTitle, duration } = e;
  320. return {
  321. cid,
  322. vid,
  323. title,
  324. playTitle,
  325. videoType: getVideType(e),
  326. duration,
  327. pic
  328. };
  329. }).reverse();
  330. }
  331. return data.map((e) => {
  332. const { title, cid, vid, playTitle } = e;
  333. return {
  334. cid,
  335. vid,
  336. title,
  337. playTitle,
  338. videoType: getVideType(e)
  339. };
  340. });
  341. },
  342. downapp() {
  343. return new Promise((resolve) => {
  344. const btn = document.querySelector("button.btn_download");
  345. resolve(btn ? btn : null);
  346. });
  347. }
  348. },
  349. pc: {
  350. container: "#player",
  351. episode: ".page-content__bottom",
  352. observer: () => document.querySelector(".playlist-rect"),
  353. getParseUrl(e) {
  354. if (e) return location.origin + `/x/cover/${e.cid}/${e.vid}.html`;
  355. return location.href;
  356. },
  357. injectCss() {
  358. return `
  359. .play-layout .playlist-intro__actions{ display: none!important; }
  360. .play-layout .playlist-vip-section__vip { display: none!important; }
  361. .play-layout .panel-tip-pay.panel-tip-pay-video { display: none!important; }
  362. `;
  363. },
  364. async getEpisodeData() {
  365. const data = await _.selector("#app", (el) => {
  366. const pinia = el.__vue__.$pinia;
  367. const state = pinia.state.value;
  368. return state.episodeMain.listData[0];
  369. });
  370. return data.map(({ pic, ...item }) => ({ ...item, pic: null }));
  371. },
  372. selectedDefault(id) {
  373. return location.href.includes("" + id) ? "active" : "";
  374. },
  375. getEpisodeData2(pinia) {
  376. var _a;
  377. const list = (_a = pinia.episodeMain) == null ? undefined : _a.listData[0].list.flat();
  378. if (list.length === 0) return;
  379. const data = list.filter((e) => (e == null ? undefined : e.cid) && (e == null ? undefined : e.vid)).filter((e) => {
  380. var _a2;
  381. return !((_a2 = e == null ? undefined : e.imgTagV2) == null ? undefined : _a2.includes("预告"));
  382. }).filter((e) => e.isNoStoreWatchHistory === false).map(({ title, pic, cid, vid, playTitle }) => {
  383. return { cid, vid, title, playTitle, videoType: "" };
  384. });
  385. return data;
  386. }
  387. },
  388. getEpisodeStyle() {
  389. return `
  390. .pl-episode-list {overflow: hidden; margin-right: -16px;}
  391. .pl-episode-list ul { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 8px; margin-right: 16px; margin-bottom: 10px; overflow-x: scroll; padding-bottom: 10px; }
  392. .pl-episode-list li { position: relative; width: 51px; height: 51px; color: rgba(0,0,0,1); background-color: rgba(200,230,201, 0.5); text-align: center; font-size: 16px; font-weight: 600; border-radius: 4px; flex-shrink: 0; display: grid; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s ease-in-out; }
  393. .pl-episode-list li .vip { position: absolute; top: 0; right: 0; background-color: #ffdf89; color: #663d00; font-size: 10px; font-weight: 600; padding: 0 4px; border-bottom-left-radius: 4px; box-shadow: -2px 2px 5px 0px #d2a52e; }
  394. .pl-episode-list[pc] h2 { font-weight: 500; font-size: 20px; line-height: 28px; padding: 16px 0 10px 0; color: #78E445; text-emphasis: circle open; }
  395. .pl-episode-list[pc] li:hover,
  396. .pl-episode-list li.active { background-color: rgba(80, 220, 20, .8); }
  397. `;
  398. },
  399. injectCss() {
  400. const id = "vplayer-inject-style-css";
  401. createStyle(id, platfrom.injectCss(), document.head);
  402. createStyle(id, this.getEpisodeStyle(), document.head);
  403. },
  404. ulScorllHandler(r, e) {
  405. const { scrollLeft } = e;
  406. const scroller = document.querySelector(".b-scroll__scroller");
  407. scroller && (scroller.scrollLeft = scrollLeft);
  408. },
  409. ulHandler(target) {
  410. if (target.tagName !== "LI") return;
  411. const { url, cid, vid, title } = target.dataset;
  412. renderIframe(url);
  413. const href = _.isMobile() ? `/x/m/play?cid=${cid}&vid=${vid}` : `/x/cover/${cid}/${vid}.html`;
  414. history.pushState(null, "", href);
  415. const el = target.closest("ul");
  416. selectedLine(el, (e) => e === target, "active");
  417. let r, t;
  418. if (_.isMobile()) {
  419. r = document.querySelector(".video-desc-long__title");
  420. t = "" + title;
  421. } else {
  422. r = el.querySelector("h2");
  423. t = `VIP助手全集 - ${title}`;
  424. }
  425. r.textContent = t;
  426. },
  427. async init() {
  428. this.injectCss();
  429. await renderEpisode();
  430. const el = platfrom.observer();
  431. const handler = async () => await renderEpisode();
  432. createObserver(el, handler);
  433. const btn = await this.mobile.downapp();
  434. if (btn) {
  435. btn.textContent = "返回";
  436. btn.addEventListener("click", (e) => {
  437. e.preventDefault();
  438. e.stopPropagation();
  439. history.go(-1);
  440. });
  441. }
  442. }
  443. };
  444. const iqiyi = {
  445. mobile: {
  446. container: ".m-video-player",
  447. injectCss() {
  448. return `
  449. /* iqiyi */
  450. .m-video-player-wrap .m-video-player:before { padding-top: 0;}
  451. `;
  452. },
  453. getParseUrl() {
  454. return location.href;
  455. }
  456. },
  457. pc: {
  458. container: ".iqp-player-videolayer-inner",
  459. episode: ".iqp-player",
  460. getParseUrl() {
  461. return location.href;
  462. },
  463. injectCss() {
  464. return `
  465. /* iqiyi */
  466. .iqp-loading-layer,
  467. [class^="covers_cloudCover__"],
  468. #qy_pca_login_root,
  469. #full_mask_layer_id { display: none!important; }
  470. `;
  471. }
  472. },
  473. getEpisodeStyle() {
  474. return `
  475. /* iqiyi */
  476. .iqp-player { height: calc(100% - 60px); }
  477. .iqp-player .pl-episode-list { weight: 100%; height: 60px; }
  478.  
  479. .pl-episode-list {overflow: hidden;}
  480. .pl-episode-list ul { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 8px; margin-bottom: 10px; overflow-x: scroll; padding-bottom: 10px; }
  481. .pl-episode-list li { position: relative; width: 51px; height: 51px; color: rgba(0,0,0,1); background-color: rgba(0, 0, 0, 0.1); text-align: center; font-size: 16px; font-weight: 600; border-radius: 4px; flex-shrink: 0; display: grid; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s ease-in-out; }
  482. .pl-episode-list li .vip { position: absolute; top: 0; right: 0; background-color: #ffdf89; color: #663d00; font-size: 10px; font-weight: 600; padding: 0 4px; border-bottom-left-radius: 4px; box-shadow: -2px 2px 5px 0px #d2a52e; }
  483. .pl-episode-list[pc] h2 { font-weight: 500; font-size: 20px; line-height: 28px; padding: 16px 0 10px 0; color: #78E445; text-emphasis: circle open; }
  484. .pl-episode-list[pc] li { color: rgba(255,255,255,.6); background-color: rgba(255,255,255, 0.2);}
  485. .pl-episode-list li.active { background-color: rgba(0, 154, 255, 1); }
  486. `;
  487. },
  488. setWrapUrl() {
  489. const params = {
  490. ht: 2,
  491. ischarge: true,
  492. lt: 2,
  493. tvname: "冬至第14集",
  494. vid: "263ffc58c84f3a2f49933e50eba46d73",
  495. vtype: 0,
  496. f_block: "selector_bk",
  497. s2: "wna_tvg_1st",
  498. s3: "wna_tvg_select",
  499. s4: 14
  500. };
  501. const { origin, pathname } = location;
  502. const query = toQuery(params);
  503. return `${origin}${pathname}?${query}`;
  504. },
  505. init() {
  506. const id = "vplayer-inject-style-css";
  507. createStyle(id, platfrom.injectCss(), document.head);
  508. createStyle(id, this.getEpisodeStyle(), document.head);
  509. const container = document.querySelector(".episode-container");
  510. if (!container) return;
  511. container.addEventListener("click", function(e) {
  512. const target = e.target;
  513. if (target.tagName === "SPAN") {
  514. logger("🍇 iqiyi episode click");
  515. console.log("%c Line:171 🍋 target", "color:#465975", target);
  516. const parseUrl = location.href;
  517. renderIframe(parseUrl);
  518. }
  519. });
  520. }
  521. };
  522. const youku = {
  523. mobile: {
  524. container: "#player",
  525. episode: ".anthologyStageContainer",
  526. reactHandler: { onClick: () => {
  527. } },
  528. reactInstance: { key: "", index: 0 },
  529. injectCss() {
  530. return `
  531. .callEnd_box,
  532. .h5-detail-info .brief-btm,
  533. .h5-detail-guide,
  534. .h5-detail-vip-guide { display: none!important; }
  535. #app .h5-detail-info .brief-title .module-name h1{ color: #fff; overflow-x: visible; }
  536. #app .anthologyStageContainer{ margin-bottom: 24px;}
  537. #app .anthologyContainer .anthologyStageStyle0 { width: 60px; height: 60px; margin: 10px 4px; }
  538. `;
  539. },
  540. setActive(target) {
  541. var _a, _b, _c;
  542. const actName = "stageActive";
  543. const prev = (_a = target.parentElement) == null ? undefined : _a.querySelector(`.${actName}`);
  544. if (prev) {
  545. prev.classList.remove(actName);
  546. let index = prev.dataset.index, sibling = prev.previousElementSibling;
  547. sibling && (index = sibling.dataset.index);
  548. const t = document.createTextNode(index);
  549. (_b = prev.firstChild) == null ? undefined : _b.remove();
  550. prev.insertBefore(t, prev.firstChild);
  551. }
  552. const img = document.createElement("img");
  553. img.src = "https://gw.alicdn.com/imgextra/i3/O1CN011A7lv81d4P0s7XneB_!!6000000003682-1-tps-72-72.gif";
  554. img.className = "icon-playing";
  555. img.alt = "正在播放";
  556. img.setAttribute("aria-hidden", "true");
  557. target.classList.add(actName);
  558. (_c = target.firstChild) == null ? undefined : _c.remove();
  559. target.insertBefore(img, target.firstChild);
  560. },
  561. getEpisodeData() {
  562. const fn = (e) => e.componentId === "h5-detail-anthology";
  563. const pinia = window.__INITIAL_DATA__.pinia;
  564. const dataNode = pinia.componentList.find(fn).dataNode;
  565. if (!dataNode.length) return;
  566. const data = dataNode == null ? undefined : dataNode.map((e, i) => ({
  567. title: "" + (i + 1),
  568. vid: e.data.action.value
  569. }));
  570. return data;
  571. },
  572. initReactNode(e) {
  573. for (let k in e) {
  574. if (k.startsWith("__reactInternalInstance")) {
  575. this.reactInstance = e[k];
  576. e[k].onClick = () => {
  577. };
  578. } else if (k.startsWith("__reactEventHandlers")) {
  579. this.reactHandler = e[k];
  580. }
  581. }
  582. },
  583. observer() {
  584. let self2 = this;
  585. let ul = document.querySelector(this.episode);
  586. Array.from(ul.children).forEach((e, i) => {
  587. e.setAttribute("data-index", (i + 1).toString());
  588. for (let k in e) {
  589. if (k.startsWith("__reactEventHandlers")) {
  590. e[k].onClick = () => {
  591. };
  592. }
  593. }
  594. });
  595. ul == null ? undefined : ul.addEventListener("click", function(e) {
  596. e.preventDefault();
  597. const target = e.target;
  598. if (target.classList.contains("anthologyStageStyle0")) {
  599. self2.setActive(target);
  600. self2.initReactNode(target);
  601. const data = self2.getEpisodeData();
  602. const index = Number(target.dataset.index) || 0;
  603. const { vid } = data[index];
  604. target.setAttribute("data-index", index.toString());
  605. const parseUrl = location.origin + `alipay_video/id_${vid}.html`;
  606. history.pushState(null, "", parseUrl.replace(location.origin, ""));
  607. renderIframe(parseUrl);
  608. }
  609. });
  610. }
  611. },
  612. pc: {
  613. container: "#ykPlayer",
  614. episode: ".new-box-anthology-items",
  615. injectCss() {
  616. return `
  617. /* youku */
  618. #checkout_counter_popup, #checkout_counter_mask,
  619. .youku-advertise-layer,
  620. .advertise-layer { display: none!important; }
  621. `;
  622. },
  623. observer() {
  624. const el = document.querySelector(this.episode);
  625. el.addEventListener("click", (e) => {
  626. e.preventDefault();
  627. let a = e.target;
  628. if (a.tagName === "SPAN") a = a.parentNode;
  629. if (a.tagName === "A") {
  630. renderIframe(a.href);
  631. }
  632. });
  633. }
  634. },
  635. init() {
  636. platfrom.injectCss && platfrom.injectCss();
  637. platfrom.observer();
  638. renderIframe(location.href);
  639. }
  640. };
  641. const mgtv = {
  642. mobile: {
  643. container: ".mg-video",
  644. episode: ".swiper-video-list",
  645. getParseUrl() {
  646. return location.href;
  647. },
  648. observer() {
  649. const el = document.querySelector(this.episode);
  650. const ul = el == null ? undefined : el.querySelector("ul");
  651. ul == null ? undefined : ul.addEventListener("click", function(e) {
  652. e.preventDefault();
  653. const target = e.target;
  654. if (target.tagName === "A") {
  655. selectedLine(ul, (e2) => e2 === target.parentNode, "current");
  656. let parseUrl = target.href;
  657. history.pushState(null, "", parseUrl.replace(location.origin, ""));
  658. renderIframe(parseUrl);
  659. }
  660. });
  661. },
  662. injectCss() {
  663. return `
  664. .mg-video {display: block!important;}
  665. .vip-no-try,
  666. .video-area-bar,
  667. .ad-banner,
  668. .video-about,
  669. .bottom-fixed-functional-bar,
  670. .open-app-popup { display: none!important; }
  671. `;
  672. }
  673. },
  674. pc: {
  675. container: ".mgtv-player-container",
  676. episode: ".episode",
  677. observer() {
  678. const ul = document.querySelector(this.episode);
  679. ul == null ? undefined : ul.addEventListener("click", function(e) {
  680. e.preventDefault();
  681. const target = e.target;
  682. if (target.tagName === "A") {
  683. selectedLine(ul, (e2) => e2 === target.parentNode, "focus");
  684. const parseUrl = target.href;
  685. logger("pc episode click: " + parseUrl);
  686. history.pushState(null, "", parseUrl.replace(location.origin, ""));
  687. renderIframe(parseUrl);
  688. }
  689. });
  690. },
  691. injectCss() {
  692. return `
  693. /* mgtv */
  694. mango-ad-layer,
  695. mango-ad-outter-layer,
  696. .as_stage-item{ display: none!important; }
  697. `;
  698. }
  699. },
  700. init() {
  701. platfrom.observer();
  702. platfrom.injectCss();
  703. }
  704. };
  705. const le = {
  706. mobile: {
  707. container: ".video-player"
  708. },
  709. pc: {
  710. container: "#video",
  711. getParseUrl() {
  712. return location.href;
  713. }
  714. },
  715. init() {
  716. platfrom.injectCss && platfrom.injectCss();
  717. }
  718. };
  719. const tudou = {
  720. mobile: {
  721. container: ""
  722. },
  723. pc: {
  724. container: ""
  725. },
  726. init() {
  727. toast("本站待开发中...");
  728. }
  729. };
  730. const bilibili = {
  731. mobile: {
  732. container: ""
  733. },
  734. pc: {
  735. container: ""
  736. },
  737. init() {
  738. platfrom.injectCss && platfrom.injectCss();
  739. toast("本站待开发中...");
  740. }
  741. };
  742. const sources = {
  743. qq,
  744. iqiyi,
  745. youku,
  746. mgtv,
  747. le,
  748. tudou,
  749. bilibili
  750. };
  751. let epk = _.getPlatfromEnterprise();
  752. let epp = sources[epk];
  753. let platfrom = epp[_.getPlatfrom()];
  754. let iframe = null;
  755. _.waitTime(800).then(async () => {
  756. logger("🔥 VIP助手启动");
  757. if (!epk) {
  758. toast("【VIP助手】暂不支持该平台");
  759. return;
  760. }
  761. console.log(epp, platfrom);
  762. await epp.init();
  763. });
  764. function selectedLine(node, filter, active) {
  765. var _a;
  766. (_a = node.querySelector(`.${active}`)) == null ? undefined : _a.classList.remove(active);
  767. Array.from(node.children).forEach((e) => {
  768. filter(e) && e.classList.add(active);
  769. });
  770. }
  771. function createIframe(url) {
  772. const iframe2 = document.createElement("iframe");
  773. iframe2.setAttribute("allowfullscreen", "true");
  774. iframe2.setAttribute("allowtransparency", "true");
  775. iframe2.setAttribute("allow", "encrypted-media; picture-in-picture");
  776. iframe2.src = url;
  777. const style = {
  778. position: "absolute",
  779. "z-index": Date.now().toString(),
  780. width: "100%",
  781. height: "100%",
  782. border: "none"
  783. };
  784. iframe2.setAttribute("style", otos(style));
  785. return iframe2;
  786. }
  787. function renderIframe(url, closed) {
  788. let lineUrl = cookie.read("__lineUrl", "https://jx.xmflv.com/?url=");
  789. const hybridUrl = `${lineUrl}${url}`;
  790. if (iframe) {
  791. iframe.src = hybridUrl;
  792. closed && closed();
  793. return;
  794. }
  795. iframe = createIframe(hybridUrl);
  796. const player = document.querySelector(platfrom.container);
  797. clearChildNodes(player);
  798. player.parentNode && clearChildNodes(player.parentNode, (e) => e !== player);
  799. if (platfrom.injectCss) {
  800. const style = document.createElement("style");
  801. style.innerHTML = platfrom.injectCss();
  802. player == null ? undefined : player.appendChild(style);
  803. }
  804. player == null ? undefined : player.appendChild(iframe);
  805. closed && closed();
  806. }
  807. function clearChildNodes(node, filter = () => true) {
  808. while (node.firstChild && filter(node.firstChild)) {
  809. node.removeChild(node.firstChild);
  810. }
  811. }
  812. function createItemNode(item) {
  813. const r = [];
  814. let u = platfrom.getParseUrl(item), t = item.playTitle ? `${item.playTitle}` : item.title, p = item.pic || "", st = item.videoSubtitle || item.playTitle || item.title, on = "";
  815. if (platfrom.selectedDefault) {
  816. on = platfrom.selectedDefault(item.vid);
  817. on && r.push(`class="${on}"`);
  818. }
  819. r.push(`data-url="${u}"`);
  820. r.push(`data-title="${t}"`);
  821. r.push(`title="${st}"`);
  822. r.push(`data-cid="${item.cid}"`);
  823. r.push(`data-vid="${item.vid}"`);
  824. p && r.push(
  825. `style="background-image:url(${p});background-size:cover;width:146px;height:84px;font-size:12px;color:#fff;"`
  826. );
  827. let v = item.videoType ? `<div class="vip">${item.videoType}</div>` : "";
  828. return `<li ${r.join(" ")}>${item.title}${v}</li>`;
  829. }
  830. async function createEpisodeNode() {
  831. const cls = "pl-episode-list";
  832. const clsNode = document.querySelector(`.${cls}`);
  833. if (clsNode) clsNode.remove();
  834. const el = document.createElement("div");
  835. el.setAttribute(_.getPlatfrom(), "");
  836. el.className = cls;
  837. if (_.getPlatfrom() === "pc") {
  838. const h2 = document.createElement("h2");
  839. h2.textContent = "VIP助手全集";
  840. el.appendChild(h2);
  841. }
  842. const ul = document.createElement("ul");
  843. const data = await platfrom.getEpisodeData();
  844. const items = data.reverse().map(createItemNode);
  845. ul.innerHTML = items.join("");
  846. el.appendChild(ul);
  847. ul.addEventListener("click", function({ target }) {
  848. epp.ulHandler && epp.ulHandler(target);
  849. });
  850. if (epp.ulScorllHandler) {
  851. ul.addEventListener("scroll", async function({ target }) {
  852. epp.ulScorllHandler(this, target);
  853. });
  854. }
  855. return el;
  856. }
  857. async function renderEpisode() {
  858. const node = document.querySelector(platfrom.episode);
  859. if (!node) return;
  860. const el = await createEpisodeNode();
  861. if (_.isMobile()) {
  862. node.parentNode.insertBefore(el, node);
  863. } else {
  864. node.insertBefore(el, node.firstChild);
  865. }
  866. }
  867. function App() {
  868. const dialog = require$$0.useRef(null);
  869. const [cols, setCols] = require$$0.useState(5);
  870. const onClose = () => {
  871. var _a;
  872. return (_a = dialog.current) == null ? undefined : _a.close();
  873. };
  874. function onShow() {
  875. var _a;
  876. (_a = dialog.current) == null ? undefined : _a.showModal();
  877. const episodeEl = document.querySelector(".pl-episode-list");
  878. !episodeEl && Promise.resolve().then(renderEpisode);
  879. const lineUrl = cookie.read("__lineUrl");
  880. if (lineUrl) {
  881. selectedLine(dialog.current, (e) => e.dataset.line === lineUrl, "active");
  882. }
  883. }
  884. function onPlayer(event) {
  885. const target = event.target;
  886. const lineUrl = target.dataset.line;
  887. if (lineUrl.includes("dyxs20.com")) {
  888. window.open(lineUrl);
  889. return;
  890. }
  891. cookie.write("__lineUrl", lineUrl);
  892. selectedLine(target.parentElement, (e) => e === target, "active");
  893. let parseUrl;
  894. try {
  895. parseUrl = lineUrl.includes("pl.aszzys.com") ? epp.pc.getParseUrl() : platfrom.getParseUrl();
  896. } catch (error) {
  897. parseUrl = location.href;
  898. }
  899. if (location.pathname === "/") {
  900. onClose();
  901. toast("请在详情页进行播放");
  902. return;
  903. }
  904. renderIframe(parseUrl, onClose);
  905. }
  906. const ulStyle = {
  907. "--cols": cols,
  908. height: `${_.getLines(lines).length / cols * 50}px`
  909. };
  910. return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "App", children: [
  911. /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "card", children: /* @__PURE__ */ jsxRuntimeExports.jsx("button", { className: "btn", onClick: onShow, children: "VIP助手" }) }),
  912. /* @__PURE__ */ jsxRuntimeExports.jsxs("dialog", { ref: dialog, children: [
  913. /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "header", children: [
  914. /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { children: "解析线路" }),
  915. /* @__PURE__ */ jsxRuntimeExports.jsx("button", { className: "close", onClick: () => onClose(), children: "×" })
  916. ] }),
  917. /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "body", children: /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { style: ulStyle, children: _.getLines(lines).map((line) => /* @__PURE__ */ jsxRuntimeExports.jsx("li", { "data-line": line.url, onClick: onPlayer, children: line.name }, line.name)) }) }),
  918. /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "footer", children: [
  919. /* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("b", { children: "注意:不要进行任何形式的支付,注意自身财产安全。" }) }),
  920. /* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: "助手内所有的广告均是解析官方自带,请直接忽略。" }),
  921. /* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: "部分线路可能存在卡顿,解析慢的问题,可以选择【电影先生】线路中观看,可以获得更好的体验。" }),
  922. /* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: "腾讯视频:VIP助手自带集数解析,集数倒序播放,同自带的集数联动。(如未出现请刷新页面)" })
  923. ] })
  924. ] })
  925. ] });
  926. }
  927. const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false, "VITE_HUA_VPLAYER_KEY": "monkey-hua-vplayer-popup", "VITE_START_TIME": "2024-12-21 19:16:37" };
  928. const { VITE_HUA_VPLAYER_KEY } = __vite_import_meta_env__;
  929. function getShadowRoot() {
  930. const shadowApp = (() => {
  931. const app = document.createElement("div");
  932. app.id = VITE_HUA_VPLAYER_KEY;
  933. app.attachShadow({ mode: "open" });
  934. document.body.parentElement.appendChild(app);
  935. return app;
  936. })();
  937. const shadowRoot = shadowApp.shadowRoot;
  938. const selector = `style[id=${VITE_HUA_VPLAYER_KEY}-style-css]`;
  939. const target = document.querySelector(selector);
  940. if (target) {
  941. const style = document.createElement("style");
  942. style.textContent = target.textContent;
  943. shadowRoot.appendChild(style);
  944. }
  945. return shadowRoot;
  946. }
  947. ReactDOM.createRoot(getShadowRoot()).render(/* @__PURE__ */ jsxRuntimeExports.jsx(App, {}));
  948. });
  949.  
  950. })();

QingJ © 2025

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