Bill
how would you do for the first suggestion? Is this "pasting" the
external script code inside the current GM script or is there a coolest
way to do?
I just tried the GM_xmlhttpRequest approach from Philip but in my case
it did not work as the "eval" seems not to return.
Thanks
Best regards
/Stefano
Bill Donnelly wrote:
> The easiest way to do it without having to worry about any complexity and
> such would be to just read the library file and insert it into the
> injected
> script right before injection. The only "problem" with this is that the
> code would have multiple instances, which is only a "memory space thing".
> They would all be sandboxed, so it wouldn't matter that there were
> multiple
> instances of the library code. (not optimal, but it would be easy, and
> would work)
>
> Alternately, I was thinking on a way to treat each library as an
> object, with
> each function a method of that object, with Gm being the (initial)
> link between
> the scripts and calls to the object methods, since there would be a
> timing issue
> of when the library was injected itself and available for calls.
>
> So, initially, when you make a call to the object method, you might
> actually
> get "caught" by Gm, which would finish the call once the library code
> (object)
> was available, and would then modify the calling script's object value
> so that
> calls to the methods would be direct after that. This may or may not
> work or
> be viable or optimal, I was just mulling it over.
>
> I think with anything other than my first idea, you have to be careful
> because
> of security concerns and the like, which makes implementation more
> complex.
>
> Unless someone has already worked out something better that I don't
> remember.
>
> _______________________________________________
> Greasemonkey mailing list
>
Greasemonkey@...
>
http://mozdev.org/mailman/listinfo/greasemonkey_______________________________________________
Greasemonkey mailing list
Greasemonkey@...
http://mozdev.org/mailman/listinfo/greasemonkey