您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
劫持PDFJS下载
// ==UserScript== // @name 机械工业下载器 // @namespace https://qinlili.bid // @version 0.1 // @description 劫持PDFJS下载 // @author 琴梨梨 // @match https://dcd.cmanuf.com/ebook/web/index.html* // @grant none // @run-at document-start // ==/UserScript== (function() { 'use strict'; const dlFile = (link, name) => { let eleLink = document.createElement('a'); eleLink.download = name; eleLink.style.display = 'none'; eleLink.href = link; document.body.appendChild(eleLink); eleLink.click(); document.body.removeChild(eleLink); }; let originConsole=console.log; originConsole("Launching..."); //劫持Uptodown的谷歌play按钮 (function (appendChild) { Node.prototype.appendChild = function (node) { if (node.src&&node.src.indexOf("pdf_viewer.min.js")>0 ){ alert("Hook Success!"); originConsole("Ready..."); let originGet=pdfjsLib.getDocument; pdfjsLib.getDocument=doc=>{ originConsole(doc); dlFile(URL.createObjectURL(new Blob([doc.data])),Date.now()+".pdf") return originGet(doc); } return appendChild.call(this, node); } else { return appendChild.call(this, node); } }; })(Node.prototype.appendChild); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址