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

Unified Diff: lib/stats.js

Issue 29530598: Issue 5588 - Explicitly clear badge text on tab update (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Created Aug. 29, 2017, 8:48 p.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
===================================================================
--- a/lib/stats.js
+++ b/lib/stats.js
@@ -29,16 +29,23 @@
/**
* Gets the number of requests blocked on the given page.
*
* @param {Page} page
* @return {Number}
*/
exports.getBlockedPerPage = page => blockedPerPage.get(page) || 0;
+// Chrome automatically clears the browser action badge text when the URL of
+// the tab is updated, but Firefox doesn't.
Sebastian Noack 2017/08/29 23:07:01 Please refer to the Firefox bug here. If there isn
Wladimir Palant 2017/08/30 08:13:30 I filed a bug: https://bugzilla.mozilla.org/show_b
Manish Jethani 2017/08/30 10:30:35 Done.
+ext.pages.onLoading.addListener(page =>
+{
+ page.browserAction.setBadge();
+});
+
FilterNotifier.on("filter.hitCount", (filter, newValue, oldValue, page) =>
{
if (!(filter instanceof BlockingFilter) || !page)
return;
Prefs.blocked_total++;
let blocked = blockedPerPage.get(page) || 0;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld