Repository navigation
fix(popup): don't count allow-list matches as blocked requests + 1.4.1 - #17
Merged
Merged
Conversation
On an allowed site every request matches the allowAllRequests rule and getMatchedRules returns those too, so the popup showed e.g. "7 blocked" while nothing was blocked and the badge stayed empty. Count only matches that aren't dynamic allow rules (ids from 20000).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug (v1.4.0)
Sur un site en liste blanche, rien n'est bloqué et le badge est vide, mais le popup affichait « 7 bloquées sur cette page ».
getMatchedRules({ tabId })renvoie aussi les correspondances de la règleallowAllRequestsde la liste blanche : le document principal et chaque requête de la page. Le popup les comptait comme des blocages.Correctif
Le popup ne compte plus les correspondances des règles d'autorisation (règles dynamiques à partir de l'id 20000,
DYNAMIC_ALLOW_START). Le chiffre du popup correspond de nouveau au badge natif de Chrome.Passage en 1.4.1 : le merge publie une release dont le zip est déjà allégé grâce à #16. C'est ce zip qu'il faut soumettre au store, plutôt que la 1.4.0.
Vérification
Banc CDP sur Chromium 152, avec un vrai clic simulé sur l'icône (
Extensions.triggerAction), qui accorde activeTab comme en usage réel :12/12 contrôles sur la branche, aucune erreur console.