Break my SDK code

This commit is contained in:
Jonathan Kingston
2017-06-20 18:48:19 +01:00
parent 0ec7e4aee3
commit 175cdc1a6b
4 changed files with 1451 additions and 1465 deletions
+7 -7
View File
@@ -265,6 +265,11 @@ const Logic = {
return Logic.userContextId(identity.cookieStoreId);
},
currentCookieStoreId() {
const identity = Logic.currentIdentity();
return identity.cookieStoreId;
},
sendTelemetryPayload(message = {}) {
if (!message.event) {
throw new Error("Missing event name for telemetry");
@@ -661,7 +666,7 @@ Logic.registerPanel(P_CONTAINER_INFO, {
const identity = Logic.currentIdentity();
browser.runtime.sendMessage({
method: identity.hasHiddenTabs ? "showTabs" : "hideTabs",
userContextId: Logic.currentUserContextId()
cookieStoreId: Logic.currentCookieStoreId()
}).then(() => {
window.close();
}).catch(() => {
@@ -753,12 +758,7 @@ Logic.registerPanel(P_CONTAINER_INFO, {
if (tab.active) {
tr.classList.add("clickable");
Logic.addEnterHandler(tr, () => {
browser.runtime.sendMessage({
method: "showTab",
tabId: tab.id,
}).then(() => {
window.close();
}).catch(() => {
browser.tabs.update(tab.id, {selected: true}).then(() => {
window.close();
});
});