您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Download PDF from Wiley Online Library without redirecting page.
当前为
// ==UserScript== // @name Wiley Direct PDF // @namespace http://itianda.com/ // @version 0.1 // @description Download PDF from Wiley Online Library without redirecting page. // @author itianda // @match http://onlinelibrary.wiley.com/doi/*/*/abstract // @match http://onlinelibrary.wiley.com/doi/*/*/full // @grant none // ==/UserScript== (function() { 'use strict'; var oPDFRedirecting = document.querySelector('a.js-infopane-pdf'); if (oPDFRedirecting) { var sPDFRedirecting = oPDFRedirecting.getAttribute('href'); fetch(sPDFRedirecting).then(function(res){ if (res.ok) { res.text().then(function(text) { var r = /<iframe id="pdfDocument" src="(.+?)" width="100%" height=/.exec(text); if (r) { var sPDFLink = r[1]; var oPDFRedirecting = document.querySelector('a.js-infopane-epdf'); oPDFRedirecting.setAttribute('href', sPDFLink); oPDFRedirecting.onclick = function(event) { event.preventDefault(); }; oPDFRedirecting.style.color = 'red'; return; } }); } }); } })();