[Greasemonkey] adding a "global" javascript function

Jeremy Dunck jdunck at gmail.com
Thu Oct 13 10:06:21 EDT 2005


On 10/13/05, Ilia K. <mail4ilia at gmail.com> wrote:
> What kind of "bad things" script can do
> throgh unsafeWindow and can't do with regular window and how it's
> related to gresemonkey?

I don't have time for a proper reply, but the basic thing is that the
general security model assumes 2 parties, and the user script is a
third party.

> It seems like the following line will save me from this "safety":
> window=unsafeWindow; // we can now use window exactly as before

Yes, but don't do that; it's there for a reason.  :)

> Are there any other such surprises with XPCNativeWrapper?

http://developer.mozilla.org/en/docs/XPCNativeWrapper

I'll try to give a better answer later...


More information about the Greasemonkey mailing list