From 40a7136e0946f1f9d938fd65e0f416cd3455413f Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Wed, 2 Mar 2011 13:37:39 +0100 Subject: Add unknown PCI ID to the clipboard. --- lib/libbugzilla.js | 4 ++++ lib/main.js | 3 +++ 2 files changed, 7 insertions(+) (limited to 'lib') 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; -- cgit