// ==UserScript== // @name 🎬追剧系列--全网VIP视频破解(精简版) // @namespace http://tampermonkey.net/ // @version 1.2.1 // @description 全网VIP视频解析 - 目前支持腾讯、爱奇艺、优酷、芒果TV、B站 // @match https://www.iqiyi.com/* // @match https://v.qq.com/x/cover/* // @match https://www.mgtv.com/b/* // @match https://v.youku.com/v_show/* // @match https://youku.com/v_show/* // @match https://www.bilibili.com/* // @license MIT // @grant none // @downloadURL none // ==/UserScript== (function () { "use strict"; // 引入 SweetAlert2 并确保样式加载正确 const loadSweetAlert = () => { const swalCss = document.createElement("link"); swalCss.rel = "stylesheet"; swalCss.href = ""; document.head.appendChild(swalCss); const swalScript = document.createElement("script"); swalScript.src = "https://cdn.jsdelivr.net/npm/sweetalert2@11"; document.head.appendChild(swalScript); return new Promise((resolve) => { swalScript.onload = resolve; }); }; // 添加自定义样式,防止与其他组件冲突 const addGlobalStyle = () => { const style = document.createElement("style"); style.textContent = ` /* 通用样式 */ ::-webkit-scrollbar { width: 10px !important; } ::-webkit-scrollbar-thumb { background: #8e8e8e !important; border-radius: 10px !important; } ::-webkit-scrollbar-thumb:hover { background: #555555 !important; } .no-select { user-select: none; } .button-container { position: fixed; top: 50%; left: 60px; transform: translate(0, -50%); z-index: 99999999; display: none; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); grid-gap: 10px; } .vip-button { background: #b8860b; border: 0; padding: 0 25px; height: 30px; color: #000; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: bold; margin: 5px 0; transition: transform 0.3s, background-color 0.3s; } .vip-button:hover { background: #daa520; transform: scale(1.1); } /* 确保 SweetAlert2 弹窗样式不受其他全局样式影响 */ .swal2-container { z-index: 100000000 !important; } `; document.head.appendChild(style); }; // 创建解析按钮 const createParseButton = () => { const parseButton = document.createElement("div"); parseButton.className = "no-select"; parseButton.style.cssText = ` width: 50px; height: 50px; border-radius: 50%; background-color: #b8860b; position: fixed; left: 0; top: 50%; cursor: pointer; z-index: 99999999; transform: translate(0, -50%); display: flex; flex-direction: column; align-items: center; justify-content: center; color: black; font-size: 13px; font-weight: bold; box-shadow: rgb(0 0 0 / 30%) 0px 2px 5px; `; parseButton.textContent = "VIP"; parseButton.title = "公众号:软件小邓"; return parseButton; }; // 创建解析接口按钮容器 const createButtonContainer = (apiList) => { const container = document.createElement("div"); container.className = "button-container"; apiList.forEach(api => { const button = document.createElement("button"); button.className = "vip-button"; button.textContent = api.name; button.addEventListener("click", (event) => { event.stopPropagation(); // 防止点击按钮时关闭接口容器 window.open(`${api.url}${window.location.href}`, "_blank"); }); container.appendChild(button); }); return container; }; // 显示用户协议弹窗,并添加二维码 const showTermsPopup = async () => { const result = await Swal.fire({ title: "用户协议", html: `