您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Batch download single chapter PDFs for De Gruyter books
"use strict"; // ==UserScript== // @name De Gruyter Downloader // @namespace https://pcdi.github.io // @version 1.1.0 // @description Batch download single chapter PDFs for De Gruyter books // @author Philipp Immel // @license GPL-3.0-or-later // @match https://www.degruyter.com/*/html // @icon https://www.google.com/s2/favicons?sz=64&domain=degruyter.com // @grant GM_download // ==/UserScript== function downloadPdfs() { let pdfLinks = document.getElementsByClassName("downloadPdf"); for (const link of pdfLinks) { GM_download({ url: link.href, name: document.querySelector("[name=citation_title][content]")?.content + "/" + link.dataset.doi?.replaceAll("/", "_") + ".pdf", saveAs: false, }); } } (function () { var btn = document.createElement("BUTTON"); btn.innerHTML = "Download PDFs"; btn.id = "downloadPdfs"; btn.addEventListener("click", downloadPdfs); document.getElementsByTagName("h1")[0]?.append(btn); })();