Greasemonkey: how often script check updates with @updateURL

你离开我真会死。 提交于 2019-12-22 05:46:14

问题


On monkey Wiki : "Greasemonkey will check periodically for new versions of the script by downloading it". But what does it mean? Once a week? Twice a hour?

Anyone have real numbers?


回答1:


According to http://www.greasespot.net/2012/02/automatic-script-updates-come-to.html,

By default updates will be checked for every seven days, and automatically installed when found.




回答2:


While Hellion does point to the original post when auto-update was released in early 2012 this hasn't been true for some time. It isn't documented anywhere so we have to do some digging. You can see here Greasemonkey uses what looks like a built in Firefox mechanism to check and update. It is hard to tell when though. I know from experience that this is in fact a lot less that every 7 days. I have had it happen within an hour. Restarting firefox doesn't seem to trigger it but the shortest I have seen was within an hour. Furthermore if we search about:config in Firefox for update we can find a particular setting that kinda stands out. extensions.update.interval;86400. Obviously this is saying the extensions update interval is set to 86400 second (24 hours). Since Greasemonkey is tying the update process to a firefox update process I would think this is it. I will try changing this setting to see if I am right. Later this weekend when I am done with this userscript I am working on I will let you know what I find out.

Although this question is toward Greasemonkey I will go ahead and say Tampermonkey (Chrome) is much easier to check. Just click on the Tampbermonkey icon > Dashboard then go to settings and you can see check interval is set to 12 hours or whatever you changed it to.



来源:https://stackoverflow.com/questions/20501091/greasemonkey-how-often-script-check-updates-with-updateurl

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!