[Greasemonkey] Access netscape.xxx objects?
Luca
lucafbb at gmail.com
Tue May 2 21:56:39 EDT 2006
Hi all list, I'm near new in greasemonkey devel, and I found a big problem
that I want to resolve (of course) but first of all I want to understand the
meaning of this error.
I looked google for a while, but I found nothing!
I must create a script to enable the clipboard accesso from firefox. I use
code like this:
netscape.security.PrivilegeManager.enablePrivilege( 'UniversalXPConnect'
> );
> this.clipboardstring.data = text;
> var transfer = Components.classes['@
> mozilla.org/widget/transferable;1'].createInstance(
> Components.interfaces.nsITransferable );
> ...
I get an error on the first line. In a normal js script, firefox ask me if I
want to use this rescricted code and the work normally. If I use this in a
gm script, I get an error immediatly that say me that netscape is not
defined.
1) How to correct this?
2) Why I cant use those objects in a gm script?
More information about the Greasemonkey
mailing list