Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

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

Auditors: @bsclifton

Test Plan:
- Visit icloud.com with fingerprint enabled
- badge count should be 1
  • Loading branch information
NejcZdovc authored and bsclifton committed Mar 27, 2017
1 parent 6e5e05d commit 6a9cb8a
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 6a9cb8a

Please sign in to comment.