Right now, iOS's SelectorsPollerScript.js and brave-core's content_cosmetic.ts have a lot of duplicated code in common, especially related to procedural filtering as of https://github.com/brave/brave-core/pull/24688. If the iOS builds can use Typescript for the injections, we can import shared functionality from one set of .ts files as the single source of truth.
Additionally, much of the logic in AdBlockService is duplicated. Until iOS can use AdBlockService directly, the code can be broken out into a common AdBlockServiceBase or something similar, and exposed through an Objective-C wrapper.
(We run into bugs that stem from the lack of commonality between brave-core and iOS adblocking code extremely frequently so this is an important refactoring)
Right now, iOS's
SelectorsPollerScript.js
and brave-core'scontent_cosmetic.ts
have a lot of duplicated code in common, especially related to procedural filtering as of https://github.com/brave/brave-core/pull/24688. If the iOS builds can use Typescript for the injections, we can import shared functionality from one set of.ts
files as the single source of truth.Additionally, much of the logic in
AdBlockService
is duplicated. Until iOS can useAdBlockService
directly, the code can be broken out into a commonAdBlockServiceBase
or something similar, and exposed through an Objective-C wrapper.