Merge pull request #60 from tophf/show-badge-fix

Actually use the show-badge preference
This commit is contained in:
Jason Barnabe 2015-03-06 20:10:48 -06:00
commit eb9cc20d58

View File

@ -13,7 +13,7 @@ function webNavigationListener(method, data) {
getStyles({matchUrl: data.url, enabled: true, asHash: true}, function(styleHash) {
chrome.tabs.sendMessage(data.tabId, {method: method, styles: styleHash});
// Don't show the badge for frames
if (data.frameId == 0) {
if (data.frameId == 0 && prefs.getPref("show-badge")) {
chrome.browserAction.setBadgeText({text: getBadgeText(Object.keys(styleHash)), tabId: data.tabId});
}
});