[Greasemonkey] Explicit ID, Not Namespace

Matt Sargent matt.sargent at earthlink.net
Fri Feb 24 15:25:34 EST 2006


Neophyte coders using other scripts as templates would not know to change 
an ID, thereby inadvertently overlaying a script. Changing the name and/or 
namespace is more intuitive.

As it currently stands, when I update a script, I just retain the same file name, 
and put the version info in the description.

On 24 Feb 2006 at 15:23, Lenny Domnitser wrote:

> Proposal:
> 
> GM currently creates IDs for user scripts based on the namespace and
> name, and uses these IDs for installation (so there is only one copy
> of each script) and for stored data (GM_getValue/GM_setValue). If the
> name of the script changes, but it is still the "same" script, this
> system breaks down.
> 
> Scripts should be able to specify IDs instead of namespaces, and then
> leave the name as merely descriptive metadata, like the description.
> This ID would be a URI, just like the namespace is, but it is specific
> to the script, not to a collection of scripts.
> 
> This would look like:
> 
> // ==UserScript==
> // @name          Some script
> // @description   Does stuff
> // @id            tag:example.org,2006:someScript
> // @include       http://example.com/*
> // ==/UserScript==
> [...]
> 
> This system is backward compatible with the current method. If the @id
> metadata tag is missing, an ID can be generated from the
> namespace/name.
> 
> Creating IDs shouldn't be tedious: the ID can be the URL where the
> script is originally published, although tag URIs (RFC 4151) are
> probably a better idea, and they are really easy to generate.
> 
> Comments?
> _______________________________________________
> Greasemonkey mailing list
> Greasemonkey at mozdev.org
> http://mozdev.org/mailman/listinfo/greasemonkey
> 




More information about the Greasemonkey mailing list