1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-29 14:17:11 +02:00
Commit Graph

2586 Commits

Author SHA1 Message Date
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
Raymond Hill
5178b91fa1
Revert "Prevent highly generic cosmetic filters from affecting html/body elements"
This reverts commit 7c8aec250f.

This will be brought back in a future dev cycle. Potentially
related issues:

- https://github.com/uBlockOrigin/uBlock-issues/issues/1978
- https://github.com/uBlockOrigin/uBlock-issues/issues/1983
2022-02-16 12:21:10 -05:00
Raymond Hill
ce3ac010b5
Fix improper handling of match-all removeparam
Related discussion:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1978#issuecomment-1038143619
2022-02-13 09:41:54 -05:00
Raymond Hill
2933016d4b
Rework behavior of "Suspend network activity until ..."
The setting will default to the natural capability of the browser:

- Checked for Firefox
- Unchecked for Chromium-based browsers

For Chromium-based browser, if checked, network requests will be
redirected to an empty resources instead of blocking the
connection.

Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1973
- https://www.reddit.com/r/uBlockOrigin/comments/squo8n/latest_update_blocks_network_connections_at/
2022-02-13 09:24:57 -05:00
Raymond Hill
2177d8163e
Fix regression breaking :remove()
Related commit/feedback:
- 152120bd9e (commitcomment-66516398)
2022-02-11 15:13:25 -05:00
Raymond Hill
152120bd9e
Introduce experimental procedural cosmetic operator :others()
The purpose of this new procedural operator is to target
all elements _outside_ than the currently selected set of
elements.

For any element feeding into `others()`, the resultset
of the `others()` operator will include everything else
except:

- the descendants of a subject element
- the ancestors of a subject element

The resultset will contains the siblings of a subject
element _except_ when those siblings are either a
descendant or ancestor of another subject element.

Related discussion:
- https://www.reddit.com/r/uBlockOrigin/comments/slyjzp/

Though this operator is unlikely to be used in default lists,
it opens the door to create specialized filter lists which
purpose is some sort of "reader mode", where everything
_else_ than a selected set of elements are hidden from view.

Examples of usage:

    twitter.com##:matches-path(/^/home/) [data-testid="primaryColumn"]:others()
    nature.com##:matches-path(/^/articles//) :is(.c-breadcrumbs,.c-article-main-column):others()

The status is currently considered experimental and support
might be removed in the future if it turns out there is no
sufficient usage or if unforeseen difficult issues arise
implementation-wise.
2022-02-11 12:28:15 -05:00
Raymond Hill
80f58a6357
Fix visually glitchy Create button in element picker
The Create button was being unduly enabled for a fraction of
second while editing the content of the filter text.

This commit is candidate for a revision to current stable
release.
2022-02-09 07:37:40 -05:00
Raymond Hill
ef25f30b30
Squashed commit of the following:
commit 34a290bdd62013591b17efbd2320698b95925c00
Author: Yuki2718 <58900598+Yuki2718@users.noreply.github.com>
Date:   Mon Feb 7 19:14:02 2022 +0900

    update last commit

commit f34ffbcc3d78bc98ee43b015f0ad0dae9d99720e
Author: Yuki2718 <58900598+Yuki2718@users.noreply.github.com>
Date:   Mon Feb 7 19:05:17 2022 +0900

    Improve and rename canrunads.js

Related issue:
- https://github.com/AdguardTeam/Scriptlets/issues/190

Related commit:
- e8bfc9a031
2022-02-07 07:05:44 -05:00
Raymond Hill
c65f896a2a
Propagate upward accent color stylesheet only when it changes 2022-02-03 09:34:33 -05:00
Raymond Hill
3b350cc844
Limit saturation of accent color for button surface 2022-02-03 08:56:08 -05:00
Raymond Hill
efec9aa69e
Fix color of cnamed entries in overview pane
Additionally, remove pointless (hsluv -> rgb -> hsluv) conversion
when computing accent color-based stylsheet.
2022-02-03 07:12:15 -05:00
Raymond Hill
3e3d1e26be
Store non-normalized accent color
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1957

Normalize color only at stylesheet build time, and cache
generated stylesheet for future reuse.
2022-02-03 06:14:04 -05:00
Raymond Hill
c38682221c
Reduce background color flash through usage of prefers-color-scheme
uBO will use the information from prefers-color-scheme to reduce
likelihood of background color flash. However this works only for
when prefers-color-scheme is properly set by the browser, and only
when uBO's theme selection is "auto", or when it happens to
match that of prefers-color-scheme.

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1284
2022-02-02 18:38:28 -05:00
Raymond Hill
c61fe6a72b
Fix typo in code re. preferred theme colors 2022-02-02 17:00:38 -05:00
Raymond Hill
ecb73d2ff5
Bring dark theme out of experimental status
Too many changes to list here, essentially there is now a
user interface setting to enable/disable dark theme, and
I've rearranged a bit the Settings pane as a result and
also altered other visuals in various places.

There are places which I know have not been thoroughly
tested (i.e. logger inspector).

Will fine-tune as per feedback.

Issues with the classic popup panel will not be addressed,
and if feedback is that it has become unusuable, it will be
outright removed.
2022-02-02 15:40:47 -05:00
Raymond Hill
e64dacebce
Add ability to see troubleshooting info in report page
Additionally, further fine-tune colors.
2022-01-31 13:28:43 -05:00
Raymond Hill
4ee8a5948d
Work toward bringing dark theme closer to a stable release
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/401
2022-01-30 18:35:26 -05:00
Raymond Hill
e8bfc9a031
Add canrunads.js as redirectable resource
Related discussion:
- 036e13101e (commitcomment-65068100)
2022-01-29 08:40:47 -05:00
Raymond Hill
b4911e2d7c
Raise minimum versions of browsers
For the following reasons:

- Support for CSS `gap`, so as to remove the need to
  fall back onto classic popup panel, and thus making
  it possible to fully remove long-ago deprecated
  classic panel (announced in 1.27.0)[1]:
  https://developer.mozilla.org/en-US/docs/Web/CSS/gap

- Support for dynamic import:
  https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import

Firefox's minimum version is raised to 68 because it's
the oldest ESR version supporting the features above.
From now on, minimum version of Firefox will always be
an ESR one.

---

[1] https://github.com/gorhill/uBlock/releases/tag/1.27.0
2022-01-28 12:02:56 -05:00
Raymond Hill
f98b70d1c0
Improve dealing with ambiguity in regex-based-looking network filters
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1932

Reported in point 3 under "Actual behavior".
2022-01-28 11:18:40 -05:00
Raymond Hill
250cf96aae
Fix regression causing regex-based filters to be case sensitive
Related feedback:
- https://github.com/AdguardTeam/AdguardFilters/issues/88067#issuecomment-1019518277

Regression commit:
- 725e6931f5
2022-01-23 12:32:11 -05:00
Raymond Hill
f4824bd0d9
Add shim for FingerprintJS (aka Fingerprint v3)
Related issue:
- https://github.com/uBlockOrigin/uAssets/issues/11408
2022-01-21 08:38:48 -05:00
Raymond Hill
3537e9d3c0
Disable the suspending of network requests when installing the extension
Related feedback:
- https://www.reddit.com/r/uBlockOrigin/comments/s7c9go/page_automatically_refreshes_after_installation/
2022-01-19 09:16:01 -05:00
Raymond Hill
d53f2362b1
Fix regression in reporting of header= option in logger
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1932

Related commit:
- 725e6931f5
2022-01-18 10:47:39 -05:00
Raymond Hill
de0f6a2cdd
Add longest wait time when fetching from storage in support info
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1865

This may be useful to rule out that the issue is caused by the
browser API responding in unduly delayed manner.
2022-01-14 09:07:28 -05:00
Raymond Hill
9759bfef4e
Fix edge case of background image filter and no cosmetic filters
Related commit:
- ebaa8a8bb2

Related feedback:
- ebaa8a8bb2 (commitcomment-63818019)
2022-01-13 11:03:21 -05:00
Raymond Hill
ebaa8a8bb2
Do not select background images as best candidate in picker
Related feedback:
- https://www.reddit.com/r/uBlockOrigin/comments/s2lrm0/picker_cant_select_and_block_this/
2022-01-13 09:24:04 -05:00
Raymond Hill
2f0ad153dd
Add clarifying comment 2022-01-12 12:55:53 -05:00
Raymond Hill
7c8aec250f
Prevent highly generic cosmetic filters from affecting html/body elements
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1692
2022-01-12 10:11:49 -05:00
Raymond Hill
0bc0af9d8d
Add test to detect case of improper deserialization
Related commit:
- 8f461072f5
2022-01-12 09:03:38 -05:00
Raymond Hill
8f461072f5
Fix selfie with invalid data in some circumstances
Reported internally.

The issue involves `removeparam` filters with a regex value. When
such filter was visited before a selfie was created, this would cause
the created selfie to persist a RegExp object, which can't be
serialized. This would cause exceptions to be thrown when uBO would
be subsequently loaded with the tainted selfie, since uBO would try
to execute a plain Object as a RegExp.
2022-01-11 11:06:11 -05:00
Raymond Hill
9b22961291
Properly report user-filters in troubleshooting information
User filters are enabled by default, they should be reported
under the `listset` section, along with how many filters are
being enforced.
2022-01-11 07:55:37 -05:00
Raymond Hill
6941ec7fb0
Escape unescaped " in attribute values
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1923
2022-01-11 07:20:03 -05:00
Raymond Hill
9ee8e7b607
Improve element picker/zapper's handling of shadow roots
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1850
2022-01-07 08:54:23 -05:00
Raymond Hill
b565d311a4
Fix CSS sizing of click-to-load widget as suggested
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1901
2022-01-07 08:02:31 -05:00
Raymond Hill
6d1b44b42c
Report only stats for eTLD+1 in troubleshooting information
Related commit:
- affdde02a9
2022-01-07 07:56:32 -05:00