// ==UserScript==
// @name 🎬【VIP追剧神器】【free】支持多平台
// @namespace http://tampermonkey.net/
// @version 1.1.1
// @description ▶在线VIP视频解析工具【free】支持多平台【爱奇艺】【腾讯视频】【优酷土豆】【芒果TV】【乐视视频】【哔哩哔哩】【搜狐视频】等常见视频平台。制作不易,熬穿了不知道多少个夜晚,您的赞赏会是刺破黑暗苍穹的亮光照亮我前行的路❗❗❗有问题可加微信咨询:Why15236444193 学长也还有学业在身,如果加微信未能及时回复,请多多包涵哈!
// @author 伏黑甚而
// @license GPL-3.0
// @match *://*/*
// @grant GM_registerMenuCommand
// @grant GM_addStyle
// @grant GM_notification
// @require https://cdn.jsdelivr.net/npm/sweetalert2@11
// @run-at document-start
// @downloadURL https://update.greasyfork.icu/scripts/531324/%F0%9F%8E%AC%E3%80%90VIP%E8%BF%BD%E5%89%A7%E7%A5%9E%E5%99%A8%E3%80%91%E3%80%90free%E3%80%91%E6%94%AF%E6%8C%81%E5%A4%9A%E5%B9%B3%E5%8F%B0.user.js
// @updateURL https://update.greasyfork.icu/scripts/531324/%F0%9F%8E%AC%E3%80%90VIP%E8%BF%BD%E5%89%A7%E7%A5%9E%E5%99%A8%E3%80%91%E3%80%90free%E3%80%91%E6%94%AF%E6%8C%81%E5%A4%9A%E5%B9%B3%E5%8F%B0.meta.js
// ==/UserScript==
(function() {
'use strict';
// 创建弹窗函数
const createVipWindow = () => {
// 完整深色主题样式
const style = document.createElement('style');
style.textContent = `
#vip-container {
position: fixed;
width: 480px;
height: 380px;
background: #1e1e1e;
margin: 0;
border: 1px solid #3a3a3a;
border-radius: 12px;
box-shadow: 0 10px 30px rgba(0,0,0,0.5);
z-index: 9999;
font-family: "微软雅黑", sans-serif;
padding: 20px;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
user-select: none;
backdrop-filter: blur(8px);
overflow: hidden;
color: #e0e0e0;
}
.window-controls {
position: absolute;
top: 10px;
right: 10px;
display: flex;
gap: 8px;
}
.control-btn {
width: 18px;
height: 18px;
border-radius: 50%;
border: none;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
transition: all 0.2s ease;
box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.close-btn { background: #ff5f57; }
.min-btn { background: #ffbd2e; }
.max-btn { background: #28c940; }
.input-group {
margin: 15px 0;
display: flex;
align-items: center;
gap: 10px;
}
#video-url {
flex: 1;
padding: 10px;
background: #2c2c2c;
border: 1px solid #444;
border-radius: 6px;
color: #ffffff;
caret-color: #0078d4;
}
#parse-btn {
background: #0078d4;
color: white;
padding: 8px 20px;
border-radius: 6px;
border: none;
cursor: pointer;
}
.platform-buttons {
display: flex;
justify-content: center;
gap: 15px;
margin: 20px 0;
}
.platform-buttons button {
background: #2c2c2c;
border: 1px solid #444;
padding: 8px 15px;
border-radius: 6px;
color: #e0e0e0;
}
.donate-section {
text-align: center;
margin-top: 20px;
padding: 10px;
background: #2c2c2c;
border-radius: 8px;
}
.warning {
color: #ff7b72;
text-align: center;
font-size: 12px;
margin-top: 15px;
}
.collapsed {
height: 60px!important;
overflow: hidden;
opacity: 0.9;
width: 200px!important;
}
`;
document.head.appendChild(style);
// 创建弹窗容器(移除onclick属性)
const container = document.createElement('div');
container.id = 'vip-container';
container.innerHTML = `
如果有帮到你,可以赞赏支持一下吗?
注意:本工具仅用于学习研究,禁止用于商业用途
`;
document.body.appendChild(container);
// 初始居中定位
container.style.left = `${(window.innerWidth - container.offsetWidth) / 2}px`;
container.style.top = `${(window.innerHeight - container.offsetHeight) / 2}px`;
// 窗口控制变量
let isMaximized = false;
let originalSize = { width: '480px', height: '380px' };
// 拖拽功能(带边界限制)
let isDragging = false;
let startX, startY;
let initialX, initialY;
container.addEventListener('mousedown', (e) => {
if (!e.target.closest('button, input, img')) {
isDragging = true;
startX = e.clientX;
startY = e.clientY;
initialX = container.offsetLeft;
initialY = container.offsetTop;
container.style.transition = 'none';
if (!container.style.left && !container.style.top) {
container.style.left = `${(window.innerWidth - container.offsetWidth) / 2}px`;
container.style.top = `${(window.innerHeight - container.offsetHeight) / 2}px`;
}
}
});
document.addEventListener('mousemove', (e) => {
if (!isDragging) return;
const deltaX = e.clientX - startX;
const deltaY = e.clientY - startY;
let newX = initialX + deltaX;
let newY = initialY + deltaY;
const windowWidth = window.innerWidth;
const windowHeight = window.innerHeight;
const popupWidth = container.offsetWidth;
const popupHeight = container.offsetHeight;
newX = Math.max(0, Math.min(newX, windowWidth - popupWidth));
newY = Math.max(0, Math.min(newY, windowHeight - popupHeight));
container.style.left = `${newX}px`;
container.style.top = `${newY}px`;
});
document.addEventListener('mouseup', () => {
isDragging = false;
container.style.transition = 'all 0.3s cubic-bezier(0.4, 0, 0.2, 1)';
});
// 窗口控制按钮事件
container.querySelector('.min-btn').addEventListener('click', () => {
container.classList.toggle('collapsed');
});
container.querySelector('.max-btn').addEventListener('click', () => {
if (!isMaximized) {
originalSize = {
width: container.style.width || '480px',
height: container.style.height || '380px'
};
container.style.width = '95vw';
container.style.height = '95vh';
isMaximized = true;
} else {
container.style.width = originalSize.width;
container.style.height = originalSize.height;
isMaximized = false;
}
});
container.querySelector('.close-btn').addEventListener('click', () => {
container.remove();
});
// 平台跳转功能
document.querySelectorAll('.platform-buttons button').forEach(btn => {
btn.addEventListener('click', function() {
const platform = this.textContent.trim();
const urls = {
'爱奇艺': 'https://www.iqiyi.com',
'腾讯视频': 'https://v.qq.com',
'优酷': 'https://www.youku.com'
};
window.open(urls[platform], '_blank');
});
});
// 解析按钮事件(核心修复)
document.getElementById('parse-btn').addEventListener('click', function() {
const url = document.getElementById('video-url').value.trim();
if (!url) {
alert('请输入视频URL');
return;
}
const api = 'https://jx.xmflv.cc/?url=';
const fullUrl = api + encodeURIComponent(url);
try {
// 强制弹出窗口(核心修复)
const newWindow = window.open(fullUrl, '_blank');
if (!newWindow) {
// 处理拦截情况
alert('浏览器拦截了弹出窗口,请手动允许后重试');
window.location.href = fullUrl; // 直接跳转当前页面
}
} catch (error) {
alert('无法打开解析页,请检查网络或接口状态');
}
});
};
// 菜单注册模块
(function registerMenu() {
GM_registerMenuCommand('🎬 VIP解析窗口', function() {
if (!document.getElementById('vip-container')) {
createVipWindow();
} else {
const container = document.getElementById('vip-container');
container.style.zIndex = 10000;
container.classList.remove('collapsed');
container.style.left = `${(window.innerWidth - container.offsetWidth) / 2}px`;
container.style.top = `${(window.innerHeight - container.offsetHeight) / 2}px`;
}
}, 'v');
GM_registerMenuCommand('📊 脚本状态', function() {
alert('当前版本:1.1.16\n解析工具已启动,支持多平台VIP视频解析');
});
})();
})();