Commit Graph

11276 Commits

Author SHA1 Message Date
Raymond Hill 4ddfb3f278
[mv3] Add more specific purposed annoyances-related lists
Import country flag-related code from uBO.

Switch to AdGuard annoyance-related lists, as this solves
https://github.com/uBlockOrigin/uBOL-issues/issues/5#issuecomment-1583192594
2023-06-11 09:20:10 -04:00
Raymond Hill 1f3e5da32d
New revision for dev build 2023-06-11 09:18:21 -04:00
Raymond Hill aa507924f3
Inform when filter lists are reloaded in logger
Related discussion:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2041#issuecomment-1585685791
2023-06-10 11:54:24 -04:00
Raymond Hill 2f0132c414
Import translation work from https://crowdin.com/project/ublock 2023-06-09 10:41:29 -04:00
Raymond Hill 103bdb63c5
Use hard tabs 2023-06-09 08:02:29 -04:00
Raymond Hill 5e46978b8c
Update `contentURL` of NLD
Related discussion:
- https://github.com/uBlockOrigin/uAssets/discussions/17919
2023-06-09 07:59:43 -04:00
Raymond Hill 257cfad90d
Update `assets.json` for uBO 1.50.0
This may cause some list namesw to not be rendered in a quirky
way in Chromium-based browsers due to country flags emojis not
being available, but this will fixed once people move to
uBO 1.50.0.

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2645

References:
- https://en.wikipedia.org/wiki/Regional_indicator_symbol
2023-06-07 10:31:46 -04:00
Raymond Hill 69a7ff1bc3
New revision for stable release 2023-06-07 10:28:25 -04:00
Raymond Hill 500d4ebe39
Import translation work from https://crowdin.com/project/ublock 2023-06-06 13:54:30 -04:00
Raymond Hill 1ad7410077
[mv3] Fine tune various portions of code 2023-06-06 13:42:22 -04:00
Raymond Hill f282b43550
[mv3] Move hostname label to top of popup panel
Related commit in uBO:
- b8cfa382e8

Additionally, render internationalized domain names in pretty Unicode
instead of ugly punycode.
2023-06-06 09:04:21 -04:00
Raymond Hill 5874312b35
[mv3] Avoid String.replace() to safely replace templates
String.replace() has side effects which are unwelcomed when
replacing template scriplets with code.
2023-06-05 20:17:50 -04:00
Raymond Hill 7e712246a9
[mv3] Let the scriplet sort out targeted sites when too many targets
This is too avoid `matches` property with too many hostnames at
registerContentScripts() time. Threshold has been arbitrarily
set at 100.
2023-06-05 12:14:37 -04:00
gorhill d300f2119a Update build log file
Files changed:
M	dist/mv3/log.txt
2023-06-05 13:32:38 +00:00
Raymond Hill 6d9bef28ff
[mv3] Fix issue with updateContentScripts API and other fixes
Avoid using updateContentScripts() as it suffers from an unexpected
behavior, causing injected content scripts to lose proper order
at injection time. The order in which content scripts are injected
is key for uBOL content scripts. Potential out of order injection
was causing cosmetic filtering to be broken.

Use actual storage API to persist data across service worker
wake-ups and browser launches. uBOL was trying to avoid using
storage API, at the cost of somewhat hacky code (using DNR API
to persist settings).

Make use of session storage if available, to speed up
initialization of waking up the service worker (which at this
point is necessary to properly implement cosmetic filtering).
2023-06-05 09:15:59 -04:00
Raymond Hill 666cbd143d
Make Firefox dev build auto-update 2023-06-05 09:01:35 -04:00
Raymond Hill 580166f60c
New revision for dev build 2023-06-05 08:52:59 -04:00
Raymond Hill f8c4b8e52d
Add support to remove attributes in xml-prune scriptlet
Related issue:
- https://github.com/uBlockOrigin/uAssets/issues/18244
2023-06-05 08:51:20 -04:00
gorhill 9801093117 Update build log file
Files changed:
M	dist/mv3/log.txt
2023-06-04 15:46:39 +00: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
gorhill e16bd1bbbb Update build log file
Files changed:
M	dist/mv3/log.txt
2023-06-04 02:12:03 +00:00
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
gorhill ec230be331 Update build log file
Files changed:
M	dist/mv3/log.txt
2023-06-02 21:14:01 +00:00
Raymond Hill b163097399
[mv3] Extend scriplet filtering support to all scriptlets
Source code of scriplets is now fetched directly from uBO
project, so there is no longer the need to keep duplicate
versions of scriplet code.

All scriplet filters are now supported.
2023-06-02 17:04:15 -04:00
Raymond Hill cb9a91d43c
Fix comment 2023-06-01 08:56:42 -04:00
Raymond Hill 569465b393
Make Firefox dev build auto-update 2023-06-01 08:56:06 -04:00
Raymond Hill 0198d84f4a
New revision for release candidate 2023-06-01 08:49:54 -04:00
Raymond Hill 40141e2dfc
Fix assembling of scriptlets for isolated world 2023-06-01 08:48:27 -04:00
Raymond Hill 9b682dff03
Make Firefox dev build auto-update 2023-05-30 09:21:37 -04:00
Raymond Hill f3b720d532
Improve `href-sanitizer` scriptlet 2023-05-30 09:13:46 -04:00
Raymond Hill 848c539a57
New revision for release candidate 2023-05-30 08:49:03 -04:00
Raymond Hill 56e1d92dbd
Fix/improve scriptlets
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2678
- https://github.com/uBlockOrigin/uAssets/issues/18278
2023-05-30 08:38:35 -04:00
Raymond Hill 996bf0925d
Make Firefox dev build auto-update 2023-05-29 15:11:44 -04:00
Raymond Hill c8c7ccdf80
New revision for release candidate 2023-05-29 15:06:14 -04:00
Raymond Hill 2a3a796d33
Minor fix 2023-05-29 15:05:50 -04:00
Raymond Hill 36346117ae
Make Firefox dev build auto-update 2023-05-29 15:01:24 -04:00
Raymond Hill bbfad4eda2
New revision for release candidate 2023-05-29 14:54:38 -04:00
Raymond Hill a1a3477b07
Fix oversight in last commit 2023-05-29 14:54:13 -04:00
Raymond Hill 9f5697c047
Make Firefox dev build auto-update 2023-05-29 14:46:34 -04:00
Raymond Hill a63e52b987
New revision for release candidate 2023-05-29 14:38:25 -04:00
Raymond Hill c8de904191
Add `evaldata-prune` scriptlet
Related issue:
- https://github.com/uBlockOrigin/uAssets/issues/18278
2023-05-29 14:37:02 -04:00
Raymond Hill 86d67e3f3e
Make Firefox dev build auto-update 2023-05-29 09:46:31 -04:00
Raymond Hill 5a242f462c
New revision for release candidate 2023-05-29 09:37:50 -04:00
Raymond Hill c642541cc4
Minor fine tuning 2023-05-29 07:34:54 -04:00
Raymond Hill f8a2a67cdf
Make Firefox dev build auto-update 2023-05-28 15:11:00 -04:00
Raymond Hill b11208c010
New revision for dev build 2023-05-28 14:57:49 -04:00
Raymond Hill 3ee3275dc1
Harden `addEventListener` scriptlet 2023-05-28 14:56:31 -04:00
Raymond Hill c7ddb2501b
Make Firefox dev build auto-update 2023-05-28 13:00:57 -04:00
Raymond Hill 252ea890ef
New revision for release candidate 2023-05-28 12:48:22 -04:00
Raymond Hill fa9fdc0922
Import translation work from https://crowdin.com/project/ublock 2023-05-28 12:47:41 -04:00