1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-17 16:02:33 +01:00
uBlock/platform/mv3/extension/js
Raymond Hill 433adac6ff
[mv3] Add ability to handle entity-based CSS and scriptlet injection filters
This commit adds the ability to inject entity-based plain CSS
filters and also a set of the most commonly used entity-based
scriptlet injection filters.

Since the scripting API is not compatible with entity patterns,
the entity-related content scripts are injected in all documents
and the entity-matching is done by the content script themselves.

Given this, entity-based content scripts are enabled only when
working in the Complete filtering mode, there won't be any
entity-based filters injected in lower modes.

Also, since there is no way to reasonably have access to the
Public Suffix List in the content scripts, the entity-matching
algorithm is an approximation, though I expect false positives
to be rare (time will tell). In the event of such false
positive, simply falling back to Optimal mode will fix the
issue.

The following issues have been fixed at the same time:

Fixed the no-filtering mode related rules having lower priority
then redirect rules, i.e. redirect rules would still be applied
despite disabling all filtering on a site.

Fixed improper detection of changes to the generic-related CSS
content script, potentially causing undue delays when for example
trying to access the popup panel while working in Complete mode.
The scripting MV3 can be quite slow when registering/updating
large content scripts, so uBOL does its best to call the API only
if really needed, but there had been a regression in the recent
builds preventing uBO from properly detecting unchanged content
script parameters.
2022-10-20 15:48:06 -04:00
..
scripting [mv3] Add ability to handle entity-based CSS and scriptlet injection filters 2022-10-20 15:48:06 -04:00
about.js [mv3] Add ability to enable/disable filter lists 2022-09-13 17:44:24 -04:00
background.js [mv3] Handle permissions being revoked while uBOL is disabled 2022-10-18 08:48:31 -04:00
dashboard-common.js [mv3] Add ability to enable/disable filter lists 2022-09-13 17:44:24 -04:00
dashboard.js [mv3] Introduce per-site filtering modes in lieu of per-site toggle switch 2022-10-10 12:28:24 -04:00
dom.js [mv3] Add support for removeparam= filter option 2022-09-29 19:51:33 -04:00
ext.js [mv3] Add ability to enable/disable filter lists 2022-09-13 17:44:24 -04:00
fetch.js [mv3] Add support for specific cosmetic filtering 2022-09-15 13:14:08 -04:00
mode-manager.js [mv3] Add ability to handle entity-based CSS and scriptlet injection filters 2022-10-20 15:48:06 -04:00
popup.js [mv3] Add ability to handle entity-based CSS and scriptlet injection filters 2022-10-20 15:48:06 -04:00
ruleset-manager.js [mv3] Use navigator.languages instead of i18n.getAcceptLanguages 2022-10-17 08:13:48 -04:00
scripting-manager.js [mv3] Add ability to handle entity-based CSS and scriptlet injection filters 2022-10-20 15:48:06 -04:00
settings.js [mv3] Add support for redirect= filters 2022-10-16 12:05:24 -04:00
storage.js [mv3] Add ability to enable/disable filter lists 2022-09-13 17:44:24 -04:00
utils.js [mv3] General code review 2022-10-15 13:05:20 -04:00