[Greasemonkey] Including an external JS/GM script library

Lenny Domnitser ldrhcp at gmail.com
Fri May 26 14:28:34 EDT 2006


On 5/26/06, Philip Friedman - Auto Europe <philip at autoeurope.com> wrote:
> So, Is there a way to split GM scripts into multiple files and have one
> "include" another, but both be in the "safe sandbox" and both have access to
> GM_ functions?

There has been some promising-looking work on doing just that (Gareth
Andrew's GM imports
<http://www.mozdev.org/pipermail/greasemonkey/2005-September/005645.html>).

For now, if you're pulling the script from a guaranteed safe server,
like localhost, then you can use a combination of GM_xmlhttpRequest
and eval to run the code in the Greasemonkey sandbox.


More information about the Greasemonkey mailing list