[Greasemonkey] How to create a library.

John Plsek gm at plsek.id.au
Thu Sep 8 14:20:46 EDT 2005


Robert G. Werner wrote:

>I would prefer to have the import in each of my scripts rather than
>specifiy it in the library and have all my scrips suddenly able to
>access it (I guess namespaces would help with this but why polute teh
>name space with a lib if I"m not going to use it at all).
>
>  
>
That's actually the way my tinkering in 0.4.x did it

GM_library(), returned an array of available libraries
GM_library("namespace/name") would "import" the library - it was a 
little more involved than that IIRC, but I haven't even looked at it 
since GM 0.5.x came out

the scripts were "marked" as library by using @library instead of @name 
(same as turnabout), @includes and @excludes were also honoured

John


More information about the Greasemonkey mailing list