您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
豆瓣日記頁添加下載按鈕
// ==UserScript== // @name downdoubanpage // @namespace http://tampermonkey.net/ // @version 1.01 // @description 豆瓣日記頁添加下載按鈕 // @author You // @match https://www.douban.com/note/* // @match https://www.douban.com/group/topic/* // @require https://cdn.jsdelivr.net/npm/[email protected]/FileSaver.min.js // ==/UserScript== (function () { "use strict"; //自动下载 const autodown = true; function down() { const r = document.querySelector("#link-report"); if (r) { let header = document.querySelector(".note-header"); if (!header) header = document.querySelector(".article > h1:nth-child(1)"); if (!header) alert("下载失败 header is null"); var blob = new Blob([header.innerText, "\r\n", r.innerText], { type: "text/plain;charset=utf-8", }); saveAs(blob, `${header.innerText}.txt`); } } const t = document.querySelector(".article"); if (t) { let e = document.createElement("button"); e.id = "TDownBtn"; e.textContent = "下载"; e.className = "btn btn-md btn-default"; e.onclick = down; t.parentNode.insertBefore(e, t); } if (autodown) { setTimeout(down, 200); } // Your code here... })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址