您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
可提取百度网盘文件名称列表 支持一键复制与数量统计
// ==UserScript== // @name 百度网盘文件列表名称提取 // @namespace http://tampermonkey.net/ // @version 0.1 // @description 可提取百度网盘文件名称列表 支持一键复制与数量统计 // @author Yanan // @icon https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net // @grant none // @run-at document-start // @match https://pan.baidu.com/disk/main* // @match https://pan.baidu.com/s/* // @license MIT // ==/UserScript== (function() { 'use strict'; function copyToClip(content, message) { var aux = document.createElement("textarea"); aux.value = content; document.body.appendChild(aux); aux.select(); document.execCommand("copy"); document.body.removeChild(aux); if (message == null) { alert("复制成功"); } else{ alert(message); } } const showResult = (str, list) => { const div = document.createElement('DIV'); div.style.cssText = 'position: fixed; right:0; bottom: 0; height: 60vh; width: 30vw; display:flex; flex-direction: column; background: #fff; border: 2px dashed blue; z-index: 100000;' const textArea = document.createElement('TEXTAREA'); textArea.style.cssText = 'width:100%; flex: 1; font-family: Arial; '; const statics = document.createElement('DIV'); statics.style.cssText = 'display: flex; align-items: center; height: 30px; border-bottom: 1px solid #ccc; flex-shrink:0;'; statics.innerHTML = '共计:' + list.length + '条,请核对!!'; textArea.value = str; const copy = document.createElement('BUTTON'); copy.innerHTML= '复制'; copy.style.cssText = 'position:absolute; right:20px;top:4px;' copy.addEventListener('click', () => { copyToClip(str); }) div.appendChild(statics); div.appendChild(textArea); div.appendChild(copy); document.body.appendChild(div); } // Your code here... const originOpen = XMLHttpRequest.prototype.open; XMLHttpRequest.prototype.open = function (_, url) { console.log(url) if (url.includes('api/list') || url.includes('share/list')) { console.log('started to work', url); this.addEventListener("readystatechange", function () { if (this.readyState === 4) { try { const r = typeof this.response === 'string' ? JSON.parse(this.response) : this.response; const listStr = r.list.map(e => e.server_filename).join('\n'); showResult(listStr,r.list); } catch(e) { console.log('插件解析错误',e); } } }); } originOpen.apply(this, arguments); }; })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址