async/await in popup code too
This commit is contained in:
parent
ee98034572
commit
54ccf5b9ec
1 changed files with 7 additions and 9 deletions
|
@ -98,15 +98,13 @@ const Logic = {
|
|||
});
|
||||
},
|
||||
|
||||
clearBrowserActionBadge() {
|
||||
getExtensionInfo().then(extensionInfo=>{
|
||||
browser.storage.local.get({browserActionBadgesClicked: []}).then(storage=>{
|
||||
async clearBrowserActionBadge() {
|
||||
const extensionInfo = await getExtensionInfo();
|
||||
const storage = await browser.storage.local.get({browserActionBadgesClicked: []});
|
||||
browser.browserAction.setBadgeBackgroundColor({color: ""});
|
||||
browser.browserAction.setBadgeText({text: ""});
|
||||
storage.browserActionBadgesClicked.push(extensionInfo.version);
|
||||
browser.storage.local.set({browserActionBadgesClicked: storage.browserActionBadgesClicked});
|
||||
}).catch(e=>{throw e;});
|
||||
}).catch(e=>{throw e;});
|
||||
},
|
||||
|
||||
refreshIdentities() {
|
||||
|
|
Loading…
Add table
Reference in a new issue