Commit Graph

8383 Commits

Author SHA1 Message Date
Raymond Hill 1231474801
Make Firefox dev build auto-update 2020-11-26 13:26:07 -05:00
Raymond Hill 1b5841cdea
New revision for dev build 2020-11-26 09:59:48 -05:00
Raymond Hill 6ac09a2856
Add ability to parse `removeparam=` as `queryprune=`
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1356

Related commit:
- bde3164eb4

It is not possible to achieve perfect compatiblity at this
point, but reasonable compatibility should be achieved for
a majority of instances of `removeparam=`.

Notable differences:
--------------------

uBO always matches in a case insensitive manner, there is
no need to ask for case-insensitivity, and no need to use
uppercase characters in `queryprune=` values.

uBO does not escape special regex characters since the
`queryprune=` values are always assumed to be literal
regex expression (leaving out the documented special
characters). This means `removeparam=` with characters
which are special regex characters won't be properly
translated and are unlikely to work properly in uBO.

For example, the `queryprune` value of a filter such as
`$removeparam=__xts__[0]` internally become the literal
regex `/__xts__[0]/`, and consequently would not match
a query parameter such as `...?__xts__[0]=...`.

Notes:
------

Additionally, for performance reason, when uBO encounter
a pattern-less `queryprune=` (or `removeparam=`) filter,
it will try to extract a valid pattern from the
`queryprune=` value. For instance, the following filter:

    $queryprune=utm_campaign

Will be translated internally into:

    utm_campaign$queryprune=utm_campaign

The logger will reflect this internal translation.
2020-11-26 09:34:12 -05:00
Raymond Hill 80413dff83
Fix forgotton instances of `1P`/`3P`
Related commit:
- 60d5b85e41

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1362
2020-11-26 05:43:14 -05:00
Raymond Hill 60d5b85e41
Rename `1P`/`3P` tp `strict1p`/`strict3p` as suggested
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1362
2020-11-26 05:09:46 -05:00
Raymond Hill b319dc98f8
Make Firefox dev build auto-update 2020-11-25 13:45:45 -05:00
Raymond Hill 818417f6be
New revision for dev build 2020-11-25 10:24:15 -05:00
Raymond Hill 57013c16e6
Fix compilation of blocking counterpart of `redirect=` filters
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1358
2020-11-25 09:36:12 -05:00
Raymond Hill 7d80416938
Make Firefox dev build auto-update 2020-11-23 13:25:23 -05:00
Raymond Hill 801c6a8785
New revision for dev build 2020-11-23 10:27:27 -05:00
Raymond Hill e45949417b
Magic compile/selfie numbers need to increased
Related commit:
- bde3164eb4
2020-11-23 10:26:15 -05:00
Raymond Hill 13ddab5375
Make Firefox dev build auto-update 2020-11-23 09:46:20 -05:00
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