我知道您可以使用return;
从Greasemonkey脚本返回,但前提是您不在其他函数中。例如,这是不行的:有没有办法退出Greasemonkey脚本?
// Begin greasemonkey script
function a(){
return; // Only returns from the function, not the script
}
// End greasemonkey script
有一个内置在Greasemonkey的功能,让我停止执行脚本,在脚本的任何地方?
谢谢
我在想抛出一个错误。但是,这会干扰页面上的其他脚本吗? – 2011-01-10 21:46:45
@SimpleCoder,我的其他Greasemonkey脚本,对于同一页面,本地脚本工作正常。 – Anders 2011-01-10 21:54:44