您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
在下载IEEE的论文将文件名命名为题目,而不是一串数字 save the pdf file using the title as file name.
// ==UserScript== // @name IEEE TitleAsPDFfileName // @namespace http://tampermonkey.net/ // @version 3.0.3 // @description 在下载IEEE的论文将文件名命名为题目,而不是一串数字 save the pdf file using the title as file name. // @author EvanL00 // @include https://ieeexplore.ieee.org/* // @grant none // ==/UserScript== function saveAsPdf() { // find the title var title = document.getElementsByClassName("document-title")[0].innerText; //find where to put the tag var loc = document.getElementsByClassName("doc-actions stats-document-lh-actions")[0]; var downloadPdf = document.getElementsByClassName("doc-actions-link stats-document-lh-action-downloadPdf_2 ng-scope"); //get the pdf url var getUrlHttp = new XMLHttpRequest(); var lists = loc.getElementsByTagName("li"); var urlli = lists[0]; var atag = urlli.getElementsByTagName('a')[0]; var suffix = atag.getAttribute("href"); var url = suffix.toString(); getUrlHttp.open('GET', url, false); getUrlHttp.send(null); var res = getUrlHttp.responseText; var myRex = /(https:\/\/ieee[^"]+)/; var pdfurl = res.match(myRex)[0]; var fileName = title.toString().replace(':', '--') + '.pdf'; downloadPdf[0].setAttribute('href',pdfurl); downloadPdf[0].setAttribute('download', fileName); } window.onload = saveAsPdf;
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址