mirror of
https://codeberg.org/nobody/LocalCDN.git
synced 2025-06-05 21:49:31 +02:00
Fixed: Counter doesn't work (Chromium only) (#320)
This commit is contained in:
@@ -67,14 +67,21 @@ wrappers.setBadgeMissing = function (tabIdentifier, counter) {
|
||||
'tabId': tabIdentifier,
|
||||
'text': `${counter}`,
|
||||
});
|
||||
chrome.browserAction.setBadgeTextColor({
|
||||
'tabId': tabIdentifier,
|
||||
'color': 'black',
|
||||
});
|
||||
chrome.browserAction.setBadgeBackgroundColor({
|
||||
'tabId': tabIdentifier,
|
||||
'color': 'yellow',
|
||||
});
|
||||
if (BrowserType.FIREFOX) {
|
||||
chrome.browserAction.setBadgeTextColor({
|
||||
'tabId': tabIdentifier,
|
||||
'color': 'black',
|
||||
});
|
||||
chrome.browserAction.setBadgeBackgroundColor({
|
||||
'tabId': tabIdentifier,
|
||||
'color': 'yellow',
|
||||
});
|
||||
} else {
|
||||
chrome.browserAction.setBadgeBackgroundColor({
|
||||
'tabId': tabIdentifier,
|
||||
'color': 'red',
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
wrappers.defaultBadge = function (tabIdentifier, counter) {
|
||||
@@ -82,10 +89,12 @@ wrappers.defaultBadge = function (tabIdentifier, counter) {
|
||||
'tabId': tabIdentifier,
|
||||
'text': `${counter}`,
|
||||
});
|
||||
chrome.browserAction.setBadgeTextColor({
|
||||
'tabId': tabIdentifier,
|
||||
'color': wrappers.textColor
|
||||
});
|
||||
if (BrowserType.FIREFOX) {
|
||||
chrome.browserAction.setBadgeTextColor({
|
||||
'tabId': tabIdentifier,
|
||||
'color': wrappers.textColor
|
||||
});
|
||||
}
|
||||
chrome.browserAction.setBadgeBackgroundColor({
|
||||
'tabId': tabIdentifier,
|
||||
'color': wrappers.backgroundColor
|
||||
|
Reference in New Issue
Block a user