mirror of
https://codeberg.org/nobody/LocalCDN.git
synced 2025-06-05 21:49:31 +02:00
Chromium: Badge color for missing resources (#1031)
This commit is contained in:
@@ -82,11 +82,6 @@ wrappers.setIcon = function (details, type) {
|
||||
wrappers.setBadgeColoring = function (tabId, value) {
|
||||
let textColor, backgroundColor;
|
||||
|
||||
if (chrome.browserAction.setBadgeBackgroundColor === undefined ||
|
||||
chrome.browserAction.setBadgeTextColor === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (value === BadgeSettingHTMLFilter.TYPE) {
|
||||
textColor = wrappers.badgeHTMLfilterTextColor;
|
||||
backgroundColor = wrappers.badgeHTMLFilterBackgroundColor;
|
||||
@@ -100,12 +95,17 @@ wrappers.setBadgeColoring = function (tabId, value) {
|
||||
return;
|
||||
}
|
||||
|
||||
chrome.browserAction.setBadgeTextColor({
|
||||
'tabId': tabId,
|
||||
'color': textColor
|
||||
});
|
||||
chrome.browserAction.setBadgeBackgroundColor({
|
||||
'tabId': tabId,
|
||||
'color': backgroundColor
|
||||
});
|
||||
if (chrome.browserAction.setBadgeTextColor !== undefined) {
|
||||
chrome.browserAction.setBadgeTextColor({
|
||||
'tabId': tabId,
|
||||
'color': textColor
|
||||
});
|
||||
}
|
||||
|
||||
if (chrome.browserAction.setBadgeBackgroundColor !== undefined) {
|
||||
chrome.browserAction.setBadgeBackgroundColor({
|
||||
'tabId': tabId,
|
||||
'color': backgroundColor
|
||||
});
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user