[Greasemonkey] GreaseMonkeyed.com - Script Repository

Aaron Boodman zboogs at gmail.com
Tue Jul 19 08:38:37 EDT 2005


I see what you're asking.

The way to do it would be:

GM_xmlhttpRequest({method:"GET",url:"http://foo/bar.user.js",onload:function(details)
{
  window.eval(details.responseText);
}});

Adding a <script> node to the DOM wouldn't work -- that script would
not be able to see GM_* functions.

-- 
Aaron

On 7/19/05, Godmar Back <godmar at gmail.com> wrote:
> Good - however, will those scripts then have access to the GM_ you
> insert in the sandbox or will they again use the content window as
> their global object?
> 
> If the latter, it seems that it might be worth supporting non-local GM
> scripts alongside locally stored GM scripts (?)
> 
>  - Godmar
> 
> On 7/19/05, Aaron Boodman <zboogs at gmail.com> wrote:
> > > Is this possible with the current setup - maybe doing something like
> > > document.write("<SCRIPT src='http://.....' .... " from within the part
> > > that is stored in the GM script directory?)
> >
> > Yes. JavaScript allows cross-domain scripting this way, unrelated to
> > Greasemonkey or Greasemonkeyed.
> >
> > - a
> > _______________________________________________
> > Greasemonkey mailing list
> > Greasemonkey at mozdev.org
> > http://mozdev.org/mailman/listinfo/greasemonkey
> >
> _______________________________________________
> Greasemonkey mailing list
> Greasemonkey at mozdev.org
> http://mozdev.org/mailman/listinfo/greasemonkey
>


More information about the Greasemonkey mailing list