Verified Commit 36f98848 authored by Thomas Rientjes's avatar Thomas Rientjes
Browse files

Improve menu entry title injection count logic

parent 75e1a861
......@@ -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
*/
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment