Commit graph

7 commits

Author SHA1 Message Date
Raymond Hill
df0d21d92e
[mv3] Avoid instantiating regexes by using simple needle first
Related issue:
https://github.com/uBlockOrigin/uBOL-home/issues/223
2025-12-27 09:45:25 -05:00
Raymond Hill
377cf9d86b
[mv3] Add support for regex-based extended filters
Related issues:
- https://github.com/uBlockOrigin/uBOL-home/issues/223
- https://github.com/uBlockOrigin/uAssets/issues/31261
2025-12-25 12:34:21 -05:00
Raymond Hill
a23561d79e
[mv3] Bypass cosmetic filtering when top context is set to no-filtering
Related issue:
https://github.com/uBlockOrigin/uBOL-home/issues/20

Specific cosmetic filtering will be bypassed when hostname of top context
matches an entry in the no-filtering set.

This doesn't completely solve the issue:
- The browser platform must support `document.location.ancestorOrigins`
- This solution can't be applied to scriptlets
2025-12-15 16:15:13 -05:00
Raymond Hill
0fb845d1ac
[mv3] Load specific cosmetic filtering data on-demand only
The cosmetic filtering data embedded in the content scripts has been
extracted in corresponding JSON files. When a list is enabled, the
corresponding cosmetic filtering data from the JSON files, if any, is
persisted into the extension's local storage.

The cosmetic filtering-related content scripts will load the data
from these JSON files on-demand only and matching cosmetic filters
will be extracted, then the result is cached in the session storage,
ensuring there is no longer a need to perform lookup for the rest
of the browser session.

As a result this further reduces the time to First Contentful Paint.

Related issue:
https://github.com/uBlockOrigin/uBOL-home/issues/557
2025-12-09 15:32:02 -05:00
Raymond Hill
0aa0d81caf
[mv3] Re-work specific cosmetic filtering-related content scripts
To minimize delay to First Contentful Paint. The idea is to avoid
complex data structures such as Map in order to speed up first content
script execution. Use stringified arrays where practical and
instanciate those arrays from their stringified representation only
when there are actual cosmetic filters to apply.

Related commit:
https://github.com/gorhill/uBlock/commit/6039ef2b6d
2025-12-05 08:54:34 -05:00
Raymond Hill
0b0294af4f
[mv3] Add support for custom CSS-based cosmetic filters
Related issue:
https://github.com/uBlockOrigin/uBOL-home/issues/325

This is a first version, with support only for custom filters which are
plain CSS selectors. Future versions will extend support to style-based
and procedural cosmetic filters.

Manually text-editing existing custom filters is currently not supported,
this will be added in a future version in the Develop pane. To remove
existing custom filters, the "Remove a custom filter" tool can be used.
2025-07-06 16:43:22 -04:00
Raymond Hill
a009623d97
[mv3] Improve generic cosmetic filtering
Specifically, properly exclude generic cosmetic filters according to
specific cosmetic exceptions.

Related issue:
https://github.com/uBlockOrigin/uBOL-home/issues/181
2025-03-13 13:15:27 -04:00