您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
when download paper from arxiv.org, automate set the file name as the paper's title
// ==UserScript== // @name springer download title as pdf file name // @namespace http://tampermonkey.net/ // @version 0.1 // @description when download paper from arxiv.org, automate set the file name as the paper's title // @author EvanL00 // @match http://link.springer.com* // @include http://link.springer.com* // @grant none // ==/UserScript== var dow = function() { 'use strict'; // find the title var title = document.getElementsByClassName("ArticleTitle")[0].innerText; //find where to put the tag var downl = document.getElementById("download-content-placeholder"); var url = downl.getElementsByTagName('a').href; var loc = document.getElementsByClassName("article-actions")[0]; var obj = document.createElement("div"); //get the pdf url var pdfurl = url; var fileName = title.toString().replace(':', '--') + '.pdf'; obj.innerHTML = '<a download='+ '"'+ fileName + '"' + ' href=' + pdfurl +'>Save as pdf</a>'; //loc.insertBefore(obj, loc.childNodes[0]); loc.insertBefore(obj, downl); }; dow();