1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-05 18:49:39 +02:00
uBlock/platform/mv3/extension/js/scripting
Raymond Hill 72726a4759
[mv3] Refactor content scripts related to specific cosmetic filtering
Specifically, avoid long list of hostnames for the `matches`
property[1] when registering the content scripts, as this was causing
whole browser freeze for long seconds in Chromium-based browsers
(reason unknown).

The content scripts themselves will sort out which cosmetic filters to
apply on which websites.

This change makes it now possible to support annoyances-related lists,
and thus two lists have been added:
- EasyList -- Annoyances
- EasyList -- Cookies

Related issue:
- https://github.com/uBlockOrigin/uBOL-issues/issues/5

These annoyances-related lists contains many thousands of specific
cosmetic filters and as a result, before the above change this was
causing long seconds of whole browser freeze when simply modifying
the blocking mode of a specific site via the slider in the popup
panel.

It is now virtually instantaneous, at the cost of injecting larger
cosmetic filtering-related content scripts (which typically should
be garbage-collected within single-digit milliseconds).

Also, added support for entity-based cosmetic filters. (They were
previously discarded).

---

[1] https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/scripting/RegisteredContentScript
2023-06-03 22:08:42 -04:00
..
css-declarative.js [mv3] Refactor content scripts related to specific cosmetic filtering 2023-06-03 22:08:42 -04:00
css-generic.js Create a MVP version of uBOLite for Firefox 2023-04-07 10:19:43 -04:00
css-procedural.js [mv3] Refactor content scripts related to specific cosmetic filtering 2023-06-03 22:08:42 -04:00
css-specific.js [mv3] Refactor content scripts related to specific cosmetic filtering 2023-06-03 22:08:42 -04:00