Am 17.02.2012 18:05, schrieb Anthony Lieuallen:
No.  You can read some data from GM_info but you can't alter anything.  You
can continue to implement your own further updates, but unless there's an
extreme situation like this it would generally be discouraged once
Greasemonkey handles it.

It would be worth hearing from more people to see if your sort of situation
is common or rare, before deciding how to proceed.


If I were in that situation, I'd add an invisible element to the page that holds the required script version. The script compares that to its own version, and if it's not the same, it could ask the user to update and otherwise exit the initial function before anything else is done.

But maybe implement anything like this?
GM_needsUpdate() - checks with the version if there's a newer version. Returns true, if GM was able to check for new versions and found one, otherwise false. GM_tryUpdate() - does the same thing like when the user clicks on "Update" (Should be doable even if the script is running?) Returns true if the update was successful, otherwise false (e. g. the user selected safe updates but the script cannot be safely updated).
GM_disableSelf() - disables the current script.

Even cooler:
GM_disableSelf(temp) - disables the current script until the next Firefox start, if temp is true (GM sets a temporary pref to enable that script on the next start up), or permanently, if temp is false.

--
You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/greasemonkey-users?hl=en.

Reply via email to