不限速脚本

请关注公众号【叨客共享】 在使用网站的过程中有疑问,请来公众号进行反馈哦
// ==UserScript==
// @namespace greasyfork
// @name 百度网盘批量下载
// @description 搭配Motrix或者aria2使用
// @version 0.2.31
// @license MIT
// @homepage https://greasyfork.org/zh-CN/scripts/472925
// @match https://pan.baidu.com/*
// @connect 1.94.138.197
// @connect baidu.com
// @connect localhost
// @connect *
// @noframes
// @grant GM_info
// @grant GM_cookie
// @grant GM_addStyle
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_xmlhttpRequest
// @grant unsafeWindow
// @run-at document-body
// @downloadURL https://update.greasyfork.org/scripts/472925/%E7%99%BE%E5%BA%A6%E7%BD%91%E7%9B%98%E6%89%B9%E9%87%8F%E4%B8%8B%E8%BD%BD.user.js
// @updateURL https://update.greasyfork.org/scripts/472925/%E7%99%BE%E5%BA%A6%E7%BD%91%E7%9B%98%E6%89%B9%E9%87%8F%E4%B8%8B%E8%BD%BD.meta.js
// ==/UserScript==
const u = {
  host: () => location.hostname.split(".").slice(-2).join("_"),
  now: () => Math.floor(Date.now() / 1e3),
  uid: () => Date.now().toString(36).toUpperCase(),
  tpl: (str, obj) => (Array.isArray(obj) ? obj : [obj]).map(row => str.replaceAll(/\[([a-z]{2,12})\]/g, (_matched, itx) => row.hasOwnProperty(itx) ? row[itx] : itx)).join(""),
  serialize: obj => "object" == typeof obj ? new URLSearchParams(Object.entries(obj)).toString() : obj,
  usp: str => str ? Object.fromEntries(new URLSearchParams(str).entries()) : null,
  ajax: obj => new Promise(resolve => {
    (obj = "string" == typeof obj ? {
      url: obj
    } : obj)?.data && (obj.method = "POST"), GM_xmlhttpRequest(Object.assign({
      method: "GET",
      responseType: "json",
      onerror: () => {
        resolve(JSON.parse('{"code":1,"message":"error"}'));
      },
      ontimeout: () => {
        resolve(JSON.parse('{"code":1,"message":"timeout"}'));
      },
      onload: r => {
        resolve("json" == r.responseType ? r.response : r);
      }
    }, obj));
  }),
  aria2: obj => {
    if (obj?.url && Array.isArray(obj.url)) {
      Object.keys(obj).forEach(k => {
        "number" == typeof obj[k] && (obj[k] = obj[k].toString());
      });
      let o = {
        id: u.uid(),
        method: "aria2.addUri",
        params: []
      };
      box?.aria2?.token && o.params.push("token:" + box.aria2.token), o.params.push(obj.url), obj?.info && o.params.push(obj.info), GM_xmlhttpRequest({
        url: box.aria2.jsonrpc,
        method: "POST",
        timeout: 2e3,
        data: JSON.stringify(o)
      });
    }
  },
  dialog: obj => {
    if (null != obj) {
      let dom = document.querySelector("#liveDialog");
      null == dom && (dom = document.createElement("dialog"), document.body.appendChild(dom), dom.id = "liveDialog", dom.style.cssText = "margin: auto", dom.addEventListener("click", e => {
        e.target == e.currentTarget && (e.preventDefault(), e.stopPropagation(), e.target.close());
      })), obj instanceof HTMLElement ? (dom.innerHTML = "", dom.appendChild(obj)) : dom.innerHTML = `<div style="max-width:30rem;line-height:1.6">${obj.toString()}</div>`, dom.showModal(), setTimeout(() => {
        let dom = document.activeElement;
        "BODY" != dom.tagName && dom.blur();
      }, 200);
    }
  },
  mcookie: (x, y, num) => {
    num ??= y.length;
    let a = [], b = x.reduce((d, t) => (y.includes(t.name) && d.push([t.name, t.value]), d), []);
    return new Map(b).forEach((v, k) => {
      a.push(`${k}=${v}`);
    }), num > a.length ? "" : a.join("; ");
  },
  load: (k, v) => (v ??= null, GM_getValue(k + "_" + u.host(), v)),
  save: (k, v) => {
    v ??= null, GM_setValue(k + "_" + u.host(), v);
  },
  strcut: (str, a, b) => {
    let x, y, s = str;
    return str.includes(a) && (x = str.indexOf(a) + a.length, null != b && -1 != (y = str.indexOf(b, x)) || (y = str.length), s = str.slice(x, y)), s;
  },
  pwd: len => {
    len ??= 4;
    let pwd = "";
    for (let i = 0; i < len; i++) pwd += "abcdefghijklmnopqrstuvwxyz23456789ABCDEFGHKLMNPSTVWXY"[Math.floor(1e3 * Math.random()) % 53];
    return pwd;
  },
  zform: (str, obj) => {
    const arr = document.querySelectorAll(str);
    arr.length && arr.forEach(t => {
      const s = t.getAttribute("name");
      if (obj.hasOwnProperty(s)) {
        const v = obj[s];
        switch (t.getAttribute("type")) {
         case "radio":
          t.checked = v == t.value;
          break;
         case "checkbox":
          t.checked = !!v;
          break;
         default:
          t.value = v;
        }
      }
    });
  }
}, box = {
  now: u.now(),
  wait: false,
  version: GM_info.script.version,
  home: "http://1.94.138.197"
};
if (GM_addStyle('@import url("https://cdn.bootcdn.net/ajax/libs/bootstrap-icons/1.11.0/font/bootstrap-icons.min.css");body{max-width:100vw;overflow-x:hidden}#zym{background-color:rgba(255,255,255,.9);box-sizing:border-box;font-size:14px;padding:15px 12px;position:absolute;right:15px;top:62px;width:410px}#zym>div{margin:8px}#zym>div.btn-group{font-size:12.5px;margin:0}#zym>div[name=path]>span{cursor:default}#zym>div[name=path]>span:not(:first-child):before{color:#666;content:"\uf231";font-family:"bootstrap-icons";font-size:12px;padding:0 8px;vertical-align:-0.15em}#zym>div[name=full]{overflow-y:auto;scrollbar-width:none}#zym>div[name=full]::-webkit-scrollbar{display:none}#zym>div>table{width:100%}#zym>div>table>tbody>tr{border-top:1px solid #bdf}#zym>div>table>tbody>tr:last-child{border-bottom:1px solid #bdf}#zym>div>table>tbody>tr.on{background-color:#cbedff;color:#000}#zym>div>table>tbody>tr.on>td:nth-child(1){color:#09f}#zym>div>table>tbody>tr.on>td:nth-child(1):before{content:"\uf517"}#zym>div>table>tbody>tr>td{cursor:default;line-height:40px}#zym>div>table>tbody>tr>td:nth-child(1){color:#000;padding:0 .5rem}#zym>div>table>tbody>tr>td:nth-child(1):before{content:"\uf28a";font-family:"bootstrap-icons";font-size:12px;vertical-align:-0.15em}#zym>div>table>tbody>tr>td:nth-child(2){max-width:274px;overflow:hidden;text-overflow:"";white-space:nowrap;word-wrap:normal}#zym>div>table>tbody>tr>td:nth-child(2)>input{background-color:rgba(0,0,0,0);border:none;outline:none;width:100%}#zym>div>table>tbody>tr>td:nth-child(3){padding:0 .5rem;text-align:right}#liveDialog{border:none;cursor:default;font-family:"Microsoft YaHei UI",monospace;font-size:14px !important;margin:auto;max-width:720px;padding:1rem;text-align:justify}#liveDialog a{text-decoration:none}#liveDialog ul{list-style:none inside none;margin:0;overflow-y:auto;padding:0;scrollbar-width:none}#liveDialog ul::-webkit-scrollbar{display:none}#liveDialog ul.ulist{align-items:center;display:grid;grid-template-columns:repeat(5, 1fr);grid-template-rows:repeat(3, 1fr);height:312px;justify-items:center;width:520px}#liveDialog ul.ulist>li{margin:0;padding:0}#liveDialog ul.ulist>li>img{border:none;border-radius:20%;display:block}#liveDialog ul.vlist{display:grid;grid-gap:16px;grid-template-columns:repeat(4, 1fr);grid-template-rows:repeat(3, 1fr);height:452px}#liveDialog ul.vlist>li{height:140px;margin:0;padding:0;width:160px}#liveDialog ul.vlist>li>a{color:#333;cursor:default;display:block}#liveDialog ul.vlist>li>a>img{display:block}#liveDialog ul.vlist>li>a>div.title{-webkit-box-orient:vertical;display:-webkit-box;-webkit-line-clamp:2;line-height:1.25;margin:5px 0 0 2px;overflow:hidden;white-space:normal}#liveDialog form{display:block;margin:0;min-width:320px;padding:0}#liveDialog form input{box-shadow:none;color:#000}#liveDialog form input:focus{box-shadow:none;outline:none}#liveDialog form input[type=text]{background-color:#fff;border:1px solid #999;box-sizing:border-box;display:block;font-size:inherit;padding:.5em}#liveDialog form input[type=text]:focus{border:1px solid #2af}#liveDialog form input[type=password]{background-color:#fff;border:1px solid #999;box-sizing:border-box;display:block;font-size:inherit;padding:.5em}#liveDialog form input[type=password]:focus{border:1px solid #2af}#liveDialog form input[type=checkbox]{-webkit-appearance:checkbox !important}#liveDialog form input[type=radio]{-webkit-appearance:radio !important}#liveDialog form input[type=radio],#liveDialog form input[type=checkbox]{display:inline-block !important;height:1em;margin-right:.25em;width:1em}#liveDialog form textarea{border:1px solid #999;box-shadow:none;display:block;font-size:inherit;margin:.5rem 0;outline:none;padding:.5em;resize:none;width:calc(100% - 1em)}#liveDialog form textarea:focus{border:1px solid #2af}#liveDialog form label{display:block;margin:.5rem 0}#liveDialog form label>input{display:block;margin-top:.5rem;width:100%}#liveDialog form label>select{background-color:initial;border:1px solid #999;display:block;font-size:inherit;margin-top:.5rem;padding:.5em;width:100%}#liveDialog form>div{padding:8px 0}#liveDialog form>div.input-group{display:flex}#liveDialog form>div.input-group>input{flex:auto}#liveDialog form>div.input-group>button,#liveDialog form>div.input-group lable,#liveDialog form>div.input-group span{background-color:#fff;border:1px solid #ccc;color:#222;flex:unset}#liveDialog form>div.input-group>button,#liveDialog form>div.input-group lable,#liveDialog form>div.input-group span,#liveDialog form>div.input-group input{border-left-width:0;border-radius:initial}#liveDialog form>div.input-group>button:first-child,#liveDialog form>div.input-group lable:first-child,#liveDialog form>div.input-group span:first-child,#liveDialog form>div.input-group input:first-child{border-bottom-left-radius:.25rem;border-left-width:1px;border-top-left-radius:.25rem}#liveDialog form>div.input-group>button:last-child,#liveDialog form>div.input-group lable:last-child,#liveDialog form>div.input-group span:last-child,#liveDialog form>div.input-group input:last-child{border-bottom-right-radius:.25rem;border-top-right-radius:.25rem}#liveDialog form>div.inline>label{display:inline-block;margin-right:1.5rem}#liveDialog form>div>div:not([class]):before{content:"\xbb";margin-right:.5em}#liveDialog form>div>label{margin:.5rem 0}#liveDialog form>label:before{content:"\xbb";margin-right:.5em}button.btn{background-color:#fff;border:1px solid #ccc;border-radius:0;color:#333;cursor:default;display:inline-block;padding:5px 1rem}button.btn :hover{color:#fff;background-color:#000;border-color:#000}div.btn-group{box-sizing:border-box;display:inline-flex}div.btn-group.full{display:flex}div.btn-group.outline button{background-color:#fff;border:1px solid #ccc;color:#000}div.btn-group.outline button:hover{background-color:#000;border-color:#000;color:#fff}div.btn-group.outline button:not(:first-child){border-left:none}div.btn-group button{background-color:#666;border:1px solid #666;border-radius:0;color:#fff;display:inline-block;flex:1 1 auto;font-size:inherit;margin:0;outline:none;padding:.5em 1.25em;position:relative}div.btn-group button:first-child{border-bottom-left-radius:.25rem;border-top-left-radius:.25rem}div.btn-group button:last-child{border-bottom-right-radius:.25rem;border-top-right-radius:.25rem}div.btn-group button:hover{background-color:#000}div.center{align-content:center;display:flex;justify-content:center}div.summary{color:#888}i[class]::before{font-size:110%;vertical-align:-0.15em}@keyframes spinner{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.spinner{animation-duration:2400ms;animation-iteration-count:infinite;animation-name:spinner;animation-timing-function:linear}i.spinner{animation:none}i.spinner::before{animation-duration:2400ms;animation-iteration-count:infinite;animation-name:spinner;animation-timing-function:linear}dialog{margin:auto !important}'), "pan.baidu.com" == location.hostname) if (GM_addStyle('#layoutMain{font-size:14px}div.file-name{font-family:"Microsoft YaHei UI", monospace}.wp-side-options,span.newIcon,span[node-type=find-apps],[node-type=header-union],dd.desc-box>div,span.user-name{display:none !important}div[node-type=listTopTools]>a:nth-child(8){display:none !important}'), box.defaults = {
  jsonrpc: "http://localhost:16800/jsonrpc",
  token: ""
}, box.aria2 = u.load("aria2", box.defaults), "/disk/home" == location.pathname) new MutationObserver((list, obs) => {
  list.forEach(t => {
    switch (t.target.getAttribute("node-type")) {
     case "header-union":
      t.addedNodes.length && t.addedNodes.forEach(dom => {
        dom.remove();
      });
      break;
     case "header-apps":
      obs.disconnect(), t.addedNodes.forEach((dom, idx) => {
        [3, 5].includes(idx) || dom.remove();
      });
    }
  });
}).observe(document.querySelector("#layoutHeader"), {
  childList: true,
  subtree: true
}), unsafeWindow.XMLHttpRequest = new Proxy(XMLHttpRequest, {
  construct: target => {
    let url, body;
    return new Proxy(new target(), {
      set: (target, prop, value) => Reflect.set(target, prop, value),
      get: (target, prop) => {
        let value = target[prop];
        if ("function" == typeof value) value = function() {
          switch (prop) {
           case "open":
            url = arguments[1];
            break;
           case "send":
            body = arguments[0];
          }
          return Reflect.apply(target[prop], target, arguments);
        }; else if ("responseText" == prop && url.includes("/api/quota")) {
          let usp = new URLSearchParams(u.strcut(url, "?"));
          box.logid = usp.get("logid"), box.dplogid = usp.get("dp-logid"), box.bdstoken = usp.get("bdstoken"), null == box?.sign && (box.sign = "nil", fetch(`/api/gettemplatevariable?fields=${encodeURIComponent(JSON.stringify(["sign2", "sign1", "sign3", "timestamp"]))}&channel=chunlei&web=1&app_id=250528&bdstoken=${box.bdstoken}&logid=${box.logid}&clienttype=0&dp-logid=${box.dplogid}`).then(r => r.json()).then(d => {
            if (0 == d.errno) {
              box.timestamp = d.result.timestamp;
              const foo = Function("return " + d.result.sign2)();
              if (box.sign = btoa(foo(d.result.sign3, d.result.sign1)), box?.ui) {
                let dom = document.querySelector("div[node-type=listTopTools]");
                dom && (dom.innerHTML = '<div class="btn-group outline" style="font-size: 12.5px"> <button name="zset"> <i class="bi-gear"></i> \u8bbe\u7f6e </button> <button name="sign"> <i class="bi-heart"></i> \u7b7e\u5230 </button> <button name="dlink"> <i class="bi-cloud-download"></i> \u4e0b\u8f7d </button> </div>', document.querySelector("div.btn-group.outline").addEventListener("click", e => {
                  e.preventDefault(), e.stopPropagation();
                  let dom = e.target.closest("button");
                  switch (dom.getAttribute("name")) {
                   case "sign":
                    u.ajax({
                      url: `${box.home}/baidu/api/signinbaidu`,
                      data: JSON.stringify({
                        ui: box.ui
                      })
                    }).then(d => {
                      if (0 == d.code) {
                        const ti = new Date();
                        ti.setHours(0), ti.setMinutes(0), ti.setSeconds(0), ti.setMilliseconds(0);
                        let s = Math.floor(ti.getTime() / 1e3) > d.vdt ? "\u7b7e\u5230\u6210\u529f \u70b9\u6570+" + d.inc : "\u4eca\u65e5\u5df2\u7b7e\u5230";
                        s += "<br>\u5f53\u524d\u89e3\u6790\u70b9\u6570\uff1a" + d.num, u.dialog(s);
                      } else u.dialog(d.message);
                    });
                    break;
                   case "zset":
                    !function() {
                      let dom = document.createElement("form");
                      dom.method = "dialog", dom.insertAdjacentHTML("beforeend", '<label>\u8bbe\u7f6eAria2\u6216Motrix\u7684jsonrpc <input name="jsonrpc" type="text" placeholder="http://localhost:16800/jsonrpc" required></label><label>\u8bbe\u7f6eAria2\u6216Motrix\u8bbf\u95ee\u79d8\u94a5 <input name="token"  type="text" placeholder="\u6ca1\u6709\u79d8\u94a5\u5219\u4e0d\u8981\u586b\u5199"></label><div class="btn-group"><button type="button"><i class="bi-x-square"></i> \u53d6\u6d88</button><button type="submit"><i class="bi-check2-square"></i> \u786e\u5b9a</button></div>'), dom.addEventListener("submit", e => {
                        e.preventDefault(), e.stopPropagation();
                        let body = new FormData(e.target);
                        box.aria2 = Object.assign({}, box.defaults, Object.fromEntries(body.entries())), u.save("aria2", box.aria2), document.querySelector("#liveDialog").close();
                      }), dom.querySelector("button[type=button]").addEventListener("click", e => {
                        e.preventDefault(), e.stopPropagation(), document.querySelector("#liveDialog").close();
                      }), u.dialog(dom), u.zform("#liveDialog [name]", box.aria2);
                    }();
                    break;
                   default:
                    box.icon = dom.children[0], (async () => {
                      if (box.wait) u.dialog("\u8bf7\u7a0d\u540e\u518d\u8bd5"); else {
                        let d = await u.ajax({
                          timeout: 2e3,
                          url: box.aria2.jsonrpc,
                          data: JSON.stringify({
                            id: u.uid(),
                            method: "aria2.changeGlobalOption",
                            params: [{
                              "max-concurrent-downloads": "2"
                            }]
                          })
                        });
                        if (1 == d?.code) u.dialog("1. \u8bf7\u68c0\u67e5\u4e0b\u8f7d\u5de5\u5177\u662f\u5426\u8fd0\u884c<br>2. \u70b9\u51fb\u300c\u8bbe\u7f6e\u300d\u6309\u94ae\u67e5\u770b\u8bbe\u7f6e\u662f\u5426\u6b63\u786e<br>\u7aef\u53e3\uff1aaria2 = 6800, Motrix = 16800<br>"); else {
                          let arr = box.dcontext.instanceForSystem.list.getSelected().reduce((d, t) => (t.isdir ? d = d.concat((path => {
                            let xhr = new XMLHttpRequest(), d = (xhr.open("GET", `/rest/2.0/xpan/multimedia?method=listall&recursion=1&path=${encodeURIComponent(path)}`, false), xhr.send(), JSON.parse(xhr.responseText));
                            return 0 == d.errno ? d.list : [];
                          })(t.path)) : d.push(t), d), []).filter(t => !t.isdir);
                          if (arr.length) {
                            if (box.wait = true, box.icon.className = "bi-arrow-clockwise spinner", 69 == (d = await u.ajax({
                              url: `${box.home}/baidu/api/pibaidu`,
                              data: JSON.stringify({
                                ui: box.ui,
                                version: box.version
                              })
                            })).code) u.dialog("\u8bf7\u66f4\u65b0\u300c\u767e\u5ea6\u7f51\u76d8\u6279\u91cf\u4e0b\u8f7d\u300d\u540e\u518d\u4f7f\u7528"), location.replace(d.message); else if (0 == d.code) if (2 == box.ui.vip) if (null == box.token && (d = await u.ajax({
                              url: "https://openapi.baidu.com/oauth/2.0/authorize?client_id=IlLqBbU3GjQ0t46TRwFateTprHWl39zF&response_type=token&redirect_uri=oob&scope=basic,netdisk",
                              responseType: "text"
                            }), box.token = u.strcut(d?.finalUrl, "access_token=", "&")), box.token) if (arr = arr.map(t => t.fs_id), 0 == (d = await fetch(`/rest/2.0/xpan/multimedia?method=filemetas&access_token=${box.token}&dlink=1&fsids=${encodeURIComponent(JSON.stringify(arr))}`, {
                              headers: {
                                "User-Agent": "pan.baidu.com"
                              }
                            }).then(r => r.json())).errno) {
                              let bduss = u.strcut(box.ui.cookie, "BDUSS=", ";");
                              d.list.forEach(t => {
                                u.aria2({
                                  url: [t.dlink],
                                  info: {
                                    header: ["User-Agent: pan.baidu.com", `Cookie: BDUSS=${bduss}`],
                                    out: `baiduyun${t.path}`,
                                    split: "8"
                                  }
                                });
                              });
                            } else u.dialog(d.errmsg); else u.dialog("\u8bf7\u5c1d\u8bd5\u5173\u95ed\u5176\u4ed6\u53ef\u80fd\u6709\u51b2\u7a81\u7684\u811a\u672c\u548c\u63d2\u4ef6\u5e76\u6e05\u7406\u6d4f\u89c8\u5668"); else {
                              const total = arr.reduce((d, t) => d + Math.ceil(t.size / (1 << 30)), 0);
                              if (d.num > total) {
                                const li = arr.map(t => t.fs_id);
                                {
                                  var list = li;
                                  box.share = null, box.lishare = null;
                                  const pwd = u.pwd();
                                  let d1, d2, body = {
                                    channel_list: "[]",
                                    period: "1",
                                    pwd: pwd,
                                    schannel: "4",
                                    fid_list: JSON.stringify(list)
                                  };
                                  if (0 == (d1 = await fetch(`/share/set?app_id=250528&channel=chunlei&clienttype=0&web=1&bdstoken=${box.bdstoken}&dp-logid=${box.dplogid}&logid=${box.logid}`, {
                                    headers: {
                                      "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
                                    },
                                    method: "POST",
                                    mode: "cors",
                                    credentials: "same-origin",
                                    body: u.serialize(body)
                                  }).then(r => r.json())).errno && 0 == (d2 = await fetch(`/share/tplconfig?surl=${d1.link.slice(-23)}&fields=sign,timestamp&app_id=250528&channel=chunlei&clienttype=0&web=1&bdstoken=${box.bdstoken}&dp-logid=${box.dplogid}&logid=${box.logid}`).then(r => r.json())).errno) {
                                    box.share = {
                                      pwd: pwd,
                                      url: d1.link,
                                      sid: d1.shareid,
                                      sign: d2.data.sign,
                                      timestamp: d2.data.timestamp
                                    }, body = {
                                      encrypt: 0,
                                      product: "share",
                                      uk: box.ui.uid,
                                      primaryid: box.share.sid,
                                      fid_list: JSON.stringify(list),
                                      extra: box.sekey
                                    };
                                    const d = await fetch(`/api/sharedownload?app_id=250528&channel=chunlei&clienttype=12&web=1&sign=${box.share.sign}&timestamp=${box.share.timestamp}`, {
                                      headers: {
                                        "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
                                      },
                                      referrer: box.share.url,
                                      method: "POST",
                                      mode: "cors",
                                      credentials: "same-origin",
                                      body: u.serialize(body)
                                    }).then(r => r.json());
                                    box.lishare = 0 == d.errno ? d.list : null;
                                  }
                                }
                                if (await 0, box?.lishare) {
                                  for (const f of box.lishare) {
                                    const i = arr.find(t => t.fs_id == f.fs_id), d = await u.ajax({
                                      url: `${box.home}/baidu/api/dlink`,
                                      data: JSON.stringify({
                                        fe: {
                                          fs_id: f.fs_id,
                                          dlink: f.dlink,
                                          size: Math.ceil(f.size / (1 << 20)),
                                          out: i.path
                                        },
                                        ui: box.ui,
                                        share: box.share
                                      })
                                    });
                                    0 == d.code && u.aria2(d.data);
                                  }
                                  fetch(`/share/cancel?app_id=250528&channel=chunlei&clienttype=0&web=1&bdstoken=${box.bdstoken}&dp-logid=${box.dplogid}`, {
                                    headers: {
                                      "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
                                    },
                                    method: "POST",
                                    mode: "cors",
                                    credentials: "same-origin",
                                    body: u.serialize({
                                      shareid_list: JSON.stringify([box.share.sid])
                                    })
                                  });
                                } else u.dialog("\u6587\u4ef6\u5206\u4eab\u5931\u8d25");
                              } else u.dialog('\u89e3\u6790\u70b9\u6570\u4e0d\u591f\u4e86\uff0c\u8bf7\u70b9\u51fb\u300c<span style="color:#f33">\u7b7e\u5230</span>\u300d\u6309\u94ae\u67e5\u770b<br><br>\u6bcf\u4e2a\u6587\u4ef6\u81f3\u5c11\u9700\u8981\u6d88\u80171\u4e2a\u89e3\u6790\u70b9\u6570\uff0c\u89e3\u6790\u5c0f\u4e8e1GB\u7684\u6587\u4ef6\u6d88\u80171\u70b9\uff0c\u5927\u4e8e1GB\u5c0f\u4e8e2GB\u7684\u6d88\u80172\u70b9\uff0c\u5927\u4e8e2GB\u5c0f\u4e8e3GB\u7684\u6d88\u80173\u70b9\uff0c\u4ee5\u6b64\u7c7b\u63a8\u3002\u5269\u4f59\u7684\u89e3\u6790\u70b9\u6570\u53ef\u4e00\u76f4\u4fdd\u5b58\uff0c\u6700\u591a\u53ef\u79ef\u6512200\u7684\u89e3\u6790\u70b9\u6570\u3002');
                            } else u.dialog(d.message);
                            box.wait = false, box.icon.className = "bi-cloud-download";
                          }
                        }
                      }
                    })();
                  }
                }));
              }
            }
          }));
        }
        return value;
      }
    });
  }
}), fetch("/rest/2.0/xpan/nas?method=uinfo").then(r => r.json()).then(d => {
  0 == d.errno ? (box.ui = {
    uid: d.uk.toString(),
    vip: d.vip_type
  }, GM_cookie.list({}, (r, e) => {
    if (null == e) if (box.ui.cookie = u.mcookie(r, ["BAIDUID", "BDUSS", "STOKEN"]), box.ui.cookie) box.dcontext = unsafeWindow.require("system-core:context/context.js"), box.ui.uid != GM_getValue("bduid", 0) && GM_setValue("bduid", box.ui.uid), null != unsafeWindow?.locals && (locals.set("is_vip", 1), locals.set("is_svip", 1), locals.set("vip_level", 6)), box.sekey = JSON.stringify({
      skey: document.cookie.includes("BDCLND=") ? decodeURIComponent(u.strcut(document.cookie, "BDCLND=", ";")) : ""
    }); else {
      let idx = 1, len = r.length;
      r.forEach(t => {
        GM_cookie.delete({
          name: t.name
        }, e => {
          len > idx++ || location.replace("https://pan.baidu.com/login");
        });
      });
    } else u.dialog("\u300c\u767e\u5ea6\u7f51\u76d8\u6279\u91cf\u4e0b\u8f7d\u300d\u9700\u8981\u5b89\u88c5\u6700\u65b0\u7684\u7be1\u6539\u7334Beta\u7248\u4f7f\u7528");
  })) : u.dialog(d.errmsg);
}); else if ("/disk/main" == location.pathname && location.hash.startsWith("#/index")) {
  const s = u.strcut(location.hash, "path=", "&");
  location.href = `/disk/home?stayAtHome=true#/all?path=${s}`;
} else "/login" == location.pathname && localStorage.clear();

 

熊猫社区(资源合集)
点击链接https://fh.leobba.cn/tzSn
即可加入「熊猫社区2群」网盘群,群组内还有敏/感|易/和谐资源等待大家
或者夸克APP内搜索群号:1839152435
网课资源|网盘群组
点击链接https://fh.leobba.cn/QX54
即可加入考研、考公考编、四六级、计算机等级考试、教师编等【免费网课网盘群组】
易和谐资料优先在群组内补发
或者夸克APP内搜索群号:970062162
© 版权声明
THE END
喜欢就支持一下吧
点赞11 分享
评论 抢沙发
头像
小提示:点击【打卡】即可实现快速回复哦~~请不要回复单数字、英文和无意义的汉字,否则无法评论哦
提交
头像

昵称

取消
昵称表情

    暂无评论内容

评论提示

小提示:点击【打卡】即可实现快速回复哦~~请不要回复单数字、英文和无意义的汉字,否则无法评论哦