SelfUpdaterExample

By ScroogeMcPump Last update Nov 21, 2008 — Installed 102 times. Daily Installs: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Script Summary:
This script does nothing on its own - except keep itself updated!
Recently Updated TopicsPosts
Off topic (us.o script guid...1

this script has 1 topic, 1 post

This script has no reviews.

This script is intended as a template; if you follow these instructions, and include the code from this script in your own scripts, your scripts will periodically (at an interval configured by the user, or, if not configured, specified as a default within the script) connect to one or more predefined locations, looking for more recent versions of itself; and, if one is found, it will offer to redirect the user to the new version's location, thereby triggering the standard Greasemonkey script installer.

The design goals for this were to create a self-updater routine that:

  • works in Firefox 3.

  • is more compact and less complex than the User Script Updates script. (I'm not sure I succeeded on that second point, but this script is half the size of that one - and half of this one is this documentation!)

  • is self-contained, i.e., doesn't require the installation of a second script to get the updating functionality.

  • leverages the existing method of specifying script metadata, as opposed to requiring that such data be duplicated in a JavaScript object.

If you do use this within your own script, I would appreciate knowing about it, so I can link to your script here.