greasemonkey修改网页url

 // ==UserScript==
// @name JSHE_ModifyFunction
// @namespace jshe
// @include http://localhost/*
// @version 1
// @grant none
// ==/UserScript== alert("hello2"); function embed() {
var cells =document.getElementsByTagName("a");
for (var i = 0; i < cells.length; i++)
{
var href = cells[i].getAttribute("href");
cells[i].setAttribute("href", href + "/dummy");
}
} var script = document.createElement('script');
script.type = "text/javascript";
//script.innerHTML = "(" + embed + ")()";
script.innerHTML = embed + "\nembed();";
document.getElementsByTagName('body')[0].appendChild(script); alert("hello3");
上一篇:Python之路-初识python及环境搭建与测试(Python安装、Anaconda安装、PyCharm安装)


下一篇:python之路:Day01 --- Python基础1