1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-06 19:02:30 +01:00
Commit Graph

8 Commits

Author SHA1 Message Date
Raymond Hill
520f81fcca
[mv3] Fix injection of scriptlets into embedded contexts 2024-08-20 08:18:03 -04:00
Raymond Hill
be1f938c17
[mv3] Adjust as per changes in uBO base 2024-01-26 14:51:50 -05:00
Raymond Hill
a969a672e0
Change official description in source code top comment 2023-12-04 12:10:34 -05:00
Raymond Hill
6af4494946
[mv3] Honor scriptlets' target world in Firefox
When the target world of a scriptlet is the ISOLATED one,
skip Blob-based injection in Firefox, as the current world
is always the ISOLATED one. This should make ISOLATED
world-based scriptlets more reliable (i.e. execute sooner)
in Firefox.
2023-10-21 07:11:12 -04:00
Raymond Hill
b1f0c5b773
Typo 2023-08-19 19:56:00 -04:00
Raymond Hill
3d60d1bde4
Comment 2023-08-11 17:55:29 -04:00
Raymond Hill
bb41d9594f
[mv3] Use workaround to inject scriptlets in Firefox
Additionally:

Use `export UBO_VERSION=local` at the console to build MV3 extension using
current version of uBO code base. By default, the version is taken from
`./platform/mv3/ubo-version' and usually set to last stable release.
2023-08-11 13:22:25 -04:00
Raymond Hill
6dbbb95b04
[mv3] Mitigation: Inject CSS user styles to enforce cosmetic filtering
Related issues:
- https://github.com/uBlockOrigin/uBOL-issues/issues/5#issuecomment-1575425913
- https://github.com/w3c/webextensions/issues/403

Currently, there is no other way to inject CSS user styles than to
wake up the service worker, so that it can inject the CSS styles
itself using the `scripting.insertCSS()` method.

If ever the MV3 API supports injecting CSS user styles directly
from a content script, uBOL will be back to be fully declarative.

At this point the service worker is very lightweight since the
filtering is completely  declarative, so this is not too much of
an issue performance-wise except for the fact that waking up the
service worker for the sole purpose of injecting CSS user styles
and nothing else introduces a pointless overhead.

Hopefully the MV3 API will mature to address such inefficiency.
2023-06-04 11:32:55 -04:00