Hi,

I finally had an idea and found a solution to my problem : put my copy
to clipboard function in the unsafewindow object.

Here is the code :
unsafeWindow.copyToClipboard = function(texte) {
           try {
             GM_log("In copytoclipboard");

        
this.netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');

                   const gClipboardHelper = 
Components.classes["@mozilla.org/widget/
clipboardhelper;1"].
 
getService(Components.interfaces.nsIClipboardHelper);
                   gClipboardHelper.copyString(texte);
           } catch (e) {
                GM_log("Erreur sur copyToClipboard : " + e);
                prompt("Impossible de mettre dans le presse papier de windows.
Faites une copie avec Ctrl+C :", texte);
          }
}


Of course all of this should not be used for web sites that are not
100% sure in terms of security.

Hope it helps someone else.


Nicolas

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/greasemonkey-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to