Open vzvu3k6k opened 9 years ago
Metadata is updated probably in Config.prototype.updateModifiedScripts()
. If GM_prefRoot.getValue('enableScriptRefreshing')
is truthy, updateModifiedScripts()
is invoked every time Greasemonkey try to run user scripts. And if script._modifiedTime
(modified time recorded in the script config) is not equal to script.file.lastModifiedTime
(modified time of the user script file itself) (see Script.prototype.isModified()
) or script.pendingExec.length != 0
(I don't know what it means.), a script's metadata is parsed and config is updated.
automatic script updates will be disabled.
Converting all metadata is cumbersome, and we have to fix the code every time a new property is added.
Since Greasemonkey seems to rebuild
config.xml
when a userscript file is updated, it would be better just to convert metadata not included in script and have Greasemonkey rebuildconfig.xml
bytouch userscripts/**/*.user.js
or something.I'll do a search on what Greasemonkey exactly does when a userscript file is updated.