|
@ -142,13 +142,11 @@ return asyncJobManager; |
|
|
var updateBadge = function(tabId) { |
|
|
var updateBadge = function(tabId) { |
|
|
delete tabIdToTimer[tabId]; |
|
|
delete tabIdToTimer[tabId]; |
|
|
|
|
|
|
|
|
var pageStore = this.pageStoreFromTabId(tabId); |
|
|
|
|
|
if ( pageStore === null ) { |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var iconId = null; |
|
|
var iconId = null; |
|
|
var badgeStr = ''; |
|
|
var badgeStr = ''; |
|
|
|
|
|
|
|
|
|
|
|
var pageStore = this.pageStoreFromTabId(tabId); |
|
|
|
|
|
if ( pageStore !== null ) { |
|
|
var total = pageStore.perLoadAllowedRequestCount + |
|
|
var total = pageStore.perLoadAllowedRequestCount + |
|
|
pageStore.perLoadBlockedRequestCount; |
|
|
pageStore.perLoadBlockedRequestCount; |
|
|
if ( total ) { |
|
|
if ( total ) { |
|
@ -157,6 +155,7 @@ return asyncJobManager; |
|
|
iconId = greenSize < squareSize/2 ? Math.ceil(greenSize) : Math.floor(greenSize); |
|
|
iconId = greenSize < squareSize/2 ? Math.ceil(greenSize) : Math.floor(greenSize); |
|
|
badgeStr = this.formatCount(pageStore.distinctRequestCount); |
|
|
badgeStr = this.formatCount(pageStore.distinctRequestCount); |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
vAPI.setIcon(tabId, iconId, badgeStr); |
|
|
vAPI.setIcon(tabId, iconId, badgeStr); |
|
|
}; |
|
|
}; |
|
|