Raymond Hill
067e128163
Patch google-ima shim script for proper integration into uBO
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2158
Additionally, added firing of CONTENT_RESUME_REQUESTED event in
start() method.
2022-09-11 11:03:47 -04:00
Raymond Hill
257100e921
Add missing i18n attribute
2022-09-11 09:09:31 -04:00
Emilio Cobos Álvarez
4044aa182a
element-picker: Declare we support both light and dark color-schemes. ( #3872 )
...
This fixes https://github.com/uBlockOrigin/uBlock-issues/issues/2240 and
should get the desired behavior regardless of browser.
Delay showing the iframe until load to prevent flashing a white
background on the initial about:blank.
2022-09-11 07:34:29 -04:00
Raymond Hill
3029c78a55
Redesign document-blocked page
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1681
The redesign is inspired by Brave's corresponding document-blocked
page.
2022-09-10 14:11:23 -04:00
Raymond Hill
60d1206215
Make popup panel reflect state of the actual blocked page
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1954
2022-09-10 11:55:19 -04:00
Raymond Hill
707609dc86
Do not set color-scheme CSS style in epicker for Firefox 106+
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2240
2022-09-10 10:07:16 -04:00
Raymond Hill
f806438de6
Unescaped escaped commas in regex-based removeparam values
...
Related discussion:
- https://github.com/uBlockOrigin/uAssets/discussions/14683#discussioncomment-3559284
2022-09-08 19:37:24 -04:00
Raymond Hill
224410a6f5
Add per-site on/off switch to mv3 experimental version
2022-09-07 10:15:36 -04:00
Raymond Hill
a559f5f271
Add experimental mv3 version
...
This create a separate Chromium extension, named
"uBO Minus (MV3)".
This experimental mv3 version supports only the blocking of
network requests through the declarativeNetRequest API, so as
to abide by the stated MV3 philosophy of not requiring broad
"read/modify data" permission. Accordingly, the extension
should not trigger the warning at installation time:
Read and change all your data on all websites
The consequences of being permission-less are the following:
- No cosmetic filtering (##)
- No scriptlet injection (##+js)
- No redirect= filters
- No csp= filters
- No removeparam= filters
At this point there is no popup panel or options pages.
The default filterset correspond to the default filterset of
uBO proper:
Listset for 'default':
https://ublockorigin.github.io/uAssets/filters/badware.txt
https://ublockorigin.github.io/uAssets/filters/filters.txt
https://ublockorigin.github.io/uAssets/filters/filters-2020.txt
https://ublockorigin.github.io/uAssets/filters/filters-2021.txt
https://ublockorigin.github.io/uAssets/filters/filters-2022.txt
https://ublockorigin.github.io/uAssets/filters/privacy.txt
https://ublockorigin.github.io/uAssets/filters/quick-fixes.txt
https://ublockorigin.github.io/uAssets/filters/resource-abuse.txt
https://ublockorigin.github.io/uAssets/filters/unbreak.txt
https://easylist.to/easylist/easylist.txt
https://easylist.to/easylist/easyprivacy.txt
https://malware-filter.gitlab.io/malware-filter/urlhaus-filter-online.txt
https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=1&mimetype=plaintext
The result of the conversion of the filters in all these
filter lists is as follow:
Ruleset size for 'default': 22245
Good: 21408
Maybe good (regexes): 127
redirect-rule= (discarded): 458
csp= (discarded): 85
removeparams= (discarded): 22
Unsupported: 145
The fact that the number of DNR rules are far lower than the
number of network filters reported in uBO comes from the fact
that lists-to-rulesets converter does its best to coallesce
filters into minimal set of rules. Notably, the DNR's
requestDomains condition property allows to create a single
DNR rule out of all pure hostname-based filters.
Regex-based rules are dynamically added at launch time since
they must be validated as valid DNR regexes through
isRegexSupported() API call.
At this point I consider being permission-less the limiting
factor: if broad "read/modify data" permission is to be used,
than there is not much point for an MV3 version over MV2, just
use the MV2 version if you want to benefit all the features
which can't be implemented without broad "read/modify data"
permission.
To locally build the MV3 extension:
make mv3
Then load the resulting extension directory in the browser
using the "Load unpacked" button.
From now on there will be a uBlock0.mv3.zip package available
in each release.
2022-09-06 13:47:52 -04:00
Raymond Hill
bcede6f938
Fix validating argument for :not() as procedural
...
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2228#issuecomment-1234248802
2022-09-01 09:42:48 -04:00
Raymond Hill
79451e5899
Force prodecural cosmetic filtering when explicitly stated
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2228
Using `#?#` (instead of `##` for a procedural cosmetic filter will
prevent uBO from trying to convert the filter into a declarative
one.
2022-08-31 13:57:39 -04:00
Raymond Hill
8f39a457b8
Fallback procedural :has() operator when argument is not a valid plain CSS selector
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2228
2022-08-23 16:36:22 -04:00
Raymond Hill
a24bc50e40
Fix deprecated matches-css-after/matches-css-before
2022-08-18 12:04:56 -04:00
Raymond Hill
7bc0b5d2bd
Extend matches-css() to support any pseudo-element
...
This commit deprecates matches-css-before() and matches-css-after(): these
should no longer be used once 1.45.0 is published and widespread. The
deprecated syntax will eventually be removed in some future.
The syntax of procedural operator matches-css() has been extended to also
be able to target pesudo elements. Examples:
Same as before:
example.com##p:matches-css(opacity: 0.5)
This is the new way to target an `::after` pseudo-element:
example.com##p:matches-css(after, content: Ads)
This is the new way to target a `::before` pseudo-element:
example.com##p:matches-css(before, content: Ads)
The new syntax also means any valid pseudo-element can now be used as
a target:
example.com##p:matches-css(first-letter, opacity: 0.5)
If the first argument does not match the pattern "property name: value",
then it will be deemed a pseudo-element to target, and the second argument
will be the "property name: value".
Related issue:
- https://github.com/AdguardTeam/ExtendedCss/issues/150
2022-08-18 11:28:44 -04:00
Raymond Hill
c521479ef9
Add 0.5s mp3 redirectable resource
...
Command used to generate 0.5s mp3 file:
ffmpeg -ar 48000 -t 0.5 -f s16le -acodec pcm_s16le -ac 2 -i /dev/zero -acodec libmp3lame -aq 4 noop-0.5s.mp3
Related filter issue:
- https://github.com/uBlockOrigin/uAssets/issues/14231
2022-08-14 13:06:00 -04:00
Raymond Hill
cd50f76e74
Fix static filtering parser's validation of selectors/styles
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2170#issuecomment-1207921464
2022-08-08 12:04:17 -04:00
Raymond Hill
b01d57ab63
Fix dark theme issue in DOM inspector
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2196
2022-08-04 10:52:09 -04:00
Raymond Hill
e2043b6554
Fix regression in handling of procedural cosmetic filters
...
Related commit:
- 91caed32d3
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2185#issuecomment-1193862432
2022-07-25 10:10:44 -04:00
Raymond Hill
91caed32d3
Improve conversion of procedural cosmetic filters into CSS rules
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2185#issuecomment-1193164728
2022-07-24 11:41:08 -04:00
Raymond Hill
40c315a107
Add new procedural cosmetic filter operator: :matches-media()
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2185
The argument must be a valid media query as documented on MDN, i.e.
what appears between the `@media` at-rule and the first opening
curly bracket (including the parentheses when required):
- https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries
Best practice:
Use `:matches-media()` after plain CSS selectors, if any.
Good:
example.com###target-1 > .target-2:matches-media((min-width: 800px))
Bad (though this will still work):
example.com##:matches-media((min-width: 800px)) #target-1 > .target-2
The reason for this is to keep the door open for a future optimisation
where uBO could convert `:matches-media()`-based filters into CSS media
rules injected declaratively in a user stylesheet.
2022-07-23 09:30:31 -04:00
Raymond Hill
9aeadee80a
Fix undue invalidation of pseudo element-based cosmetic filters
...
Regression from:
- 97befd116b
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2170
2022-07-18 10:27:59 -04:00
Raymond Hill
97befd116b
Better detect invalid cosmetic filters (revised)
...
Related commit:
- 19298fecf3
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2170
2022-07-17 12:42:48 -04:00
Raymond Hill
19298fecf3
Revert "Better detect invalid cosmetic filters"
...
This reverts commit a8ca5127c9
.
2022-07-15 21:49:05 -04:00
Raymond Hill
a8ca5127c9
Better detect invalid cosmetic filters
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2170
2022-07-15 13:35:56 -04:00
Raymond Hill
019f3f1739
Properly "bleed" 3p rules onto 3p-script/3p-frame cells
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2171
2022-07-15 12:00:43 -04:00
Raymond Hill
d00364860c
Ignore auto-repeat events in ctrl keydown event handler
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2145
2022-06-19 11:52:23 -04:00
Raymond Hill
93d499a918
Merge branch 'master' of https://github.com/rathann/uBlock into patch
2022-06-10 11:35:11 -04:00
Emilio Cobos Álvarez
51983afb0e
dom-inspector/element-picker: Ensure frame background is transparent.
...
This fixes the element picker on dark color-scheme websites on
Firefox Nightly and Chrome Canary at least, see:
* https://bugzilla.mozilla.org/show_bug.cgi?id=1771047
* https://github.com/w3c/csswg-drafts/issues/4772
This improves on the existing (not quite correct, was relying on a
Chromium bug) fix for Chromium browsers.
2022-06-01 21:27:38 +02:00
Dominik 'Rathann' Mierzejewski
798338e7fa
use WebAssembly-1.0 compliant function names
...
These functions were renamed in 2018, before the WebAssembly 1.0 spec
was finalized. wabt 1.0.25 dropped support for pre-1.0 names and the
sources fail to compile with errors like:
```
$ wat2wasm lz4-block-codec.wat
lz4-block-codec.wat:71:5: error: unexpected token get_local, expected ).
get_local $ilen
^^^^^^^^^
lz4-block-codec.wat:78:5: error: unexpected token get_local.
get_local $ilen
^^^^^^^^^
```
2022-05-22 17:34:12 +02:00
Raymond Hill
cef36518ed
Remove support deprecated "classic" popup panel
...
This will prevent spurious issues being opened about long
deprecated "classic" popup panel:
Related commit:
- b4911e2d7c
2022-05-08 10:58:15 -04:00
Raymond Hill
12e37aae54
Prevent CSS transform
on element picker layer
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2098
2022-04-28 09:55:52 -04:00
Raymond Hill
574a4e6263
Cache extracted compiled filter blocks in reverse lookup code
...
To avoid repeatedly extracting the blocks on subsequent lookups.
2022-04-25 12:26:59 -04:00
Raymond Hill
83d028ac7d
Report specific filter before generic one
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2092
Regression from:
- 72bb89495b
2022-04-25 09:49:31 -04:00
Raymond Hill
647431d9f1
Log excepted scriptlets unconditionally
...
Regression from:
- efe2e0c78a
2022-04-15 11:06:29 -04:00
Raymond Hill
93125a466a
Better highlight bad hostnames in static extended filters
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2080
2022-04-07 11:44:07 -04:00
Raymond Hill
22cd8c02e1
Prevent CSS filter
being applied on element picker
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2075
2022-04-04 09:17:28 -04:00
Raymond Hill
1423330703
Avoid using Element.classList in DOM surveyor
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/2076
2022-04-03 13:13:20 -04:00
Raymond Hill
dd5a93d477
Fix scriptlets not being reported in logger (Firefox)
...
Regression from:
- efe2e0c78a
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2072
2022-03-31 11:50:45 -04:00
Raymond Hill
efe2e0c78a
Improve logger accuracy re. reported injected scriptlet
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2072
2022-03-31 10:50:49 -04:00
Raymond Hill
0d6a459b60
Discard duplicate lines when merging imported directives
...
Related feedback:
- https://www.reddit.com/r/uBlockOrigin/comments/tqwl4s/import_of_the_reliable_sites/
2022-03-29 09:49:17 -04:00
Raymond Hill
3391435f75
Handle picture > source
elements
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2069
2022-03-28 12:11:18 -04:00
Raymond Hill
9d672fd3ed
Revert faulty lines in 6fcc278c59
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2066
2022-03-25 09:37:30 -04:00
Raymond Hill
18bc4dd8b8
Lower allowed minimum Expires directive to "12 hours" (from "1 day")
2022-03-24 13:23:24 -04:00
Raymond Hill
34cca8349b
Do not always convert removed stock list into imported list
...
If the removed stock list is labelled a "bad list", do not
convert it into an imported list.
This will allow to seamlessly merge resource-abuse stock list
with privacy stock list when 1.42.0 is widespread.
2022-03-18 13:27:07 -04:00
Raymond Hill
6fcc278c59
Support converting an existing list to enabled-by-default
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2056
2022-03-17 14:04:09 -04:00
myersg86
6573a59a59
Fix typos in README, docs, and JS comments
2022-03-13 08:56:26 -04:00
Raymond Hill
bc4f392a47
Use a better value to mark end of sequence of tokens
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2041
The value 0xFFFFFFFF will be used instead of 0 to mark the end of
a sequence of tokens, as the value 0xFFFFFFFF can't happen as a
result of computing a token hash, since the four most significant
bits are always 0 in a computed token hash.
2022-03-11 17:22:12 -05:00
Raymond Hill
7eb19c3a69
Drop more irrelevant entries from troubleshooting information
2022-02-23 15:41:03 -05:00
Raymond Hill
ad1800fbca
Add command to toggle cosmetic filtering
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2000
2022-02-22 08:44:09 -05:00
Raymond Hill
b2a5d28c96
Add support to right-click subscribe to subscribe.adblockplus.org/?location=...
...
Related feedback:
- https://www.reddit.com/r/uBlockOrigin/comments/ser2t7/new_feature_for_ublockorigin_clean_up_the_search/hx0ur81/
`
2022-02-16 15:17:22 -05:00