1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-04 01:59:38 +02:00
Commit Graph

8571 Commits

Author SHA1 Message Date
Raymond Hill
43cb63f80a
Fix parsing of queryprune=* in static filtering parser 2020-11-23 08:47:29 -05:00
Raymond Hill
b48f9b8ba4
Import translation work from https://crowdin.com/project/ublock 2020-11-23 08:33:57 -05:00
Raymond Hill
d97d7a8483
New revision for dev build 2020-11-23 08:31:22 -05:00
Raymond Hill
bde3164eb4
Add support for 1P, 3P, header= filter options and other changes
New filter options
==================

Strict partyness: `1P`, `3P`
----------------------------

The current options 1p/3p are meant to "weakly" match partyness, i.e. a
network request is considered 1st-party to its context as long as both the
context and the request share the same base domain.

The new partyness options are meant to check for strict partyness, i.e. a
network request will be considered 1st-party if and only if both the context
and the request share the same hostname.

For examples:

- context: `www.example.org`
- request: `www.example.org`
- `1p`: yes, `1P`: yes
- `3p`: no,  `3P`: no

- context: `www.example.org`
- request: `subdomain.example.org`
- `1p`: yes, `1P`: no
- `3p`: no,  `3P`: yes

- context: `www.example.org`
- request: `www.example.com`
- `1p`: no, `1P`: no
- `3p`: yes,  `3P`: yes

The strict partyness options will be visually emphasized in the editor so as
to prevent mistakenly using `1P` or `3P` where weak partyness is meant to be
used.

Filter on response headers: `header=`
-------------------------------------

Currently experimental and under evaluation. Disabled by default, enable by
toggling `filterOnHeaders` to `true` in advanced settings.

Ability to filter network requests according to whether a specific response
header is present and whether it matches or does not match a specific value.

For example:

    *$1p,3P,script,header=via:1\.1\s+google

The above filter is meant to block network requests which fullfill all the
following conditions:

- is weakly 1st-party to the context
- is not strictly 1st-party to the context
- is of type `script`
- has a response HTTP header named `via`, which value matches the regular
  expression `1\.1\s+google`.

The matches are always performed in a case-insensitive manner.

The header value is assumed to be a literal regular expression, except for
the following special characters:

- to anchor to start of string, use leading `|`, not `^`
- to anchor to end of string, use trailing `|`, not `$`
- to invert the test, use a leading `!`

To block a network request if it merely contains a specific HTTP header is
just a matter of specifying the header name without a header value:

    *$1p,3P,script,header=via

Generic exception filters can be used to disable specific block `header=`
filters, i.e. `@@*$1p,3P,script,header` will override the block `header=`
filters given as example above.

Dynamic filtering's `allow` rules override block `headers=` filters.

Important: It is key that filter authors use as many narrowing filter options
as possible when using the `header=` option, and the `header=` option should
be used ONLY when other filter options are not sufficient.

More documentation justifying the purpose of `header=` option will be
provided eventually if ever it is decided to move it from experimental to
stable status.

To be decided: to restrict usage of this filter option to only uBO's own
filter lists or "My filters".

Changes
=======

Fine tuning `queryprune=`
-------------------------

The following changes have been implemented:

The special value `*` (i.e. `queryprune=*`) means "remove all query
parameters".

If the `queryprune=` value is made only of alphanumeric characters
(including `_`), the value will be internally converted to regex  equivalent
`^value=`. This ensures a better future compatibility with AdGuard's
`removeparam=`.

If the `queryprune=` value starts with `!`, the test will be inverted. This
can be used to remove all query parameters EXCEPT those who match the
specified value.

Other
-----

The legacy code to test for spurious CSP reports has been removed. This
is no longer an issue ever since uBO redirects to local resources through
web accessible resources.

Notes
=====

The following new and recently added filter options are not compatible with
Chromium's manifest v3 changes:

- `queryprune=`
- `1P`
- `3P`
- `header=`
2020-11-23 08:22:43 -05:00
Raymond Hill
50ad64d349
Make Firefox dev build auto-update 2020-11-21 10:35:21 -05:00
Raymond Hill
5e70d6e3c1
New revision for dev build 2020-11-21 10:01:50 -05:00
Raymond Hill
daf464b3c3
Add support to auto-complete values of domain lists
The auto-complete feature in the _"My filters"_ pane will
use hostname/domain from the set of opened tabs to assist
in entering values for `domain=` option. This also works
for the implict `domain=` option ṗrepending static extended
filters.
2020-11-21 09:57:54 -05:00
Raymond Hill
8d3c4916b0
Skip trying to find effective context for about:srcdoc frames
`about:srcdoc` frames are their own origin, trying to
use the origin of the parent context causes an
exception to be thrown when accessing location.href.
2020-11-21 09:51:14 -05:00
Raymond Hill
4b943cf07f
Fix scrollbar not receiving mouse event in element picker
Not sure why I set z-index to 0; removed due to mouse
event not reaching the scrollbar.
2020-11-20 11:37:00 -05:00
Raymond Hill
efa8f92d21
Use cogs icon for access to dashboard in popup panel
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1319
2020-11-20 09:00:53 -05:00
Raymond Hill
f903c95607
Make Firefox dev build auto-update 2020-11-20 07:36:06 -05:00
Raymond Hill
13f6bdae37
Improve representation of modifier filters in logger
As per feedback from filter list maintainers.
2020-11-20 07:14:02 -05:00
Raymond Hill
ab98cd46b1
Bring back action/state highlighting in _"My rules"_ 2020-11-20 05:34:56 -05:00
Raymond Hill
941e7e8e96
new revision for dev build 2020-11-19 11:34:32 -05:00
Raymond Hill
b1c55b3de9
Emphasize entity portion of hostnames in _"My rules"_ 2020-11-19 11:33:09 -05:00
Raymond Hill
38cecddcd1
Improve zapper's detection of scroll-locked documents 2020-11-18 14:11:36 -05:00
Raymond Hill
ee2fd45f00
Ensure we do not extract truncated URL for Homepage directive
Related feedback:
- b12e0e05ea (commitcomment-44309540)
2020-11-18 12:14:23 -05:00
Raymond Hill
6b1a9e7aee
Make Firefox dev build auto-update 2020-11-18 11:25:56 -05:00
Raymond Hill
b12e0e05ea
Extract Homepage URL from a list when present
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1346

Additionally, fixed a case of filter list being compiled
twice at subscription time.
2020-11-18 10:02:22 -05:00
Raymond Hill
d87a3b950f
Sort on base domains rather than TLDs in "My rules" pane
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1293
2020-11-18 08:01:00 -05:00
Raymond Hill
a683297931
Fix type assignment in logger page
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1349
2020-11-17 11:18:59 -05:00
Raymond Hill
922b05bbc4
New revision for dev build 2020-11-17 08:27:37 -05:00
Raymond Hill
b6b167671e
New revision for stable release 2020-11-17 07:10:41 -05:00
Raymond Hill
717a601a59
Make Firefox dev build auto-update 2020-11-16 11:15:40 -05:00
Raymond Hill
114a92774a
Revert "Make Firefox dev build auto-update"
This reverts commit ab332960fe.
2020-11-16 10:30:07 -05:00
Raymond Hill
bf4af8952f
New revision for release candidate 2020-11-16 10:16:27 -05:00
Raymond Hill
ab332960fe
Make Firefox dev build auto-update 2020-11-16 10:15:51 -05:00
Raymond Hill
aa2d3e94c7
Make Firefox dev build auto-update 2020-11-15 10:35:45 -05:00
Raymond Hill
6068867bad
Import translation work from https://crowdin.com/project/ublock 2020-11-15 10:22:05 -05:00
Raymond Hill
a3f5f0d03c
New revision for release candidate 2020-11-15 10:20:20 -05:00
Raymond Hill
e360e90d1e
Fix invalid support URL in document-blocked page
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1345
2020-11-15 10:19:09 -05:00
Raymond Hill
8362751be5
Allow to scroll for URL in click-to-load
Some URLs can be quite long, so the div containing
the URL needs to be scrollable if needed.
2020-11-14 11:59:06 -05:00
Raymond Hill
73f9a4f3ea
Make Firefox dev build auto-update 2020-11-14 08:45:39 -05:00
Raymond Hill
051a859e5c
new revision for release candidate 2020-11-14 08:37:03 -05:00
Raymond Hill
46d7f8a70c
Fine tune click-to-load widget
Notably, add clickable link to open the widget
in its own tab. Also, allows the URL to be text-
selected so that it becomes possible to use the
selection in a browser contextual menu's "Open
in a new tab" option.
2020-11-14 08:34:47 -05:00
Raymond Hill
54c8a0a6f2
Make Firefox dev build auto-update 2020-11-14 07:55:25 -05:00
Raymond Hill
3895fac2a4
New revision for release candidate 2020-11-14 07:30:05 -05:00
Raymond Hill
5cf9bcf27c
Fine tune code of optimizeOriginHitTests()
Related commit:
- b265f2644d
2020-11-14 07:28:51 -05:00
Raymond Hill
4afb3dc149
Allow domain= with entity values into pre-test buckets
Related commit:
- b265f2644d

Filters which have `domain=` option with an entity
value will no longer be prevented from joining
pre-test buckets.
2020-11-14 07:04:21 -05:00
Raymond Hill
56cd238ad4
Disable auto activation of dark theme in next release
Until a fully usable dark theme is available. uBO's
incomplete dark theme can still be forced by setting
advanced setting `uiTheme` to `dark`.
2020-11-13 12:15:29 -05:00
Raymond Hill
eb8433cb19
Enable cloud storage compression by default in next release
Related commit:
- d8b6b31eca
2020-11-13 12:14:06 -05:00
Raymond Hill
f192d99ce5
Make Firefox dev build auto-update 2020-11-13 11:51:00 -05:00
gwarser
e0adc20456
Update link to "Trusted sites" wiki (#3782)
Fixes https://github.com/uBlockOrigin/uBlock-issues/issues/1337
2020-11-13 09:42:14 -05:00
Raymond Hill
a3bbba0fce
new revision for release candidate 2020-11-13 09:36:37 -05:00
Raymond Hill
ee930b402e
Import translation work from https://crowdin.com/project/ublock 2020-11-13 09:36:09 -05:00
Raymond Hill
2cfeaddbed
Fine tune various static filtering code
Notably, make `queryprune` option available only
to filter list authors, until there are guards
against bad filters in some future and until the
option syntax and behavior is fully settled.

Instances of `queryprune` in filter lists will be
compiled, however instances of `queryprune` in
_"My filters"_ will be ignored unless users
indicated they are a filter list author.
2020-11-13 09:23:25 -05:00
Raymond Hill
525d7b1b3b
Fine tune port connection code
Related commit:
- a223031b98
2020-11-13 08:32:51 -05:00
Raymond Hill
02b4d149e3
Do not skip querypruning when no-strict-blocking is true
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1341
2020-11-13 08:30:43 -05:00
Raymond Hill
ec9a5b5113
Make Firefox dev build auto-update 2020-11-12 14:36:02 -05:00
Raymond Hill
b40f5bafc6
New revision for dev build 2020-11-12 12:16:36 -05:00