Fixed: Counter doesn't work (Chromium only) (#320)

This commit is contained in:
nobody 2021-03-21 08:08:03 +01:00
parent df00b7ba77
commit 3db5008e35
No known key found for this signature in database
GPG Key ID: 8F6DE3D614FCFD7A
2 changed files with 22 additions and 12 deletions

View File

@ -67,6 +67,7 @@ wrappers.setBadgeMissing = function (tabIdentifier, counter) {
'tabId': tabIdentifier,
'text': `${counter}`,
});
if (BrowserType.FIREFOX) {
chrome.browserAction.setBadgeTextColor({
'tabId': tabIdentifier,
'color': 'black',
@ -75,6 +76,12 @@ wrappers.setBadgeMissing = function (tabIdentifier, counter) {
'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}`,
});
if (BrowserType.FIREFOX) {
chrome.browserAction.setBadgeTextColor({
'tabId': tabIdentifier,
'color': wrappers.textColor
});
}
chrome.browserAction.setBadgeBackgroundColor({
'tabId': tabIdentifier,
'color': wrappers.backgroundColor

View File

@ -35,6 +35,7 @@
<li>Fixed: Google Material Icons cannot be loaded (<a href="https://codeberg.org/nobody/LocalCDN/issues/316">#316</a>)</li>
<li>Updated: noUiSlider v14.6.3 -> v14.6.4 (<a href="https://codeberg.org/nobody/LocalCDN/issues/317">#317</a>)</li>
<li>Updated: highlight.js v10.6.0 -> v10.7.0 (<a href="https://codeberg.org/nobody/LocalCDN/issues/319">#319</a>)</li>
<li>Fixed: Counter doesn't work (Chromium only) (<a href="https://codeberg.org/nobody/LocalCDN/issues/320">#320</a>)</li>
</ul>
<div id="generator-section">
<div class="topic-label">