Skip to content

Commit

Permalink
Adds fingerprint and scripts to the lion badge count
Browse files Browse the repository at this point in the history
Resolves brave#7886

Auditors: @bsclifton

Test Plan:
- Visit icloud.com with fingerprint enabled
- badge count should be 1
  • Loading branch information
NejcZdovc committed Mar 26, 2017
1 parent 1465601 commit d645afe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/components/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,9 @@ class Main extends ImmutableComponent {
getTotalBlocks (frames) {
const ads = frames.getIn(['adblock', 'blocked'])
const trackers = frames.getIn(['trackingProtection', 'blocked'])
const blocked = (ads ? ads.size : 0) + (trackers ? trackers.size : 0)
const scripts = frames.getIn(['noScript', 'blocked'])
const fingerprint = frames.getIn(['fingerprintingProtection', 'blocked'])
const blocked = (ads ? ads.size : 0) + (trackers ? trackers.size : 0) + (scripts ? scripts.size : 0) + (fingerprint ? fingerprint.size : 0)

return (blocked.size === 0) ? false : ((blocked > 99) ? '99+' : blocked)
}
Expand Down

0 comments on commit d645afe

Please sign in to comment.