毒盘解析

百毒网盘在线解析

// ==UserScript==
// @name         毒盘解析
// @author       JIEMO
// @description   百毒网盘在线解析
// @version      1.2.7
// @namespace    https://greasyfork.org/users/158417
// @icon         https://favicon.yandex.net/favicon/v2/pandownload.com
// @match        *://pan.baidu.com/s/*
// @match        *://pan.baidu.com/share/*

// @match        *://dupan.jie02.top/*
// @match        *://phpwp.jie02.top/*
// @match        *://down.5nb.me/*
// @match        *://baidu.kinh.cc/*
// @match        *://baidu.wchulian.com.cn/*
// @match        *://imwcr.cn/api/bdwp/*
// @match        *://down.zerun.asia/*

// ==/UserScript==

(function() {
    'use strict';
   
     
     //添加按钮[yt]
     function addyt(){
        var div = document.createElement("div");
        div.innerHTML = "yt解析";
        var css = "position:fixed;top:130px;left:5px;z-index:999999999;width:100px;height:30px;line-height:30px;text-align:center;font-size:16px;font-family:Verdana, Arial, '楷体';font-weight:500;color:green;user-select:none;padding:0px;white-space:nowrap;border-radius:3px;border:2px solid red;cursor:pointer;";
        div.style.cssText = css;
        if(window.location.href.search("pan.baidu.com")!=-1){ document.body.appendChild(div);}

        //监听事件
        div.addEventListener("click",function(){
            let after_url = window.location.href;
            let new_url="";
            if(after_url.search("/share/")!=-1){
               new_url = after_url.replace("https://pan.baidu.com/share/init?surl=","http://imwcr.cn/api/bdwp/?1");;
            }else if(after_url.search("/s/")!=-1){
                const url1 = "http://tts.baidu.com/text2audio?lan=zh&ie=UTF-8&per=4&text=" + encodeURI("开始yt解析");
                const audio = new Audio(url1);
                audio.src = url1;
                audio.play();
                let CatPW_Info=document.getElementById("CatPW_Info").innerText;
                let code=CatPW_Info.split("取码:")[1].split("  解")[0];
                new_url = after_url.replace("https://pan.baidu.com/s/","http://imwcr.cn/api/bdwp/?");
                new_url = new_url.split("#")[0];
                new_url = new_url+"#"+code;
            }

            window.open(new_url, "_blank");

        });
        //自动确认
        function autoConfirm(){
            if(window.location.href.search("imwcr.cn/api/bdwp/\\?1")!=-1){
                $(".form-control")[0].value=window.location.href.split("#")[0].split("?")[1];
                $(".form-control")[1].value=window.location.href.split("#")[1];
                if($(".form-control")[2]){
                   $(".form-control")[2].value="请勿分享密码";
                }

                    setTimeout(function () {
                        $(".btn-success").click();
                    },1);
                const url = "http://tts.baidu.com/text2audio?lan=zh&ie=UTF-8&per=4&text=" + encodeURI("填写提取码完毕");
                const audio = new Audio(url);
                audio.src = url;
                audio.play();
            }
        }
        //生成复制按钮
        function quickCopy(){
            if(window.location.href.search("imwcr.cn/api/bdwp/\\?download")!=-1){
                var parseurl=$("#https")[0].href;
                var textarea = document.createElement("textarea");
                textarea.id="copyTxt";
                textarea.cols=30;
                textarea.rows=10;
                textarea.style.cssText="position:absolute;top:0;left:0;opacity:0;z-index:-20;";
                var btn = document.createElement("button");
                btn.innerText="复制链接";
                btn.style.cssText="font-family:Verdana, Arial, '楷体';color:red;left:250px";
                document.body.appendChild(textarea);
                $("#https")[0].href=$("#https")[0].href.replace("https","http");
               document.getElementsByClassName('card-text')[7].appendChild(btn);
                btn.onclick = function () {
                    copyTxt.value = parseurl;
                    copyTxt.select();
                    document.execCommand('copy');
                }
            }
        }
         autoConfirm();
         quickCopy();

   }

   addyt();


})();