1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-29 06:07:11 +02:00

Only update badge count when blocked

This commit is contained in:
Chris 2015-04-17 15:25:36 -06:00
parent 06a3526207
commit d5465d3159

View File

@ -464,9 +464,6 @@ vAPI.tabs.onPopup = function(details) {
if ( pageStore ) { if ( pageStore ) {
pageStore.logRequest(context, result); pageStore.logRequest(context, result);
} }
if ( µb.userSettings.showIconBadge ) {
µb.updateBadgeAsync(details.openerTabId);
}
// Not blocked // Not blocked
if ( µb.isAllowResult(result) ) { if ( µb.isAllowResult(result) ) {
@ -474,6 +471,9 @@ vAPI.tabs.onPopup = function(details) {
} }
// Blocked // Blocked
if ( µb.userSettings.showIconBadge ) {
µb.updateBadgeAsync(details.openerTabId);
}
// It is a popup, block and remove the tab. // It is a popup, block and remove the tab.
if(details.targetTabId !== "preempt") { if(details.targetTabId !== "preempt") {