1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-07-05 11:37:01 +02:00

Make badge color consistent with filtering status

Related commit:
- 32508620a2
This commit is contained in:
Raymond Hill 2023-03-18 12:16:20 -04:00
parent 820d988fa9
commit a72c068bcc
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -812,7 +812,7 @@ if ( webext.browserAction instanceof Object ) {
}
};
vAPI.setDefaultIcon = function(flavor, badge) {
vAPI.setDefaultIcon = function(flavor, text) {
if ( browserAction.setIcon === undefined ) { return; }
browserAction.setIcon({
path: {
@ -820,7 +820,10 @@ if ( webext.browserAction instanceof Object ) {
'32': `img/icon_32${flavor}.png`,
}
});
browserAction.setBadgeText({ text: badge });
browserAction.setBadgeText({ text });
browserAction.setBadgeBackgroundColor({
color: text === '!' ? '#FC0' : '#666'
});
};
}