Simplify new tab creation in the popup fixing issues. Fixes #781

This commit is contained in:
Jonathan Kingston
2017-09-01 12:27:40 -07:00
parent 65be77665a
commit df7d7f9c38
3 changed files with 2 additions and 26 deletions
@@ -17,10 +17,6 @@ const messageHandler = {
case "createOrUpdateContainer":
response = backgroundLogic.createOrUpdateContainer(m.message);
break;
case "openTab":
// Same as open-tab for index.js
response = backgroundLogic.openTab(m.message);
break;
case "neverAsk":
assignManager._neverAsk(m);
break;
@@ -83,18 +79,6 @@ const messageHandler = {
});
}
// Handles messages from sdk code
const port = browser.runtime.connect();
port.onMessage.addListener(m => {
switch (m.type) {
case "open-tab":
backgroundLogic.openTab(m.message);
break;
default:
throw new Error(`Unhandled message type: ${m.message}`);
}
});
browser.tabs.onActivated.addListener((info) => {
assignManager.removeContextMenu();
browser.tabs.get(info.tabId).then((tab) => {