summaryrefslogtreecommitdiff
path: root/functions.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2008-03-20 06:37:05 +0100
committerAndrew Dolgov <[email protected]>2008-03-20 06:37:05 +0100
commit9eeb9db8f13bde11d6baf6681d7ffff2171f9c88 (patch)
treebb4080b51c14df29a081c3d943f9517220f5af34 /functions.js
parente635d56a000032fcfb48e93aad58be367a3cfa8d (diff)
remove copyToClipboard (doesn't work)
Diffstat (limited to 'functions.js')
-rw-r--r--functions.js43
1 files changed, 0 insertions, 43 deletions
diff --git a/functions.js b/functions.js
index 2857072b7..9e38e45b0 100644
--- a/functions.js
+++ b/functions.js
@@ -1751,47 +1751,4 @@ function displayHelpInfobox(topic_id) {
return false;
}
-// http://www.dynamic-tools.net/toolbox/copyToClipboard/
-/*
-function copyToClipboard(s)
-{
- if( window.clipboardData && clipboardData.setData )
- {
- clipboardData.setData("Text", s);
- }
- else
- {
- // You have to sign the code to enable this or allow the action in about:config by changing
- user_pref("signed.applets.codebase_principal_support", true);
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
-
- var clip Components.classes['@mozilla.org/widget/clipboard;[[[[1]]]]'].createInstance(Components.interfaces.nsIClipboard);
- if (!clip) return;
-
- // create a transferable
- var trans = Components.classes['@mozilla.org/widget/transferable;[[[[1]]]]'].createInstance(Components.interfaces.nsITransferable);
- if (!trans) return;
-
- // specify the data we wish to handle. Plaintext in this case.
- trans.addDataFlavor('text/unicode');
-
- // To get the data from the transferable we need two new objects
- var str = new Object();
- var len = new Object();
-
- var str = Components.classes["@mozilla.org/supports-string;[[[[1]]]]"].createInstance(Components.interfaces.nsISupportsString);
-
- var copytext=meintext;
-
- str.data=copytext;
-
- trans.setTransferData("text/unicode",str,copytext.length*[[[[2]]]]);
-
- var clipid=Components.interfaces.nsIClipboard;
-
- if (!clip) return false;
-
- clip.setData(trans,null,clipid.kGlobalClipboard);
- }
-} */