In Vivaldi setBadgeText must follow setBadgeBackgroundColor

This commit is contained in:
tophf 2017-03-29 13:11:46 +03:00
parent 3876ffc671
commit db8526b50b

View File

@ -105,10 +105,10 @@ function updateIcon(tab, styles) {
// e.g. 'windowPosition' pref updated in edit.js::window.onbeforeunload // e.g. 'windowPosition' pref updated in edit.js::window.onbeforeunload
if (!chrome.runtime.lastError) { if (!chrome.runtime.lastError) {
const text = prefs.get('show-badge') && numStyles ? String(numStyles) : ''; const text = prefs.get('show-badge') && numStyles ? String(numStyles) : '';
chrome.browserAction.setBadgeText({text, tabId: tab.id});
chrome.browserAction.setBadgeBackgroundColor({ chrome.browserAction.setBadgeBackgroundColor({
color: prefs.get(disableAll ? 'badgeDisabled' : 'badgeNormal') color: prefs.get(disableAll ? 'badgeDisabled' : 'badgeNormal')
}); });
chrome.browserAction.setBadgeText({text, tabId: tab.id});
} }
}); });
} }