From 3805f12e17ad00ff9e2c702eddd15703900a67ae Mon Sep 17 00:00:00 2001 From: groovecoder Date: Mon, 15 May 2017 16:22:35 -0500 Subject: [PATCH] Logic.clearBrowserActionBadge method --- webextension/js/popup.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/webextension/js/popup.js b/webextension/js/popup.js index c079c09..a8fcf99 100644 --- a/webextension/js/popup.js +++ b/webextension/js/popup.js @@ -65,8 +65,7 @@ const Logic = { init() { // Remove browserAction "upgraded" badge when opening panel - browser.browserAction.setBadgeBackgroundColor({color: ""}); - browser.browserAction.setBadgeText({text: ""}); + this.clearBrowserActionBadge(); // Retrieve the list of identities. this.refreshIdentities() @@ -92,6 +91,11 @@ const Logic = { }); }, + clearBrowserActionBadge() { + browser.browserAction.setBadgeBackgroundColor({color: ""}); + browser.browserAction.setBadgeText({text: ""}); + }, + refreshIdentities() { return browser.runtime.sendMessage({ method: "queryIdentities"