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
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
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
@scriptlet prevent-dialog
@description
Programmatically close `dialog` elements.
@param [selector]
Optional. The dialog element must matches `dialog{selector}` for the
prevention to take place.
@usage:
example.com##+js(prevent-dialog)
- Make place for more dynamic regex-based rules when there is a
risk session regex-based rules could interfere
- Do not prune `allow` strict-block rules as they do not contribute
toward the overall regex-based rule count
Possibly related issue:
https://github.com/uBlockOrigin/uBOL-home/issues/556