Update browser button to reflect sitepolicy #564
Merged
+4
−1
Conversation
ceded49
into
ghostery:develop
1 check passed
1 check passed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Fact: You can set a Whitelist or Blacklist policy to have wildcards (*).
Question: What happens if you trust a site (vox.com) and restrict a wildcard (*.com) that conflicts?
Answer: According to
getSitePolicyinsrc/classes/Policy.jswe check and return the restrict criteria before the trust criteria. Therefore it will restrict the site. This is true even if we swap the trust/restrict policies.Conclusion: That is all fine and I am not changing any of the above facts.
I am changing the Browser Button Blue/Grey status to reflect the site policy. Previously it only checked whether the site was on the Whitelist and not whether it was also on the Blacklist. I have fixed this so the Browser Button correctly represents the Site Policy (and doesn't show grey if there is both a trust and restrict policy for the site).