有没有办法重新加载 Greasemonkey 脚本?
有没有办法从greasemonkey 重新加载脚本?
例如: 当我进入某个特定网站时,greasemonkey 的脚本工作正常,但是当我更改页面(我猜是网站中的 asp)时,脚本不会重新加载生效......
我该如何解决它?
It's there a way to reload a script from greasemonkey ?
For example:
When I enter on some specific website, the script from the greasemonkey works correctly, but when I change the page (asp in the website I guess), the script doesn't reload to take effect...
How can I solve it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将 Greasemonkey 代码包装在函数中,然后设置文档更改事件处理程序来调用它。就像这样...
Wrap your Greasemonkey code in a function and then set a document change event-handler to call it. Like so...
Greasemonkey 应该在每个页面加载上工作,所以我认为您遇到的问题是由于用于相关用户脚本的 @include/@exclude 规则造成的。您能给我们指出这个用户脚本的来源吗?以及您在问题中提到的两个页面网址?
Greasemonkey should work on every page load, so I think that the problem you are experiencing is due to the @include/@exclude rules used for the userscript in question. Can you please point us to the source of this user script? and the two page urls that you refer to in your question please?