Greasy Fork is available in English.

百度网盘提取助手-资源搜索增强版

百度网盘提取助手搭配强大资源搜索,资源一网打尽,帮助用户获取百度网盘提取码,自动填入,共享大家的密码,让提取更方便.

// ==UserScript==
// @name         百度网盘提取助手-资源搜索增强版
// @namespace    https://www.zipmaster.top/
// @version      1.6
// @description  百度网盘提取助手搭配强大资源搜索,资源一网打尽,帮助用户获取百度网盘提取码,自动填入,共享大家的密码,让提取更方便.
// @author       勿忘心安
// @match        https://pan.baidu.com/share/*
// @match        https://pan.baidu.com/s/*
// @grant        GM_xmlhttpRequest
// @require https://code.jquery.com/jquery-2.1.4.min.js
// ==/UserScript==

(function() {
    'use strict';

    var  url = window.location.href;
    $(document).ready(function(){
        if(url.slice(22,27)=='share'){
             $('dt').append('<a class="g-button g-button-blue-large" data-button-id="b1" data-button-index="" href="javascript:;" id = "getpassbtn" title="资源搜索"><span class="g-button-right"><span class="text" style="width: auto;">资源搜索</span></span></a>');
             var gbtn = document.getElementById('getpassbtn');
             var pass = '',i=1;
             var start = url.indexOf('=')+1;
             var end = url.length;
             var code = url.slice(start,end);
             GM_xmlhttpRequest({
                method: "GET",
                url: "https://www.zipmaster.top/getpandata/fcode/1"+code,
                onload: function(data) {
                    if(data['response']=='failed') return;
                    $('input').each(function(){
                        if(i==1){
                            $(this).val(data['response']);
                        }
                        i++;
                    });
                }
             });
             gbtn.addEventListener('click',function(){
                window.open("https://www.zipmaster.top/pan","blank");
             });
            $('.g-button-right').each(function(){
                var j = 1,password;
                $(this).click(function(){
                    j=1;
                    var start = url.indexOf('=')+1;
                    var end = url.length;
                    var code = url.slice(start,end);
                    $('input').each(function(){
                    if(j==1){
                        password = $(this).val();
                    }
                    j++;
                });
                if(password.length!=4) return;
                    GM_xmlhttpRequest({
                        method: "GET",
                        url: "https://www.zipmaster.top/post_first/fcode/1"+code+'/pass/'+password,
                        onload: function(data) {
                        }
                    });
                });
            });
        }else{
            var start = 24;
            var end;
            if(url.indexOf('#')!=-1){
                end = url.indexOf('#');
            }
            else{
                end = url.length;
            }
            var code = url.slice(start,end);
            var j = 1,fname;
           $('.file-name').each(function(){
                  if(j==1){
                     fname = $(this).attr('title');
                  }
                  j++;
            });
           var k = 1;
           GM_xmlhttpRequest({
               method: "GET",
               url: "https://www.zipmaster.top/getpandata/fcode/"+code,
               onload: function(data) {
                   if(data['response']=='failed'){
                       return;
                   }
                   $('input').each(function(){
                       if(k==1){
                           $(this).val(data['response']);
                       }
                       k++;
                   });
               }
           });
           GM_xmlhttpRequest({
               method: "GET",
               url: "https://www.zipmaster.top/post/fcode/"+code+'/fname/'+fname,
               onload: function(data) {
               }
           });
        }
    })
    ;

})();