diff --git a/src/chrome/content/toolbar_button.js b/src/chrome/content/toolbar_button.js index de479999dba5..489073a0d297 100644 --- a/src/chrome/content/toolbar_button.js +++ b/src/chrome/content/toolbar_button.js @@ -181,21 +181,29 @@ httpsEverywhere.toolbarButton = { } // Make sure the list is up to date alist.populate_list(); - - var counter = 0; + + var totalCounter = 0; + for (var x in alist.all) { + ++totalCounter; + } + var activeCounter = 0; for (var x in alist.active) { if (!(x in alist.breaking)) { - ++counter; + ++activeCounter; } } for (var x in alist.moot) { if (!(x in alist.active)) { - ++counter; + ++activeCounter; } } - - toolbarbutton.setAttribute('rulesetsApplied', counter); - HTTPSEverywhere.log(INFO, 'Setting icon counter to: ' + counter); + if (totalCounter != activeCounter) { + var counterLabel = activeCounter + '/' + totalCounter; + } else { + var counterLabel = totalCounter; + } + toolbarbutton.setAttribute('rulesetsApplied', counterLabel); + HTTPSEverywhere.log(INFO, 'Setting icon counter to: ' + counterLabel); }, /**