Extra caution is recommended when installing recently uploaded/updated scripts (read more)
Be sure you trust any scripts you install
User Script Updates
Checks for updated versions of user scripts that request it, and notifies the user of their existence.
Description
Checks for updated versions of user scripts that request it, and notifies the user of their existence.
Screenshot
How to use User Script Updates
User Script Updates works through script objects, which are JavaScript objects with the following required properties:
- name: script name
- namespace: script namespace
- identifier: location of the script (.user.js)
- version: script version, in "a.b.c..." format
- date: date the script was last updated (JavaScript timestamp, i.e. (new Date()).getTime())
and the following optional properties:
- description: script description
- source: script homepage
Technically, only one of version and date is required, but including both makes version checking easier for me. If these properties seem familiar, that's good: name, namespace, and description are ==UserScript== metadata, and identifier, date, and source are defined in the Dublin Core.
Note that all data in the script object should be duplicated exactly in the ==UserScript== metadata, with date being an exception (it should be ISO yyyy-mm-dd format in the metadata and a timestamp in the object). If in doubt, refer to this user script for an example.
Once you have the script object, wait for the window to load and then pass it as the only argument to window.UserScriptUpdates.requestAutomaticUpdates, where window is the unwrapped/unsafe JavaScript-accessible window. User Script Updates will confirm that the user wants to check for automatic updates. Then, when you update your script, update the metadata and the script object, and place a copy of the new script at the URL pointed to by "identifier". User Script Updates will find it and inform the user. That's it! Again, refer to this user script if you are unsure of what to do.
Happy coding!
Changelog
* **0.3 (2006-06-20)**
** Improved: notification shows "above" framesets
* **0.2 (2005-12-07)**
** Fixed: removed testing code
* **0.1 (2005-12-07)**
** original release
Known Updating Scripts
At this time, the following scripts are known to update automatically:
|
|
M0rph3u5: the script still works, at least for me. Richard: All the scripts I develop use yours for updates. Thank you very much. If you ever care to update the list of scripts that use your, here is the list: |
|
|
dunno it aint showin on grease mokey user script commands :( for me |
|
|
is this script still working? |
|
|
i can't make updates to my scripts...
it donesn't updates nothing :ยด( |
|
|
I like that I can use this to add all the URLs for the scripts I've installed, but I wish that doing so were a bit easier. Perhaps a keyboard shortcut for adding the URLs? I know it's not meant to be used this way, but I prefer to use it this way so I'm ensured I'll get the updates whenever they come in :$ |
|
|
Also compatible with Google i&Search Dark + Enhancements (http://userscripts.org/scripts/show/12917); ENJOY! |
|
|
I removed support for this from my script. I have seen no proof that it works, so I removed the useless code |
|
|
Just a thought... is there anyway to set it up to only check for updates once every two weeks or so? |
|
|
i was wondering if anyone could help me using this script functionality, i think i did it right but the script isn't detecting any new version even if there is... the script: http://userscripts.org/scripts/show/8938 |
|
|
The script called: digg - add mirrors, is also said to be compatible with this script. (http://userscripts.org/scripts/show/7585) |
|
|
I believe that I got my script to support it too. |
|
|
My script, which adds mirror links to articles on Digg.com (http://userscripts.org/scripts/show/8262) now supports your script as well. Too bad you're not actively updating your script. It would have been nice to have more features in it, like custom interval-based update checks. |
|
|
To the author: Why do you require people who want to automatically update to add the var SCRIPT { ... }; to their script? Why not just make a parser function that parses the meta data alone? |
|
|
I've enabled my Wordpress Linker script at http://userscripts.org/scripts/show/9421 to work with this script updater. |
|
|
Updated my script A Re Modified MySpace to work with this script. At least I think I did it right. |
|
|
I wish all the scripts on here were supported by this :p |
|
|
this scrip is pretty good but is there any way of getting it to work on every script? i've started using script updater and this does work for all scripts. when will it work on more than tha 5 scripts above? what gives? |
|
|
This is a marvelous idea, and it seems like you did a fantastic job. However, I am a little concerned with security considering the updates depend on unsafeWindow for transferring data between scripts. What is preventing a malicious website from grabbing that data and manipulating it to direct the user to install an even more malicious user script? Is there some way to load the data in a shared object that is only accessible by greasemonkey scripts? Maybe a hash that is the same throughout all greasemonkey user scripts, but is not accessible via a website's javascript? |
|
|
Nyks: Users should install this, but scripts have to be modified by their authors to take advantage of the added functionality. Daniel: The script has to run every time in order to register the "Check Now" command and the update API. I haven't done any short circuit optimization (apologies for the lack of comments), but if the script is slowing things down for you then I'll look into it. I don't really want to make it a full extension because of the dependence on Greasemonkey, but I'd certainly be willing to integrate it into GM. Everyone: I'll update my list when I have a little more time to also clean up the HTML. |
|
|
I updated my script to use UserScriptUpdates if it is available, but it really concerns me having this big heavy script running on *EVERY* request. I tried to quickly review the code to see how quickly it would short circuit if there was nothing to do, but there was a *lot* of uncommented code there. Did you do much short circuit optimization? Have you given any though to making this a native extension so it wouldn't have to be executed on every request but rather always remain resident?
|
|
|
I updated my script GoogleSecure for this. Very cool. http://userscripts.org/scripts/show/5951 |
|
|
VERY COOL SCRIPT! TIP:From userscripts.org, Right-Click the Greasemonkey icon and go to the <u>User Script Commands</u> menu; you now have the option to Check For Updates Now |
|
|
oh thank the maker ; D |
|
|
Did I correctly understood this, that only script-coding people should use your sourcecode for their own scripts?
|
|
|
This is really awesome! My Scripts - http://userscripts.org/scripts/show/1072 , http://userscripts.org/scripts/show/7332 , http://userscripts.org/scripts/show/7333 and http://userscripts.org/scripts/show/688 use this script. All of my active scripts will use this facility. Thank you! |
You could comment on this script if you were logged in.
