Greasy Fork

来自缓存

全网VIP视频解析(简单版)

全网VIP视频解析-腾讯视频、爱奇艺、优酷、芒果TV

目前为 2023-06-04 提交的版本。查看 最新版本

// ==UserScript==
// @name         全网VIP视频解析(简单版)
// @namespace    http://tampermonkey.net/
// @version      1.0.1
// @namespace    易柒黑科技
// @description  全网VIP视频解析-腾讯视频、爱奇艺、优酷、芒果TV
// @match        https://www.iqiyi.com/*
// @match        https://v.qq.com/*
// @match        https://www.youku.com/*
// @match        https://www.mgtv.com/*
// @match        https://v.youku.com/*
// @license      MIT
// @grant        none
// ==/UserScript==

(function () {
    'use strict';

    var style = document.createElement('style');
    style.textContent = `
        ::-webkit-scrollbar {
            width: 10px !important;
        }
 
        ::-webkit-scrollbar-thumb {
            background: #C1C1C1 !important;
            border-radius: 10px !important;
        }
 
        ::-webkit-scrollbar-thumb:hover {
            background: #9e9e9e !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: #ca985a;
            border: 0;
            padding: 0 25px;
            height: 30px;
            padding:0 10px;
            color: #fff;
            cursor:pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            font-weight: bold;
            margin: 5px 0;
        }
 
        .vip-button:hover {
            background: #f3c58c;
        }
    `;

    document.head.appendChild(style);

    var YQ_cube = document.createElement('div');
    YQ_cube.className = 'no-select';
    YQ_cube.style.cssText = `
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background-color: #ca985a;
        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: white;
        font-size: 13px;
        font-weight: bold;
        box-shadow: rgb(0 0 0 / 30%) 0px 2px 5px;
    `;

    YQ_cube.textContent = '易柒';
    YQ_cube.title = '公众号:易柒黑科技'

    document.body.appendChild(YQ_cube);

    // 引入接口
    var Apilist = [
        { "name": "综合/B站", "url": "https://jx.bozrc.com:4433/player/?url=", "showType": 3 },
        { "name": "夜幕", "url": "https://www.yemu.xyz/?url=", "showType": 3 },
        { "name": "爱豆", "url": "https://jx.aidouer.net/?url=", "showType": 1 },
        { "name": "虾米", "url": "https://jx.xmflv.com/?url=", "showType": 1 },
    ];

    var buttonContainer = document.createElement('div');
    buttonContainer.className = 'button-container';

    Apilist.forEach(function (api) {
        var button = document.createElement('button');
        button.className = 'vip-button';
        button.textContent = api.name;
        button.addEventListener('click', function () {
            // 处理按钮点击事件,跳转到解析页面
            window.open(api.url + window.location.href, '_blank');
        });
        buttonContainer.appendChild(button);
    });

    document.body.appendChild(buttonContainer);
    var flag = 1;
    YQ_cube.addEventListener('click', function () {
        if (flag === 1) {
            buttonContainer.style.display = 'block';
            YQ_cube.innerHTML = '隐藏'
            flag = 0
        } else {
            buttonContainer.style.display = 'none';
            YQ_cube.innerHTML = '易柒'
            flag = 1
        }
    })

})();