aboutsummaryrefslogtreecommitdiffstats
path: root/lib/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/main.js')
-rw-r--r--lib/main.js18
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/main.js b/lib/main.js
index 9c42166..b7ac152 100644
--- a/lib/main.js
+++ b/lib/main.js
@@ -74,12 +74,15 @@ var messageHandler = exports.messageHandler = function messageHandler(
case "ChangeJSONURL":
libbz.changeJSONURL();
break;
+ // Needed because Panel is add-on module
case "OpenURLinPanel":
libbz.openURLInNewPanel(msg.data);
break;
+ // Needed because of tabs.open()
case "OpenURLinTab":
libbz.openURLInNewTab(msg.data);
break;
+ // Needed because Panel is add-on module
case "OpenStringInPanel":
libbz.openStringInNewPanel(msg.data);
break;
@@ -113,13 +116,7 @@ var messageHandler = exports.messageHandler = function messageHandler(
});
}
break;
- case "GetURL":
- libbz.getURL(msg.data.url,
- function(stuff) {
- worker.postMessage(new Message(msg.data.backMessage,
- stuff));
- });
- break;
+ // Needed because creating additional page-mods on remote bugzilla
case "OpenBugUpstream":
libbz.createUpstreamBug(msg.data.url, msg.data.subject,
msg.data.comment);
@@ -170,6 +167,13 @@ libbz.initialize(libbz.config, function() {
worker.on('message', function(msg) {
messageHandler(worker, msg);
});
+ worker.port.on('GetURL', function (command) {
+ libbz.getURL(command.url,
+ function(stuff) {
+ worker.port.emit(command.backMessage,
+ stuff);
+ });
+ });
}
});
});