diff --git a/core/state-manager.js b/core/state-manager.js index ca88281aa184e9b17fe89d6a0b9513c8f77f044f..dc543ca60d39f179f0c950621a1264c706211f74 100644 --- a/core/state-manager.js +++ b/core/state-manager.js @@ -133,12 +133,13 @@ stateManager._updateTab = function (details) { return; } - if (stateManager.showIconBadge === true) { + chrome.browserAction.setTitle({ + 'tabId': tabIdentifier, + 'title': 'Decentraleyes' + }); - wrappers.setBadgeText({ - 'tabId': tabIdentifier, - 'text': '' - }); + if (stateManager.showIconBadge === true) { + stateManager._clearBadgeText(tabIdentifier); } if (stateManager.tabs[tabIdentifier]) { @@ -170,14 +171,18 @@ stateManager._handleStorageChanged = function (changes) { } }; -stateManager._removeIconBadgeFromTab = function (tab) { +stateManager._clearBadgeText = function (tabIdentifier) { wrappers.setBadgeText({ - 'tabId': tab.id, + 'tabId': tabIdentifier, 'text': '' }); }; +stateManager._removeIconBadgeFromTab = function (tab) { + stateManager._clearBadgeText(tab.id); +}; + /** * Initializations */