Commit Graph

10098 Commits

Author SHA1 Message Date
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
Raymond Hill 89566bc397
[mv3] Further reduce the number of distinct generated scriptlets 2022-09-18 17:07:02 -04:00
Raymond Hill 35f4bdd113
Add `ext_ubol` to tokens recognized by the preparser
`ext_ubol` will evaluate to false in uBO, and true in uBO Lite.

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2268
2022-09-18 11:06:07 -04:00
Raymond Hill a411ccfaff
Make Firefox dev build auto-update 2022-09-18 09:45:27 -04:00
gorhill 9a71c303b3 Update build log file
Files changed:\nM	dist/chromium-mv3/log.txt
2022-09-18 13:38:43 +00:00
Raymond Hill ddc8ec59dd
New revision for dev build 2022-09-18 09:36:44 -04:00
Raymond Hill 154a71c658
Import translation work from https://crowdin.com/project/ublock 2022-09-18 09:36:13 -04:00
Raymond Hill 5ddd3aaac6
[mv3] More work toward improving declarative css/js injection 2022-09-18 09:31:44 -04:00
Imre Kristoffer Eilertsen 3ea8142d9e
Adding "LKA" for Sri Lanka and "NPL" for Nepal to IndianList's title (#3866)
* Added "LKA" for Sri Lanka to IndianList's title

* Added NPL for Nepal too

After seeing that IndianList already supports Nepal languages outright.
2022-09-18 07:17:45 -04:00
q1800 dc81aaf194
Update description-en.txt (#3873) 2022-09-18 07:16:57 -04:00
q1800 b32de13001
Update about.html (#3874) 2022-09-18 07:15:47 -04:00
q1800 706f3b21d7
Update settings.html (#3875) 2022-09-18 07:15:06 -04:00
Raymond Hill 65a0561072
Slightly change behavior of window-close-if scriplet
Related discussion:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/2270

If the argument to the window-close-if scriptlet is a regex, the
match will be against the whole location URL, otherwise the
match will be against the part+query part of the location URL.
2022-09-17 12:46:42 -04:00
Raymond Hill 9a8835a042
Make Firefox dev build auto-update 2022-09-17 11:36:11 -04:00
gorhill 5dc9114df2 Update build log file
Files changed:\nM	dist/chromium-mv3/log.txt
2022-09-17 15:27:44 +00:00
Raymond Hill a72aaab57b
New revision for dev build
Need to work on GitHub Actions to have releases specific to
mv3 package.
2022-09-17 11:24:28 -04:00
Raymond Hill 9058c3524e
[mv3] Fix improper usage of scripting.unregisterContentScripts()
THis was causing all registered css/scripts to be removed when revoking
permission for a single site.
2022-09-17 11:22:25 -04:00
Raymond Hill 3e1160db69
Make Firefox dev build auto-update 2022-09-17 08:50:47 -04:00
gorhill ac7f1ed103 Update build log file
Files changed:\nM	dist/chromium-mv3/log.txt
2022-09-17 12:39:07 +00:00
Raymond Hill 2f8df52804
New revision for dev build 2022-09-17 08:37:01 -04:00