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

Issue 29532772: Issue 5588 - Clear badge text only if zero hits (Closed)

Created:
Aug. 31, 2017, 5:46 p.m. by Manish Jethani
Modified:
Aug. 31, 2017, 6:44 p.m.
Base URL:
https://hg.adblockplus.org/adblockpluschrome/
Visibility:
Public.

Description

Issue 5588 - Clear badge text only if zero hits Chrome dispatches the loading event after the page has already started getting hits. If the stats module clears the text at this time, it can remain cleared if all the hits have already been counted. This behavior can be observed by opening a new tab and quickly typing the URL and hitting Enter. If the page has only one hit, it'll be cleared from the badge. Since the blockedPerPage map should return null for a page that is just starting to load, we check the value here. This solution works for both Firefox and Chrome.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -1 line) Patch
M lib/stats.js View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 4
Manish Jethani
Aug. 31, 2017, 5:46 p.m. (2017-08-31 17:46:08 UTC) #1
Manish Jethani
Patch Set 1 Chrome dispatches the loading event after the page has already started getting ...
Aug. 31, 2017, 5:53 p.m. (2017-08-31 17:53:43 UTC) #2
Wladimir Palant
LGTM
Aug. 31, 2017, 6:21 p.m. (2017-08-31 18:21:43 UTC) #3
Sebastian Noack
Aug. 31, 2017, 6:40 p.m. (2017-08-31 18:40:35 UTC) #4
LGTM

Powered by Google App Engine
This is Rietveld