[Greasemonkey] Explicit ID, Not Namespace

Gareth Andrew freega at freegarethandrew.org
Sun Mar 12 00:37:12 EST 2006


Hi Lenny, 

On Fri, 2006-02-24 at 14:41 -0600, Jeremy Dunck wrote:
> On 2/24/06, Lenny Domnitser <ldrhcp at gmail.com> wrote:
> > If the
> > name of the script changes, but it is still the "same" script, this
> > system breaks down.
> 
> I assume this is the real-world problem you're trying to address.

This problem has been discussed in a slightly different context recently
http://mozdev.org/pipermail/greasemonkey/2006-January/007368.html .  I'd
rather see this problem addressed using some of the solutions mentioned
in that thread ie. have GM_getValue have an some sort of ID parameter so
in this cases two scripts that were the same would use the same ID and
thus share the stored data.  

> ...
> > 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.
> ...
> 
> It does, however, introduce some complexity in the naming.  What do we
> show in the UI?  Or put another way, if the script name is driven to
> change, why wouldn't the ID?  Is it the same script?  Does a falling
> tree make sound if no one is listening?

The other problem is having two scripts that are the same (except for
filename) installed at the same time.  I agree with Jeremy that this
isn't solved by adding another ID and I think this is a more minor
problem and is really up to the user to solve.


Gareth
> 
> > 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.
> 
> Let's not have the old URI vs. URL debate, eh?  ;-)
> _______________________________________________
> Greasemonkey mailing list
> Greasemonkey at mozdev.org
> http://mozdev.org/mailman/listinfo/greasemonkey



More information about the Greasemonkey mailing list