Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(78)

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

Can't Edit
Can't Publish+Mail
Start Review
Created:
2 years, 5 months ago by Manish Jethani
Modified:
2 years, 5 months ago
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
2 years, 5 months ago (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 ...
2 years, 5 months ago (2017-08-31 17:53:43 UTC) #2
Wladimir Palant
LGTM
2 years, 5 months ago (2017-08-31 18:21:43 UTC) #3
Sebastian Noack
2 years, 5 months ago (2017-08-31 18:40:35 UTC) #4
LGTM
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 87257f5