Skip to content

Conversation

Godzilaa
Copy link

@Godzilaa Godzilaa commented Oct 6, 2025

Task/Issue URL:
Use matchCosmeticFilters from adblocker library #568

Description:

This PR implements the extended control feature for cosmetic filters in autoconsent that allows matching and injecting filters in
separate steps. The implementation introduces new methods to match cosmetic filters separately from their injection, providing users
with more granular control over which filters get applied. This enhancement allows for custom filtering logic, alternative injection
methods, and better debugging capabilities while maintaining backward compatibility with existing functionality.

Steps to test this PR:

  1. Ensure dependencies are installed: npm install
  2. Run TypeScript compilation to verify the implementation: npx tsc --noEmit
  3. Run the build process to make sure everything compiles correctly: npm run prepublish
  4. Test the functionality by verifying that cosmetic filters continue to work as expected in the browser extension
  5. Confirm that the new API functions (matchCosmeticFilters and injectCosmeticFilters) are available and operate correctly
  6. Verify that the legacy getCosmeticStylesheet function still works as before for backward compatibility
  7. Run any existing tests to ensure no regressions were introduced

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