mirror of https://github.com/gorhill/uBlock.git
Make badge color consistent with filtering status
Related commit:
- 32508620a2
This commit is contained in:
parent
820d988fa9
commit
a72c068bcc
|
@ -812,7 +812,7 @@ if ( webext.browserAction instanceof Object ) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
vAPI.setDefaultIcon = function(flavor, badge) {
|
vAPI.setDefaultIcon = function(flavor, text) {
|
||||||
if ( browserAction.setIcon === undefined ) { return; }
|
if ( browserAction.setIcon === undefined ) { return; }
|
||||||
browserAction.setIcon({
|
browserAction.setIcon({
|
||||||
path: {
|
path: {
|
||||||
|
@ -820,7 +820,10 @@ if ( webext.browserAction instanceof Object ) {
|
||||||
'32': `img/icon_32${flavor}.png`,
|
'32': `img/icon_32${flavor}.png`,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
browserAction.setBadgeText({ text: badge });
|
browserAction.setBadgeText({ text });
|
||||||
|
browserAction.setBadgeBackgroundColor({
|
||||||
|
color: text === '!' ? '#FC0' : '#666'
|
||||||
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue