From 3d31d79e02ace78aade3e0f73f2c7952ca85efc0 Mon Sep 17 00:00:00 2001 From: AbrahamOP Date: Sun, 13 Sep 2026 14:08:03 +0200 Subject: [PATCH 1/2] fix(popup): don't count allow-list matches as blocked requests 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). --- popup.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/popup.js b/popup.js index 5c2e13a..89e9633 100644 --- a/popup.js +++ b/popup.js @@ -1,3 +1,6 @@ +// Allow-list rules use dynamic ids from 20000 (DYNAMIC_ALLOW_START in background.js) +const ALLOW_RULE_MIN_ID = 20000; + document.addEventListener('DOMContentLoaded', () => { const toggleProtection = document.getElementById('toggle-protection'); const toggleCosmetic = document.getElementById('toggle-cosmetic'); @@ -70,7 +73,9 @@ document.addEventListener('DOMContentLoaded', () => { if (currentTabId !== null) { try { const { rulesMatchedInfo } = await chrome.declarativeNetRequest.getMatchedRules({ tabId: currentTabId }); - blockedCount.textContent = rulesMatchedInfo.length.toLocaleString(uiLang); + // On an allowed site every request matches the allowAllRequests rule: those aren't blocks. + const blocked = rulesMatchedInfo.filter(m => !(m.rule.rulesetId === '_dynamic' && m.rule.ruleId >= ALLOW_RULE_MIN_ID)); + blockedCount.textContent = blocked.length.toLocaleString(uiLang); } catch (err) { console.warn('getMatchedRules failed', err); } From 44263aae3337612de4cadcbb078f029ceab46ab0 Mon Sep 17 00:00:00 2001 From: AbrahamOP Date: Sun, 13 Sep 2026 14:08:03 +0200 Subject: [PATCH 2/2] chore(release): 1.4.1 --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 3e84f5b..560fa40 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "GoaBlockAD", - "version": "1.4.0", + "version": "1.4.1", "description": "__MSG_extDescription__", "default_locale": "en", "permissions": [