本帖最后由 lidelongqi 于 2021-3-21 14:34 编辑
另一种思路,用油猴脚本修改全局函数
[JavaScript] 纯文本查看 复制代码 function fastpost() {
//fastpost是你要修改的全局函数
//写你的代码
}
addJS_Node(fastpost);
function addJS_Node(text, s_URL, funcToRun, runOnLoad) {
var D = document;
var scriptNode = D.createElement('script');
if (runOnLoad) {
scriptNode.addEventListener("load", runOnLoad, false);
}
scriptNode.type = "text/javascript";
if (text) scriptNode.textContent = text;
if (s_URL) scriptNode.src = s_URL;
if (funcToRun) scriptNode.textContent = '(' + funcToRun.toString() + ')()';
var targ = D.getElementsByTagName('head')[0] || D.body || D.documentElement;
targ.appendChild(scriptNode);
} //添加新的js脚本覆盖原有函数 |