- },\r
- function()\r
- {\r
- window.netscape.security.PrivilegeManager.enablePrivilege( "UniversalXPConnect" );\r
-\r
- var clip = window.Components.classes[ "@mozilla.org/widget/clipboard;1" ]\r
- .getService( window.Components.interfaces.nsIClipboard );\r
- var trans = window.Components.classes[ "@mozilla.org/widget/transferable;1" ]\r
- .createInstance( window.Components.interfaces.nsITransferable );\r
- trans.addDataFlavor( "text/unicode" );\r
- clip.getData( trans, clip.kGlobalClipboard );\r
-\r
- var str = {}, strLength = {}, clipboardText;\r
- trans.getTransferData( "text/unicode", str, strLength );\r
- str = str.value.QueryInterface( window.Components.interfaces.nsISupportsString );\r
- clipboardText = str.data.substring( 0, strLength.value / 2 );\r
- return clipboardText;\r