// ==UserScript== // @name 第一范文网绕过收费下载文档免费下载文档 // @namespace 第一范文网 1.1 // @version 1.1 // @description 绕过收费 // @author LZJ // @match *www.diyifanwen.net/* // @grant none // @license MIT // @downloadURL none // ==/UserScript== (function() { let pattern = /(\d+)/ig; //定义正则表达式 let url = window.location.pathname document.getElementsByClassName("word-pic")[0].children[0].href = 'https://www.diyifanwen.net/plus/word.php?id='+url.match(pattern)[0] document.getElementsByClassName("word-pic")[1].children[0].href = 'https://www.diyifanwen.net/plus/word.php?id='+url.match(pattern)[0] })();