Commit graph

10067 commits

Author SHA1 Message Date
Raymond Hill
990ad75ca8
Redirect non-existing operators to a void operator
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2292

This will prevent unexpected oversezealous blocking if ever
this happens again. The internal void operator will ensure
no blocking takes place and issue a note about non-existing
operator to the dev tools console.
2022-09-26 16:46:24 -04:00
Raymond Hill
a78bb0f8eb
Make Firefox dev build auto-update 2022-09-26 12:36:20 -04:00
Raymond Hill
7fe13cd2cb
new revision for dev build 2022-09-26 12:27:04 -04:00
Raymond Hill
9a31ac8076
Revert removal of matches-css-related filters
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2292

Related commit:
- a71b71e4c8
2022-09-26 12:23:13 -04:00
Raymond Hill
e29e760b43
Use higher resolution favicons
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2287
2022-09-26 10:18:24 -04:00
Raymond Hill
75f3d53a27
Make Firefox dev build auto-update 2022-09-26 10:06:56 -04:00
Raymond Hill
3d8599e0a1
New revision for dev build 2022-09-26 09:59:45 -04:00
Raymond Hill
59aa235952
Forbid relative selector at top level
Related commit:
- a71b71e4c8
2022-09-25 08:51:48 -04:00
Raymond Hill
6828e1c3b2
Bail out early if missing required argument 2022-09-25 06:57:51 -04:00
Raymond Hill
596145ceb9
Harden xml-prune scriptlet 2022-09-25 06:49:41 -04:00
Raymond Hill
3227d7f591
Make Firefox dev build auto-update 2022-09-24 21:06:17 -04:00
Raymond Hill
4bc2ba1cbe
New revision for dev build 2022-09-24 20:55:15 -04:00
Raymond Hill
770e467013
Merge branch 'master' of https://github.com/gorhill/uBlock 2022-09-24 20:54:02 -04:00
Raymond Hill
bf690145c4
Add new scriptlet: xml-prune
Related issue:
- https://github.com/uBlockOrigin/uAssets/issues/14849

Arguments:

1. Required. The selector of elements which are to be removed.
   Example: Period[id*="-roll-"][id*="-ad-"]

2. An optional selector that must have a match in the document
   for the pruning to occur. No selector means the pruning can
   be performed regardless.

3. An optional URL which must be a match for the pruning to
   occur. If left blank, the pruning can be performed regardless.
2022-09-24 20:49:00 -04:00
gorhill
482919e12b Update build log file
Files changed:\nM	dist/chromium-mv3/log.txt
2022-09-24 22:46:55 +00:00
Raymond Hill
f19fd391de
[mv3] Fix bad call in nostif 2022-09-24 18:43:15 -04:00
Raymond Hill
ffc46534ac
[mv3] Skip some regional lists for the time being 2022-09-24 18:36:28 -04:00
Raymond Hill
4755a6094e
[mv3] Add support for more scriplets: abort-on-property-write, no-settimeout-if 2022-09-24 18:22:44 -04:00
Raymond Hill
5c2e3afbed
Make Firefox dev build auto-update 2022-09-24 17:51:07 -04:00
Raymond Hill
ae653babb0
New revision for dev build 2022-09-24 17:42:02 -04:00
Raymond Hill
743210f5df
Fix incomplete parsing of nth-of-type() and some other pseudo-classes
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2284

Regression from:
- a71b71e4c8
2022-09-24 17:27:20 -04:00
Raymond Hill
07178e6416
Fix typo 2022-09-24 14:10:29 -04:00
gorhill
5b3bfc3275 Update build log file
Files changed:\nM	dist/chromium-mv3/log.txt
2022-09-24 16:37:06 +00:00
Raymond Hill
68154d3393
Make Firefox dev build auto-update 2022-09-24 12:31:20 -04:00
Raymond Hill
1d2cafd2b6
New revision for dev build 2022-09-24 12:23:42 -04:00
Raymond Hill
a7b5f5127f
[mv3] Do not include lists with empty ruleset 2022-09-24 12:23:01 -04:00
Raymond Hill
c698a9fcec
Fix overzealous validation of :style() arguments 2022-09-24 12:14:50 -04:00
Raymond Hill
f638da41d6
Import translation work from https://crowdin.com/project/ublock 2022-09-24 12:14:02 -04:00
Raymond Hill
d588f46a39
Import translation work from https://crowdin.com/project/ublock 2022-09-24 11:40:42 -04:00
Raymond Hill
966a157d19
[mv3] Add support for procedural cosmetic filtering 2022-09-24 11:33:04 -04:00
Raymond Hill
a71b71e4c8
New cosmetic filter parser using CSSTree library
The new parser no longer uses the browser DOM to validate
that a cosmetic filter is valid or not, this is now done
through a JS library, CSSTree.

This means filter list authors will have to be more careful
to ensure that a cosmetic filter is really valid, as there is
no more guarantee that a cosmetic filter which works for a
given browser/version will still work properly on another
browser, or different version of the same browser.

This change has become necessary because of many reasons,
one of them being the flakiness of the previous parser as
exposed by many issues lately:

- https://github.com/uBlockOrigin/uBlock-issues/issues/2262
- https://github.com/uBlockOrigin/uBlock-issues/issues/2228

The new parser introduces breaking changes, there was no way
to do otherwise. Some current procedural cosmetic filters will
be shown as invalid with this change. This occurs because the
CSSTree library gets confused with some syntax which was
previously allowed by the previous parser because it was more
permissive.

Mainly the issue is with the arguments passed to some procedural
cosmetic filters, and these issues can be solved as follow:

Use quotes around the argument. You can use either single or
double-quotes, whichever is most convenient. If your argument
contains a single quote, use double-quotes, and vice versa.

Additionally, try to escape a quote inside an argument using
backslash. THis may work, but if not, use quotes around the
argument.

When the parser encounter quotes around an argument, it will
discard them before trying to process the argument, same with
escaped quotes inside the argument. Examples:

Breakage:

    ...##^script:has-text(toscr')

Fix:

    ...##^script:has-text(toscr\')

Breakage:

    ...##:xpath(//*[contains(text(),"VPN")]):upward(2)

Fix:

    ...##:xpath('//*[contains(text(),"VPN")]'):upward(2)

There are not many filters which break in the default set of
filter lists, so this should be workable for default lists.

Unfortunately those fixes will break the filter for previous
versions of uBO since these to not deal with quoted argument.
In such case, it may be necessary to keep the previous filter,
which will be discarded as broken on newer version of uBO.

THis was a necessary change as the old parser was becoming
more and more flaky after being constantly patched for new
cases arising, The new parser should be far more robust and
stay robist through expanding procedural cosmetic filter
syntax.

Additionally, in the MV3 version, filters are pre-compiled
using a Nodejs script, i.e. outside the browser, so validating
cosmetic filters using a live DOM no longer made sense.

This new parser will have to be tested throughly before stable
release.
2022-09-23 16:03:13 -04:00
Raymond Hill
fe21ce5002
Ease load on EasyList server
Related discussion:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2276#issuecomment-1254387437
2022-09-22 05:52:47 -04:00
Raymond Hill
9764063db9
[mv3] Fix release name in GitHub Actions 2022-09-20 09:24:43 -04:00
Raymond Hill
b2b7ffee87
[mv3] Add English description
This will be used as reference "detailed description" and
for Chrome Web Store et al. description.
2022-09-20 09:01:10 -04:00
gorhill
8a9772bc42 Update build log file
Files changed:\nM	dist/chromium-mv3/log.txt
2022-09-20 12:53:10 +00:00
Raymond Hill
cfeac10c95
[mv3] Add support for abort-on-property-read scriptlet 2022-09-20 08:49:52 -04:00
Raymond Hill
70a0de9d00
[mv3] Mind trusted-site directives when registering content scripts 2022-09-20 08:24:01 -04:00
Raymond Hill
f374c05753
[mv3] Stick to int32 instead of 8-char hex strings for file hashes 2022-09-19 20:21:10 -04:00
gorhill
90f666fce8 Update build log file
Files changed:\nM	dist/chromium-mv3/log.txt
2022-09-19 15:55:57 +00:00
Raymond Hill
7116bf9a46
GitHub Actions stuff 2022-09-19 11:53:04 -04:00
Raymond Hill
749de482ee
GitHub Actions stuff 2022-09-19 11:31:04 -04:00
Raymond Hill
8eb2f4077a
Better action name 2022-09-19 11:11:07 -04:00
Raymond Hill
adb5d503d9
[mv3] Add GitHub action to build mv3 separately form uBO 2022-09-19 11:08:34 -04:00
Raymond Hill
6041757c3d
Make Firefox dev build auto-update 2022-09-19 09:10:31 -04:00
gorhill
f7cdac3ecd Update build log file
Files changed:\nM	dist/chromium-mv3/log.txt
2022-09-19 13:03:31 +00:00
Raymond Hill
8004e13a5a
New revision for dev build 2022-09-19 08:59:40 -04:00
Raymond Hill
4bd02c0fb6
[mv3] Inject specific cosmetic filters through scriptlet injection
This solves the following remaining issues regarding specific cosmetic
filtering:
- High rate of false positives in last build
- High number of generated content css files in the package
2022-09-19 08:55:45 -04:00
Raymond Hill
3f8f6d14ab
Make Firefox dev build auto-update 2022-09-18 17:30:45 -04:00
gorhill
6a8269b43a Update build log file
Files changed:\nM	dist/chromium-mv3/log.txt
2022-09-18 21:18:38 +00:00
Raymond Hill
66b1785fc2
New revision for dev build 2022-09-18 17:16:34 -04:00