开发者

Replace javascript on a site with Greasemonkey

开发者 https://www.devze.com 2022-12-20 12:22 出处:网络
does anyone know how t开发者_C百科o replace JavaScript on a site with Greasemonkey ie. This is the default code:

does anyone know how t开发者_C百科o replace JavaScript on a site with Greasemonkey ie.

This is the default code:

var Test="1";

And i want to replace it like this on the page load:

var Test="2";

Thanks in advance!


Try the following in a userscript, assuming Test is a global variable:

unsafeWindow.Test="2";
0

精彩评论

暂无评论...
验证码 换一张
取 消