1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-24 19:33:01 +01:00

Safari shows integers only over the toolbar icon

This commit is contained in:
Deathamns 2014-10-19 14:35:03 +02:00
parent 0886f7e886
commit 7af9805296

View File

@ -460,7 +460,13 @@ PageStore.prototype.updateBadge = function() {
var iconStr = ''; var iconStr = '';
if ( µb.userSettings.showIconBadge && netFiltering && this.perLoadBlockedRequestCount ) { if ( µb.userSettings.showIconBadge && netFiltering && this.perLoadBlockedRequestCount ) {
iconStr = µb.utils.formatCount(this.perLoadBlockedRequestCount); // Safari knows numbers only, 0 (zero) means empty badge
if (vAPI.safari) {
iconStr = this.perLoadBlockedRequestCount;
}
else {
iconStr = µb.utils.formatCount(this.perLoadBlockedRequestCount);
}
} }
vAPI.setIcon(this.tabId, iconPaths, iconStr); vAPI.setIcon(this.tabId, iconPaths, iconStr);
}; };