|
Script Summary:
Checks for updated versions of user scripts that request it, and notifies the user of their existence. Version: 0.3 |
this script has 6 topics, 45 posts |
this script has 1 review |
||||||||||||||||||||||||||||
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:





