aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libbugzilla.js4
-rw-r--r--lib/main.js3
2 files changed, 7 insertions, 0 deletions
diff --git a/lib/libbugzilla.js b/lib/libbugzilla.js
index 600d193..bdcf8fb 100644
--- a/lib/libbugzilla.js
+++ b/lib/libbugzilla.js
@@ -204,6 +204,10 @@ exports.getClipboard = function getClipboard(cb) {
cb(clipboard.get());
};
+exports.setClipboard = function setClipboard(stuff) {
+ clipboard.set(stuff, "text");
+};
+
exports.getURL = function getURL(url, callback) {
Request({
url: url,
diff --git a/lib/main.js b/lib/main.js
index accaa0e..191391f 100644
--- a/lib/main.js
+++ b/lib/main.js
@@ -73,6 +73,9 @@ var messageHandler = exports.messageHandler = function messageHandler(worker, ms
worker.postMessage(new Message(msg.data, clipboard));
});
break;
+ case "SetClipboard":
+ libbz.setClipboard(msg.data);
+ break;
case "ChangeJSONURL":
libbz.changeJSONURL();
break;