Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/stats.js

Issue 29785558: Issue 6679 - Don't show block stats in icon if disabled (Closed)
Patch Set: Created May 18, 2018, 10:39 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/stats.js
diff --git a/lib/stats.js b/lib/stats.js
index 149a7b7a1445103539edc967858622fb6dd62bee..e11ed0b167923f5c6f3e8a6d162068ef674836df 100644
--- a/lib/stats.js
+++ b/lib/stats.js
@@ -46,10 +46,13 @@ browser.webNavigation.onCommitted.addListener(details =>
let page = new ext.Page({id: details.tabId});
let blocked = blockedPerPage.get(page);
- page.browserAction.setBadge(blocked && {
- color: badgeColor,
- number: blocked
- });
+ if (Prefs.show_statsinicon)
Thomas Greiner 2018/05/18 10:50:18 What about moving this entire if-statement into a
kzar 2018/05/18 12:25:30 Sure, I can do it that way if you like. Done.
+ {
+ page.browserAction.setBadge(blocked && {
+ color: badgeColor,
+ number: blocked
+ });
+ }
}
});
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld