Greasy Fork

Greasy Fork is available in English.

全网VIP视频免费破解去广告【专注一个脚本只做一件事件】

【视频自动解析,体会拥有VIP的感觉】功能有:1、解锁B站大会员番剧、B站视频解析下载;2、爱奇艺、腾讯、优酷、芒果等全网VIP视频免费破解去广告(免跳出观影特方便【PC端+移动端】);

当前为 2022-01-17 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name              全网VIP视频免费破解去广告【专注一个脚本只做一件事件】
// @namespace         http://tampermonkey.net/
// @version           1.0.1
// @description       【视频自动解析,体会拥有VIP的感觉】功能有:1、解锁B站大会员番剧、B站视频解析下载;2、爱奇艺、腾讯、优酷、芒果等全网VIP视频免费破解去广告(免跳出观影特方便【PC端+移动端】);
// @author            reid
// @include           *://*.youku.com/v_*
// @include           *://*.iqiyi.com/v_*
// @include           *://*.iqiyi.com/w_*
// @include           *://*.iqiyi.com/a_*
// @include           *://*.le.com/ptv/vplay/*
// @include           *://v.qq.com/x/cover/*
// @include           *://v.qq.com/x/page/*
// @include           *://v.qq.com/tv/*
// @include           *://*.tudou.com/listplay/*
// @include           *://*.tudou.com/albumplay/*
// @include           *://*.tudou.com/programs/view/*
// @include           *://*.mgtv.com/b/*
// @include           *://film.sohu.com/album/*
// @include           *://tv.sohu.com/v/*
// @include           *://*.bilibili.com/video/*
// @include           *://*.bilibili.com/bangumi/play/*
// @include           *://*.baofeng.com/play/*
// @include           *://vip.pptv.com/show/*
// @include           *://v.pptv.com/show/*
// @include           *://www.le.com/ptv/vplay/*
// @include           *://www.wasu.cn/Play/show/*
// @include           *://m.v.qq.com/x/cover/*
// @include           *://m.v.qq.com/x/page/*
// @include           *://m.v.qq.com/*
// @include           *://m.iqiyi.com/*
// @include           *://m.iqiyi.com/kszt/*
// @include           *://m.youku.com/alipay_video/*
// @include           *://m.mgtv.com/b/*
// @include           *://m.tv.sohu.com/v/*
// @include           *://m.film.sohu.com/album/*
// @include           *://m.le.com/ptv/vplay/*
// @include           *://m.pptv.com/show/*
// @include           *://m.acfun.cn/v/*
// @include           *://m.bilibili.com/video/*
// @include           *://m.bilibili.com/anime/*
// @include           *://m.bilibili.com/bangumi/play/*
// @require           https://cdn.bootcdn.net/ajax/libs/jquery/3.2.1/jquery.min.js
// @connect           api.bilibili.com
// @grant             unsafeWindow
// @grant             GM_addStyle
// @grant             GM_openInTab
// @grant             GM_getValue
// @grant             GM_setValue
// @grant             GM_xmlhttpRequest
// @license           GPL License
// @charset		      UTF-8
// ==/UserScript==

const util = (function () {

    function findTargetElement(targetContainer) {
        const body = window.document;
        let tabContainer;
        let tryTime = 0;
        const maxTryTime = 30;
        return new Promise((resolve, reject) => {
            let interval = setInterval(() => {
                tabContainer = body.querySelector(targetContainer);
                if (tabContainer) {
                    clearInterval(interval);
                    resolve(tabContainer);
                }
                if ((++tryTime) === maxTryTime) {
                    clearInterval(interval);
                    reject();
                }
            }, 1000);
        });
    }

    function syncRequest(option) {
        return new Promise((resolve, reject) => {
            option.onload = (res) => {
                resolve(res);
            };
            option.onerror = (err) => {
                reject(err);
            };
            GM_xmlhttpRequest(option);
        });
    }

    return {
        req: (option) => syncRequest(option),
        findTargetEle: (targetEle) => findTargetElement(targetEle)
    }
})();


const superVip = (function () {

    const _CONFIG_ = {
        vipBoxId: 'vip_jx_box' + Math.ceil(Math.random() * 100000000),
        autoPlayerKey: "auto_player_key" + window.location.host,
        autoPlayerVal: "auto_player_value_" + window.location.host,
        videoParseList: [
            {"name": "纯净/B站", "category": "1", "url": "https://z1.m1907.cn/?jx="},
            {"name": "高速接口", "category": "1", "url": "https://jsap.attakids.com/?url="},
            {"name": "综合/B站1", "category": "1", "url": "https://vip.parwix.com:4433/player/?url="},
            {"name": "OK解析", "category": "1", "url": "https://okjx.cc/?url="},
            {"name": "乐多资源", "category": "1", "url": "https://api.leduotv.com/wp-api/ifr.php?isDp=1&vid="},
            {"name": "诺诺", "category": "1", "url": "https://www.ckmov.com/?url="},
            {"name": "虾米", "category": "1", "url": "https://jx.xmflv.com/?url="},
            {"name": "全民", "category": "1", "url": "https://jx.quanmingjiexi.com/?url="},
            {"name": "七哥", "category": "1", "url": "https://jx.mmkv.cn/tv.php?url="},
            {"name": "冰豆", "category": "1", "url": "https://api.qianqi.net/vip/?url="},
            {"name": "迪奥", "category": "1", "url": "https://123.1dior.cn/?url="},
            {"name": "CK", "category": "1", "url": "https://www.ckplayer.vip/jiexi/?url="},
            {"name": "LE", "category": "1", "url": "https://lecurl.cn/?url="},
            {"name": "ckmov", "category": "1", "url": "https://www.ckmov.vip/api.php?url="},
            {"name": "ccyjjd", "category": "1", "url": "https://ckmov.ccyjjd.com/ckmov/?url="},
            {"name": "RDHK", "category": "1", "url": "https://jx.rdhk.net/?v="},
            {"name": "爱豆", "category": "1", "url": "https://jx.aidouer.net/?url="},
            {"name": "H8", "category": "1", "url": "https://www.h8jx.com/jiexi.php?url="},
            {"name": "BL", "category": "1", "url": "https://vip.bljiex.com/?v="},
            {"name": "解析la", "category": "1", "url": "https://api.jiexi.la/?url="},
            {"name": "MUTV", "category": "1", "url": "https://jiexi.janan.net/jiexi/?url="},
            {"name": "MAO", "category": "1", "url": "https://www.mtosz.com/m3u8.php?url="},
            {"name": "江湖", "category": "1", "url": "https://api.jhdyw.vip/?url="},
            {"name": "老板", "category": "1", "url": "https://vip.laobandq.com/jiexi.php?url="},
            {"name": "盘古", "category": "1", "url": "https://www.pangujiexi.cc/jiexi.php?url="},
            {"name": "盖世", "category": "1", "url": "https://www.gai4.com/?url="},
            {"name": "小蒋", "category": "1", "url": "https://www.kpezp.cn/jlexi.php?url="},
            {"name": "YiTV", "category": "1", "url": "https://jiexi.us/?url="},
            {"name": "星空", "category": "1", "url": "http://60jx.com/?url="},
            {"name": "0523", "category": "1", "url": "https://go.yh0523.cn/y.cy?url="},
            {"name": "17云", "category": "1", "url": "https://www.1717yun.com/jx/ty.php?url="},
            {"name": "4K", "category": "1", "url": "https://jx.4kdv.com/?url="},
            {"name": "云析", "category": "1", "url": "https://jx.yparse.com/index.php?url="},
            {"name": "52", "category": "1", "url": "https://vip.52jiexi.top/?url="},
            {"name": "8090", "category": "1", "url": "https://www.8090g.cn/?url="},
            {"name": "诺讯", "category": "1", "url": "https://www.nxflv.com/?url="},
            {"name": "PM", "category": "1", "url": "https://www.playm3u8.cn/jiexi.php?url="},
            {"name": "奇米", "category": "1", "url": "https://qimihe.com/?url="},
            {"name": "思云", "category": "1", "url": "https://jx.ap2p.cn/?url="},
            {"name": "听乐", "category": "1", "url": "https://jx.dj6u.com/?url="},
            {"name": "aijx", "category": "1", "url": "https://jiexi.t7g.cn/?url="},
            {"name": "夜幕", "category": "1", "url": "https://www.yemu.xyz/?url="},
            {"name": "黑米", "category": "1", "url": "https://www.myxin.top/jx/api/?url="},
            {"name": "豪华啦", "category": "1", "url": "https://api.lhh.la/vip/?url="},
            {"name": "凉城", "category": "1", "url": "https://jx.mw0.cc/?url="},
            {"name": "33t", "category": "1", "url": "https://www.33tn.cn/?url="},
            {"name": "180", "category": "1", "url": "https://jx.000180.top/jx/?url="},
            {"name": "无名", "category": "1", "url": "https://www.administratorw.com/video.php?url="},
            {"name": "黑云", "category": "1", "url": "https://jiexi.380k.com/?url="},
            {"name": "九八", "category": "1", "url": "https://jx.youyitv.com/?url="},
            {"name": "综合线路解析", "category": "2", "url": "https://www.showxi.xyz/mov/s/?sv=3&url="},
            {"name": "纯净/B站", "category": "2", "url": "https://z1.m1907.cn/?jx="},
            {"name": "高速接口", "category": "2", "url": "https://jsap.attakids.com/?url="},
            {"name": "综合/B站1", "category": "2", "url": "https://vip.parwix.com:4433/player/?url="},
            {"name": "OK解析", "category": "2", "url": "https://okjx.cc/?url="},
            {"name": "乐多资源", "category": "2", "url": "https://api.leduotv.com/wp-api/ifr.php?isDp=1&vid="},
            {"name": "诺诺", "category": "2", "url": "https://www.ckmov.com/?url="},
            {"name": "虾米", "category": "2", "url": "https://jx.xmflv.com/?url="},
            {"name": "全民", "category": "2", "url": "https://jx.quanmingjiexi.com/?url="}
        ],
        playerNodes: [
            {url: "v.qq.com", node: "#mod_player", name: "QQ"},
            {url: "www.bilibili.com", node: "#player_module", name: "BB"},
            {url: "www.iqiyi.com", node: "#flashbox", name: "Default"},
            {url: "v.youku.com", node: "#player", name: "Default"},
            {url: "w.mgtv.com", node: "#mgtv-player-wrap", name: "MGTV"},
            {url: "www.mgtv.com", node: "#mgtv-player-wrap", name: "MGTV"},
            {url: "tv.sohu.com", node: "#player", name: "Default"},
            {url: "film.sohu.com", node: "#playerWrap", name: "Default"},
            {url: "www.le.com", node: "#le_playbox", name: "Default"},
            {url: "video.tudou.com", node: ".td-playbox", name: "Default"},
            {url: "v.pptv.com", node: "#pptv_playpage_box", name: "Default"},
            {url: "vip.pptv.com", node: ".w-video", name: "Default"},
            {url: "www.wasu.cn", node: "#flashContent", name: "Default"},
            {url: "www.acfun.cn", node: "#player", name: "Default"}
        ]
    };

    class BaseConsumer {
        constructor() {
            this.parse = () => {
                util.findTargetEle('body')
                    .then((container) => this.preHandle(container))
                    .then((container) => this.generateElement(container))
                    .then((container) => this.bindEvent(container))
                    .then((container) => this.autoPlay(container))
                    .then((container) => this.postHandle(container));
            }
        }

        /**
         * 前置处理
         */
        preHandle(container) {
            return new Promise((resolve, reject) => resolve(container));
        }

        generateElement(container) {
            GM_addStyle(`
                        #${_CONFIG_.vipBoxId} {cursor:pointer; position:fixed; top:120px; left:0px; z-index:9999999; text-align:left;}
                        #${_CONFIG_.vipBoxId} .img_box{width:32px; height:32px;line-height:32px;text-align:center;background-color:#1c84c6;margin:5px 0px;}
                        #${_CONFIG_.vipBoxId} .vip_list {display:none; position:absolute; border-radius:5px; left:32px; top:0; text-align:center; background-color: #3f4149; border:1px solid white;padding:10px 0px; width:380px; max-height:400px; overflow-y:auto;}
                        #${_CONFIG_.vipBoxId} .vip_list li{border-radius:2px; font-size:12px; color:#DCDCDC; text-align:center; width:calc(25% - 14px); line-height:21px; float:left; border:1px solid gray; padding:0 4px; margin:4px 2px;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;-o-text-overflow:ellipsis;}
                        #${_CONFIG_.vipBoxId} .vip_list li:hover{color:#1c84c6; border:1px solid #1c84c6;}
                        #${_CONFIG_.vipBoxId} .vip_list ul{padding-left: 10px;}
                        #${_CONFIG_.vipBoxId} .vip_list::-webkit-scrollbar{width:5px; height:1px;}
                        #${_CONFIG_.vipBoxId} .vip_list::-webkit-scrollbar-thumb{box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.2); background:#A8A8A8;}
                        #${_CONFIG_.vipBoxId} .vip_list::-webkit-scrollbar-track{box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.2); background:#F1F1F1;}
                        #${_CONFIG_.vipBoxId} li.selected{color:#1c84c6; border:1px solid #1c84c6;}
						`);

            let category_1_html = "";
            let category_2_html = "";
            _CONFIG_.videoParseList.forEach((item, index) => {
                if (item.category === "1") {
                    category_1_html += `<li title="${item.name}" data-index="${index}">${item.name}</li>`;
                }
                if (item.category === "2") {
                    category_2_html += `<li title="${item.name}" data-index="${index}">${item.name}</li>`;
                }
            });

            let autoPlay = !!GM_getValue(_CONFIG_.autoPlayerKey, null) ? "开" : "关";

            $(container).append(`
                <div id="${_CONFIG_.vipBoxId}">
                    <div class="vip_icon">
                        <div class="img_box" title="选择解析源" style="color:white;font-size:16px;font-weight:bold;border-radius:5px;"><span style="color: red;">V</span>I<span style="color: yellow;">P</span></div>
                        <div class="vip_list">
                            <div>
                                <h3 style="color:#1c84c6; font-weight: bold; font-size: 16px; padding:5px 0px;">视频解析源[内嵌播放]</h3>
                                <ul>
                                    ${category_1_html}
                                    <div style="clear:both;"></div>
                                </ul>
                            </div>
                            <div>
                                <h3 style="color:#1c84c6; font-weight: bold; font-size: 16px; padding:5px 0px;">视频解析源[弹窗播放]</h3>
                                <ul>
                                    ${category_2_html}
                                    <div style="clear:both;"></div>
                                </ul>
                            </div>
                            <div style="text-align:left;color:#FFF;font-size:10px;padding:0px 10px;margin-top:10px;">
                                <b>自动解析说明:</b>
                                <br>&nbsp;&nbsp;1、开启自动解析,网页打开后脚本将根据当前选中的解析源自动解析视频。如解析失败,请手动选择不同的解析源尝试。(PS:有些解析源并不会拥有所有视频解析资源,请多尝试其它解析源)
                                <br>&nbsp;&nbsp;2、<span style="color:red;">如果某些网站有会员可以关闭解析,关闭功能相互独立,互不影响</span>
                                <br>&nbsp;&nbsp;3、自动解析默认关闭
                                <br>&nbsp;&nbsp;4、没有选中解析源将随机选取一个
                            </div>
                        </div>
                    </div>
                    <div class="img_box" id="vip_auto" style="color:white;font-size:16px;font-weight:bold;border-radius:5px;" title="是否打开自动解析。若自动解析失败,请手动选择其它接口尝试!!">${autoPlay}</div>
                </div>`);
            return new Promise((resolve, reject) => resolve(container));
        }

        /**
         *  绑定事件
         */
        bindEvent(container) {
            const vipBox = $(`#${_CONFIG_.vipBoxId}`);
            vipBox.find(".vip_icon").on("mouseover", () => vipBox.find(".vip_list").show());
            vipBox.find(".vip_icon").on("mouseout", () => vipBox.find(".vip_list").hide());

            let _this = this;
            vipBox.find(".vip_list li").each((liIndex, item) => {
                item.addEventListener("click", () => {
                    const index = parseInt($(item).attr("data-index"));
                    GM_setValue(_CONFIG_.autoPlayerVal, index);
                    _this.showPlayerWindow(_CONFIG_.videoParseList[index]);
                    vipBox.find(".vip_list li").removeClass("selected");
                    $(item).addClass("selected");
                });
            });

            //右键移动位置
            vipBox.mousedown(function (e) {
                if (e.which !== 3) {
                    return;
                }
                e.preventDefault()
                vipBox.css("cursor", "move");
                const positionDiv = $(this).offset();
                let distenceX = e.pageX - positionDiv.left;
                let distenceY = e.pageY - positionDiv.top;

                $(document).mousemove(function (e) {
                    let x = e.pageX - distenceX;
                    let y = e.pageY - distenceY;
                    const windowWidth = $(window).width();
                    const windowHeight = $(window).height();

                    if (x < 0) {
                        x = 0;
                    } else if (x > windowWidth - vipBox.outerWidth(true) - 100) {
                        x = windowWidth - vipBox.outerWidth(true) - 100;
                    }

                    if (y < 0) {
                        y = 0;
                    } else if (y > windowHeight - vipBox.outerHeight(true)) {
                        y = windowHeight - vipBox.outerHeight(true);
                    }
                    vipBox.css("left", x);
                    vipBox.css("top", y);
                    GM_setValue("Position_" + window.location.host, {"left": x, "top": y});
                });
                $(document).mouseup(function () {
                    $(document).off('mousemove');
                    vipBox.css("cursor", "pointer");
                });
                $(document).contextmenu(function (e) {
                    e.preventDefault();
                })
            });
            return new Promise((resolve, reject) => resolve(container));
        }

        /**
         * 是否自动播放
         */
        autoPlay(container) {
            const vipBox = $(`#${_CONFIG_.vipBoxId}`);
            //点击切换是否自动解析
            vipBox.find("#vip_auto").on("click", function () {
                if (!!GM_getValue(_CONFIG_.autoPlayerKey, null)) {
                    GM_setValue(_CONFIG_.autoPlayerKey, null);
                    $(this).html("关");
                } else {
                    GM_setValue(_CONFIG_.autoPlayerKey, "true");
                    $(this).html("开");
                }
            });

            if (!!GM_getValue(_CONFIG_.autoPlayerKey, null)) {
                this.showPlayerWindow(_CONFIG_.videoParseList[GM_getValue(_CONFIG_.autoPlayerVal, 2)]);
            }
            return new Promise((resolve, reject) => resolve(container));
        }

        /**
         * 显示播放窗口
         */
        showPlayerWindow(videoObj) {
            let playerNode = _CONFIG_.playerNodes.filter(value => value.url === window.location.host);
            if (playerNode === null) {
                console.log("页面播放node查找失败....");
                return;
            }
            util.findTargetEle(playerNode[0].node)
                .then((container) => {
                    const category = videoObj.category;
                    let url = videoObj.url + window.location.href;
                    if (category === "1") {
                        $(container).empty();
                        $(container).append(`<div style='width:100%;height:100%;z-index:1000;'><iframe id='iframe-player-4a5b6c' src="${url}" frameborder="0" allowfullscreen="true" width="100%" height="100%"></iframe></div>`);
                    }
                    if (category === "2") {
                        GM_openInTab(url, {active: true, insert: true, setParent: true});
                    }
                });
        }

        /**
         * 后置处理
         */
        postHandle(container) {
        }

    }

    class DefaultConsumer extends BaseConsumer {
    }

    class QQConsumer extends BaseConsumer {

        preHandle(container) {
            //移除平台vip弹框提醒
            util.findTargetEle('#mask_layer')
                .then((obj) => obj.style.display = 'none')
                .catch(e => console.warn("不存在元素", e));
            util.findTargetEle('.mod_vip_popup')
                .then((obj) => obj.style.display = 'none')
                .catch(e => console.warn("不存在元素", e));
            return new Promise((resolve, reject) => resolve(container));
        }

        postHandle(container) {
            $(container).on("mouseover", ".item a", function (e) {
                let $playerItem = $(this), href = $playerItem.attr("href") || $playerItem.data("href");
                $playerItem.off("click.chrome");
                $playerItem.on("click.chrome", function () {
                    window.location.href = href
                }).attr("data-href", href).css({
                    cursor: 'pointer'
                }).removeAttr("href")
            });
        }
    }

    class BBConsumer extends BaseConsumer {

        postHandle(container) {
            $(container).on("mouseover", ".ep-item a", function (e) {
                let $playerItem = $(this), href = $playerItem.attr("href") || $playerItem.data("href");
                $playerItem.off("click.chrome");
                $playerItem.on("click.chrome", function () {
                    window.location.href = href
                }).attr("data-href", href).css({
                    cursor: 'pointer'
                }).removeAttr("href");
            })
        }
    }

    class MGTVConsumer extends BaseConsumer {

        postHandle(container) {
            $(container).on("click", ".episode-items a", function (e) {
                setTimeout(function (){
                    window.location.reload();
                },1000);
            })
        }
    }

    return {
        start: () => {
            let mallCase = 'Default';
            let playerNode = _CONFIG_.playerNodes.filter(value => value.url === window.location.host);
            if (playerNode === null) {
                console.log("页面播放node查找失败....");
                return;
            }
            mallCase = playerNode[0].name;
            const targetConsumer = eval(`new ${mallCase}Consumer`);
            targetConsumer.parse();
        }
    }

})();

(function () {
    superVip.start();
})();