code review

pull/2/head
gorhill 10 years ago
parent eb42375215
commit dbe14694c8

@ -10,7 +10,7 @@
},
"browser_action": {
"default_icon": {
"19": "img/browsericons/icon19-off.png"
"19": "img/browsericons/icon19-19.png"
},
"default_title": "µMatrix",
"default_popup": "popup.html"

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

Loading…
Cancel
Save