Blocked counter broken in Manifest v3
Background information
Environment
- OS version: Ubuntu 22.04
- Browser version: Chrome 105
- Extension version: next (049a707d) - Manifest v3
- Last working version: next (049a707d) - Manifest v2
Steps to reproduce
- Add custom filter "adblockplus.org".
- Open tab and navigate to https://adblockplus.org.
Observed behavior
- Blocked counter in toolbar icon is hidden.
- Blocked counters in icon popup are at
0
.
Expected behavior
- Blocked counter in toolbar icon is shown.
- Blocked counters in icon popup show values larger than
0
.
Further information
This is because EWE's reporting.onBlockableItem
API hasn't been made compatible with Manifest v3 yet, and isn't expected to be fixed as part of EWE 0.7.0. Therefore we could try using Chrome's browser.declarativeNetRequest
API directly as a stopgap solution until we update to a version of EWE that fixes this problem.
Alternatively, we may be able to determine the amount of blocked requests by counting the number of errors due to failed requests.
What to do
One of our assumptions is that, while we've seen signs of overlap in ad blocking (e.g. issue reports, user support channels, etc.), this overlap should still be relatively small. Given this, as a temporary solution so that users still benefit from the counter feature, we should adjust the logic so that we can approximate how many items were blocked. Once a fix is provided with EWE, we will then use the more optimal solution.