Skip to content
GitLab
    • Why GitLab
    • Pricing
    • Contact Sales
    • Explore
  • Why GitLab
  • Pricing
  • Contact Sales
  • Explore
  • Sign in
  • Get free trial
  • Adblock incAdblock inc
  • ExtensionsExtensions
  • Adblock PlusAdblock Plus
  • adblockplusuiadblockplusui
  • Issues
  • #972

Switch to eyeo's Web Extension Ad Blocking Toolkit (EWE)

Background / User story

In preparation for switching the extension to Manifest v3, we first need to replace the core ad blocking related code that we imported in #884 (closed) and instead use the new web extension SDK. Therefore we need to add it as a dependency and integrate it into the extension by using its API.

Integration feedback/progress: https://docs.google.com/spreadsheets/d/1nvfdc3tHwoCxT0hKrYgNpL7LclGWC5AtwxSz8UYYplU/edit?usp=sharing

Note that webext-sdk includes its own adblockpluscore dependency, which may be a later version of adblockpluscore than the one we're removing as part of this issue.

What to change

  • Design: N/A
  • Research: N/A
  • Spec: N/A
  • Legal: N/A
  • Development:
    • Update webext-sdk dependency to TBD (verify that a tagged adblockpluscore version is used and that its CI pipeline succeeds).
    • Integrate ewe-api.js and ewe-content.js webext-sdk bundles into the extension.
    • Replace usage of adblockpluscore modules with EWE APIs.
    • Remove adblockpluscore dependency.
    • Remove unused/redundant adblockpluschrome files/bundles.
    • Remove unused preferences.
    • Check for integration changes that may be necessary, due to webext-sdk including an upgrade to the adblockpluscore dependency.
    • Update README accordingly.

Hints for testers

Apart from verifying that building, testing and using the extension works as expected:

  • Migration of user preferences and other user data when updating from an older version.

Due to the amount of changes, we may want to put additional focus on the following areas to ensure nothing broke:

  • Allowlisting (incl. how allowlisting filters are reflected in the UI)
  • Block element feature (incl. appropriate filters should be suggested, depending on whether/how the selected element/request/frame is allowlisted)
  • Developer tools panel
  • Recording filters and requests in issue reports
  • "Show useful notifications" option

Known issues:

  • #1057 (closed) - Snippet tests are skipped in webext child pipeline.
  • #1058 (closed) - Issue reporter doesn't include optional browser information.
  • #1060 (closed)
    • Requests may be counted or shown twice in issue reporter and in developer tools panel.
    • Page-specific allowlisting is broken.
    • Sitekey-based allowlisting is broken on Firefox.
    • Block element feature suggests filters in subframe even if parent frame is allowlisted.
    • "blockedTotalMin" and "blockedTotalMax" notification property may not work.
  • Some testpages tests are failing:
    • CSP Exception
    • WebRTC
    • WebSocket Exception
    • subscribes to a link
    • dir-string
    • strip-fetch-query-parameter

Partially implemented:

  • #1003 (closed) - Stopped reflecting filter updates in developer tools panel.
  • #1031 (closed) - Already reused filter preview functionality instead of applying element hiding filter to page immediately.

Hints for translators

N/A

Related SDK issues

Issue Description Status Impact1
eyeo/adblockplus/abc/adblockpluscore#353 (closed) Expose preferences: notifications ✓ high
https://gitlab.com/eyeo/webext/webext-sdk/-/issues/35 Expose content types ✓ low
https://gitlab.com/eyeo/webext/webext-sdk/-/issues/64 Notify of non-matched requests ✓ high
https://gitlab.com/eyeo/webext/webext-sdk/-/issues/67 Allow for detecting data corruption ✓ medium
https://gitlab.com/eyeo/webext/webext-sdk/-/issues/76 Support retrieving allowlisting filters for more content types ✓ medium
https://gitlab.com/eyeo/webext/webext-sdk/-/issues/78 Expose preferences: Acceptable Ads URLs ✓ low
https://gitlab.com/eyeo/webext/webext-sdk/-/issues/79 Ensure filters API integrity
see also https://gitlab.com/eyeo/webext/webext-sdk/-/issues/70
✓ high
https://gitlab.com/eyeo/webext/webext-sdk/-/issues/80 Expose content script API for hiding elements ✓ high
https://gitlab.com/eyeo/webext/webext-sdk/-/issues/82 Filter text not normalized ✓ high
https://gitlab.com/eyeo/webext/webext-sdk/-/issues/85 Expose filter match types ✓ medium
https://gitlab.com/eyeo/webext/webext-sdk/-/issues/86 Expose preferences: elemhide_debug ✓ medium
https://gitlab.com/eyeo/webext/webext-sdk/-/issues/93 Notify of subscriptions property changes ✓ low
https://gitlab.com/eyeo/webext/webext-sdk/-/issues/97 Missing filter hits ✓ high
https://gitlab.com/eyeo/webext/webext-sdk/-/issues/99 Missing filter hit types ✓ medium
https://gitlab.com/eyeo/webext/webext-sdk/-/issues/100 Missing filter hit docDomain ✓ low
  1. Estimated negative impact on product, if functionality is missing:

    • low: regression is limited to edge cases or to small user groups, or requires hacks based on SDK-internal implementation details
    • medium: regression breaks or reduces the reliability of a specific feature
    • high: regression breaks or reduces the reliablity of multiple features
    ↩
Edited Jan 19, 2022 by Thomas Greiner
Assignee
Assign to
Time tracking