// ==UserScript== // @name 影瞳 · 全网VIP视频解析 // @namespace ying-tong // @version 6.1.4 // @description 最干净、最强大、最全面的全网VIP视频解析工具 · 纯外嵌解析 · 零变现 · 零追踪 · 零依赖 // @author YG // @match *://v.qq.com/* // @match *://m.v.qq.com/* // @match *://*.iqiyi.com/* // @match *://*.iq.com/* // @match *://*.youku.com/* // @match *://*.bilibili.com/* // @match *://*.mgtv.com/* // @match *://*.sohu.com/* // @match *://*.pptv.com/* // @match *://*.le.com/* // @match *://*.tudou.com/* // @match *://*.1905.com/* // @match *://*.acfun.cn/* // @match *://*.ixigua.com/* // @grant GM_setValue // @grant GM_getValue // @grant GM_registerMenuCommand // @license MIT // @icon data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20100%20100%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22g%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%221%22%20y2%3D%221%22%3E%3Cstop%20offset%3D%220%22%20stop-color%3D%22%236366f1%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%238b5cf6%22%2F%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2248%22%20fill%3D%22%236366f1%22%20opacity%3D%220.15%22%2F%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2244%22%20fill%3D%22url%28%23g%29%22%2F%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2232%22%20fill%3D%22%23ffffff%22%2F%3E%3Cpath%20d%3D%22M36%2032%2056%2050%2036%2068Z%22%20fill%3D%22%23c7bcf2%22%2F%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2244%22%20r%3D%228%22%20fill%3D%22%23e0e7ff%22%20opacity%3D%220.5%22%2F%3E%3C%2Fsvg%3E // ==/UserScript== (function () { 'use strict'; /* ================================================================ 影瞳 · 全网VIP视频解析 v6.1.3 (纯脚本版) 架构: 外嵌解析站 · 纯新窗口播放(绕开平台拦截) ================================================================ */ // ==================== 解析线路 ==================== // 每行一条:名称 | 解析站地址(后面会自动拼上当前视频页URL) const DEFAULT_LINES = [ { name: '纯净1', url: 'https://im1907.top/?jx=' }, { name: 'M3U8', url: 'https://jx.m3u8.tv/jiexi/?url=' }, { name: 'PM', url: 'https://www.playm3u8.cn/jiexi.php?url=' }, { name: 'CK', url: 'https://www.ckplayer.vip/jiexi/?url=' } ]; function getLines() { const custom = gmGet('yt_lines', ''); if (custom && custom.trim()) { const arr = []; custom.split('\n').forEach(raw => { const s = raw.trim(); if (!s) return; const m = s.match(/^(\S+)\s*[|,]?\s*(https?:\/\/.+)$/); if (m) arr.push({ name: m[1].slice(0, 8), url: m[2] }); }); if (arr.length) return arr; } return DEFAULT_LINES; } // ==================== 平台播放器容器 ==================== const PLATFORMS = [ { m: /m\.v\.qq\.com/, nodes: ['#player', '.mod_player', '#tv_player'] }, { m: /v\.qq\.com/, nodes: ['#mod_player', '#tv_player', '#flashbox', '.mod_player', '.qm-player-container', '#player', '.player-container'] }, { m: /\.iqiyi\.com/, nodes: ['.m-video-player-wrap', '#flashbox', '.player-container'] }, { m: /\.iq\.com/, nodes: ['.intl-video-wrap', '.player-container'] }, { m: /youku\.com/, nodes: ['#player', '.player-container'] }, { m: /bilibili\.com/, nodes: ['.player-container', '#bili-video-player'] }, { m: /mgtv\.com/, nodes: ['.video-area', '.player-container'] }, { m: /sohu\.com/, nodes: ['.x-cover-playbtn-wrap', '#playerWrap', '#player'] }, { m: /pptv\.com/, nodes: ['#pptv_playpage_box', '.player-container'] }, { m: /le\.com/, nodes: ['#le_playbox', '#j-player'] }, { m: /tudou\.com/, nodes: ['#player'] }, { m: /1905\.com/, nodes: ['#player', '#vodPlayer'] }, { m: /acfun\.cn/, nodes: ['.video-container', '.player-container'] }, { m: /ixigua\.com/, nodes: ['.video-player', '.player-container'] } ]; function findContainer() { const nodes = []; for (const p of PLATFORMS) { if (location.href.match(p.m)) { nodes.push(...p.nodes); break; } } nodes.push('#player', '.player-container', 'video'); // 通用兜底 for (const sel of nodes) { const el = document.querySelector(sel); if (el && el.getBoundingClientRect().width > 200) return el; } return null; } // ==================== 工具 ==================== function gmGet(k, d) { try { return GM_getValue(k, d); } catch (e) { return d; } } function gmSet(k, v) { try { GM_setValue(k, v); } catch (e) {} } function toast(msg, dur) { let t = document.getElementById('yt-toast'); if (!t) { t = document.createElement('div'); t.id = 'yt-toast'; t.style.cssText = 'position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);padding:14px 26px;background:rgba(0,0,0,.88);color:#fff;border-radius:8px;z-index:2147483647;font-size:15px;pointer-events:none;transition:opacity .25s;'; document.body.appendChild(t); } t.textContent = msg; t.style.opacity = '1'; clearTimeout(t._timer); t._timer = setTimeout(() => { t.style.opacity = '0'; }, dur || 2600); } // ==================== UI ==================== let icon, panel; function buildUI() { // 图标:纯 CSS 圆形 + "影" 字,绝无黑框 icon = document.createElement('div'); icon.id = 'yt-icon'; icon.textContent = '影'; Object.assign(icon.style, { position: 'fixed', right: '6px', top: '50%', zIndex: '2147483646', width: '46px', height: '46px', borderRadius: '50%', background: 'linear-gradient(135deg,#6366f1,#8b5cf6)', color: '#fff', fontSize: '22px', fontWeight: 'bold', display: 'flex', alignItems: 'center', justifyContent: 'center', cursor: 'pointer', boxShadow: '0 3px 12px rgba(99,102,241,.5)', userSelect: 'none' }); const savedTop = gmGet('yt_icon_top', null); if (savedTop !== null) icon.style.top = savedTop + 'px'; makeDraggable(icon); document.body.appendChild(icon); // 面板 panel = document.createElement('div'); panel.id = 'yt-panel'; panel.style.cssText = 'position:fixed;z-index:2147483647;width:300px;max-height:70vh;overflow-y:auto;background:#1a1d27;color:#e6e8ee;border:1px solid #2a2e3a;border-radius:12px;box-shadow:0 8px 30px rgba(0,0,0,.5);display:none;font-family:-apple-system,"Microsoft YaHei",sans-serif;'; document.body.appendChild(panel); icon.addEventListener('click', e => { e.stopPropagation(); if (panel.style.display === 'block') { panel.style.display = 'none'; return; } renderPanel(); panel.style.display = 'block'; const r = icon.getBoundingClientRect(); let left = r.left - 312; if (left < 8) left = 8; panel.style.left = left + 'px'; panel.style.top = Math.max(8, r.top - 40) + 'px'; }); document.addEventListener('click', e => { if (!e.target.closest('#yt-panel') && !e.target.closest('#yt-icon')) panel.style.display = 'none'; }); try { GM_registerMenuCommand('影瞳 · 自定义线路', openSettings); } catch (e) {} } function renderPanel() { const lines = getLines(); let h = ''; h += '
影瞳 · 选择解析线路 ' + lines.length + ' 条
'; h += '
'; lines.forEach((l, i) => { h += '
' + '
' + esc(l.name) + '
' + '
' + '' + '
'; }); h += '
'; h += '
' + '' + '' + '
'; panel.innerHTML = h; panel.querySelectorAll('button[data-i]').forEach(b => { b.addEventListener('click', () => { const l = lines[+b.dataset.i]; doParse(l); panel.style.display = 'none'; }); }); panel.querySelector('#yt-set').addEventListener('click', () => { panel.style.display = 'none'; openSettings(); }); panel.querySelector('#yt-close').addEventListener('click', () => { panel.style.display = 'none'; }); } function esc(s) { return String(s == null ? '' : s).replace(/[&<>"]/g, c => ({ '&': '&', '<': '<', '>': '>', '"': '"' }[c])); } function openSettings() { let box = document.getElementById('yt-setbox'); if (!box) { box = document.createElement('div'); box.id = 'yt-setbox'; box.style.cssText = 'position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:2147483647;width:420px;max-width:92vw;background:#1a1d27;color:#e6e8ee;border:1px solid #2a2e3a;border-radius:12px;box-shadow:0 8px 30px rgba(0,0,0,.5);padding:18px;font-family:-apple-system,"Microsoft YaHei",sans-serif;'; document.body.appendChild(box); } const cur = gmGet('yt_lines', ''); box.innerHTML = '
自定义解析线路
' + '
每行一条:名称 解析站地址
例:纯净1 https://im1907.top/?jx=
留空则恢复内置 4 条线路。
' + '' + '
' + '' + '' + '' + '
'; box.querySelector('#yt-lines-save').onclick = () => { gmSet('yt_lines', box.querySelector('#yt-lines-input').value.trim()); box.style.display = 'none'; toast('已保存'); }; box.querySelector('#yt-lines-reset').onclick = () => { gmSet('yt_lines', ''); box.querySelector('#yt-lines-input').value = ''; toast('已恢复默认线路'); }; box.querySelector('#yt-lines-close').onclick = () => { box.style.display = 'none'; }; } // ==================== 解析 ==================== function doParse(line) { const target = line.url + encodeURIComponent(location.href); window.open(target, '_blank'); toast('已在新窗口打开:' + line.name); } function makeDraggable(el) { let dragging = false, sx, sy, top; el.addEventListener('mousedown', e => { dragging = true; sx = e.clientX; sy = e.clientY; top = el.getBoundingClientRect().top; el.style.top = top + 'px'; el.style.transform = 'none'; e.preventDefault(); }); document.addEventListener('mousemove', e => { if (!dragging) return; el.style.top = Math.max(0, Math.min(window.innerHeight - 50, top + e.clientY - sy)) + 'px'; }); document.addEventListener('mouseup', () => { if (!dragging) return; dragging = false; gmSet('yt_icon_top', parseInt(el.style.top)); }); } function init() { buildUI(); } if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', init); else init(); })();