[Greasemonkey] Feature suggestion: Control script order

Henrik Nyh henrik at nyh.se
Sat Sep 9 19:08:54 EDT 2006


Hullo,

Please let me know if this has been discussed before; I couldn't find 
mention of it.

I would suggest for the extension developers to add some way of 
specifying in what order userscripts should be loaded, when several 
scripts apply to the same page.

If I e.g. have one script A that adds some kind of link to Google, and 
another script B that does something with all links on Google, I would 
probably want to ensure that A is run before B.

One suggestion for how to express this in scripts is metadata like
// @name	B
// @namespace	http://henrik.nyh.se
// @after	http://henrik.nyh.se/A
// @after	http://henrik.nyh.se/Aardvark

Circular references are obviously possible, but they could be handled - 
simply ignored, or only respecting the wishes of the oldest of the 
scripts, or whatever makes most sense.

What do you think?

-- 
Henrik Nyh
http://henrik.nyh.se


More information about the Greasemonkey mailing list