aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/clipboard.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/clipboard.js b/lib/clipboard.js
index 66bce69..bf77515 100644
--- a/lib/clipboard.js
+++ b/lib/clipboard.js
@@ -34,9 +34,6 @@
*
* ***** END LICENSE BLOCK ***** */
-var clipboard = Cc["@mozilla.org/widget/clipboard;1"].
- getService(Ci.nsIClipboard);
-
var setMethod = exports.setMethod = function setMethod(content, flavor) {
if (typeof(flavor) == "undefined") {
flavor = "plain";
@@ -47,6 +44,9 @@ var setMethod = exports.setMethod = function setMethod(content, flavor) {
}
flavor = flavor == "plain" ? "text/unicode", "text/html";
+ var clipboard = Cc["@mozilla.org/widget/clipboard;1"].
+ getService(Ci.nsIClipboard);
+
var str = Cc["@mozilla.org/supports-string;1"].
createInstance(Ci.nsISupportsString);
str.data = content;