Skip to content

fix: allow list, pause/off, custom filters and blocked counter - #13

Merged
AbrahamOP merged 1 commit into
mainfrom
fix/whitelist-pause-counter-filters
Sep 13, 2026
Merged

AbrahamOP merged 1 commit into
mainfrom
fix/whitelist-pause-counter-filters

Conversation

@AbrahamOP

Copy link
Copy Markdown
Owner

Bugs corrigés

Reproduits sur main dans Chromium 152 sans interface, avec l'extension chargée :

Bug Avant Après
Liste blanche : initiatorDomains ne correspond jamais à une page ouverte directement doubleclick bloqué sur un site autorisé, nettoyage visuel appliqué aucun blocage, aucun nettoyage visuel
Pause / OFF : les filtres perso sont des règles dynamiques qui ignoraient le toggle du ruleset filtre perso toujours actif en OFF retirés en OFF/pause, remis à la reprise
Filtres perso : une seule ligne invalide faisait échouer tout updateDynamicRules é → rien appliqué, anciennes règles gardées lignes invalides ignorées et listées dans le toast ; domaine/URL → ||host^
Compteur : onRuleMatchedDebug n'a jamais existé (pas de permission feedback) +2 à chaque chargement (masquages cosmétiques uniquement) badge = compteur natif Chrome par onglet ; popup = getMatchedRules de la page (activeTab)

Le total et le « Top domaines bloqués » sont supprimés : sans declarativeNetRequestFeedback (avertissement « lire l'historique »), l'extension ne peut pas les connaître. Les clés count/domainStats sont nettoyées à la mise à jour.

Tests

Banc CDP sur Chromium 152 : 17/17 (blocage par défaut, badge natif, liste blanche réseau + cosmétique, normalisation et rejet des filtres, OFF, ON, pause, popup, dashboard, aucune erreur console).

À valider à la main : clic sur l'icône → nombre de la page affiché dans le popup (le banc ne peut pas accorder activeTab).

- allow list: match the navigation itself (requestDomains + main_frame)
  instead of initiatorDomains, which never matched a directly opened
  page; cosmetic filtering now honours the allow list and the pause
- pause/off: custom filters are dynamic rules that ignored the ruleset
  toggle and kept blocking; they are now removed/re-added with it
- custom filters: bare domains and URLs become ||host^, invalid lines
  are dropped and reported in the dashboard instead of failing the
  whole update (capped at Chrome's 5000 unsafe dynamic rules)
- counter: onRuleMatchedDebug was never available (no feedback
  permission), so the total only counted cosmetic hides on each load.
  Use Chrome's native per-tab action count for the badge and
  getMatchedRules (activeTab) in the popup; drop the dead total and
  top-domains views and their stored keys
@AbrahamOP
AbrahamOP merged commit f14e05f into main Sep 13, 2026
1 check passed
@AbrahamOP
AbrahamOP deleted the fix/whitelist-pause-counter-filters branch September 13, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant