Bootstrapify extension to work for Firefox Nightly 57 SDK removal. Fixes #725

This commit is contained in:
Jonathan Kingston
2017-08-13 21:49:57 +01:00
parent 78b5de3b44
commit d685a58d74
10 changed files with 150 additions and 1002 deletions
+7 -2
View File
@@ -150,13 +150,18 @@ const Logic = {
},
async identity(cookieStoreId) {
const identity = await browser.contextualIdentities.get(cookieStoreId);
return identity || {
const defaultContainer = {
name: "Default",
cookieStoreId,
icon: "default-tab",
color: "default-tab"
};
// Handle old style rejection with null and also Promise.reject new style
try {
return await browser.contextualIdentities.get(cookieStoreId) || defaultContainer;
} catch(e) {
return defaultContainer;
}
},
addEnterHandler(element, handler) {