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

4158 Commits

Author SHA1 Message Date
Raymond Hill
4a01affa0e
Undo mistakenly committed changes to the element picker
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2360
2022-11-13 11:07:41 -05:00
Raymond Hill
73c2decdf5
Ensure procedural filters are applied at least once
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/2261#discussioncomment-4123057

Cosmetic filters will be applied unconditionally at least
once at DOMContentLoaded time.
2022-11-12 11:22:49 -05:00
Raymond Hill
3d24b89078
Fix dom.text() returning textContent 2022-11-12 10:35:40 -05:00
Raymond Hill
feaa338678
Code maintenance: replace uDom.js with dom.js
`uDom` is old and crusty and `dom` is meant as replacement. The
goal of `dom` is to be simpler and mainly just convenience
methods for handling the DOM with vanilla JS -- this is not a
framework.

Additionally, removed keyboard shortcuts pane which was useful
only on very old versions of Firefox.
2022-11-12 09:51:22 -05:00
Raymond Hill
b1a14794bf
Test for unsupported pseudo operators after normalization
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2356
2022-11-10 10:32:22 -05:00
Raymond Hill
20181e9f18
Properly detect unsupported pseudo operators
Related feedback:
- https://www.reddit.com/r/uBlockOrigin/comments/yr8eda/
2022-11-10 09:30:52 -05:00
Raymond Hill
4d4a5f3807
Mind implicit prelude * element in pseudo operators
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2355
2022-11-10 08:47:54 -05:00
Raymond Hill
8a34425ca5
Avoid redundant logger entries for scriptlet injection
Report only when the scriptlets have been successfully injected.
2022-11-06 17:23:06 -05:00
Raymond Hill
c65114ee5e
Add support for Belarusian language 2022-11-06 17:04:56 -05:00
Raymond Hill
49df063191
Try to inject scriptlets at onResponseStarted() time
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2350

As per AdGuard findings, it's possible (though unreliable) to try
to inject scriptlets at webRequest.onResponseStarted time, which
increases scriptlet injection reliability overall when injecting
from multiple entry points.

uBO was already injecting at webNavigation.onCommitted and
main content script time, and adding webRequest.onResponseStarted
as an entry point for scriptlet injection increases reliability
for webpages which executes inline scripts at the top of the DOM.

References:
- https://github.com/AdguardTeam/AdguardBrowserExtension/issues/1029
- https://github.com/AdguardTeam/AdguardBrowserExtension/blob/9ab85be5/Extension/src/background/webrequest.js#L620
2022-11-06 16:54:32 -05:00
Raymond Hill
e0e68a24d2
Import translation work from https://crowdin.com/project/ublock 2022-11-06 13:11:23 -05:00
Raymond Hill
6574ede152
[mv3] Do not merge rules with errors
Related issue:
- https://github.com/uBlockOrigin/uBOL-issues/issues/10#issuecomment-1304822579
2022-11-06 11:21:02 -05:00
Raymond Hill
36bfa27c30
Rearrange code flow 2022-11-04 11:08:41 -04:00
Raymond Hill
c3d0d574d7
Fix incorrect serialization of pseudo elements
Related feedback:
- https://www.reddit.com/r/uBlockOrigin/comments/ylnvwf/how_to_block_suggestive_keyword_in_reddit_search/iv014wu/
2022-11-04 10:55:10 -04:00
Raymond Hill
42ddac5e3d
Fix unescaped backslashes in selector attribute
Related feedback:
- https://www.reddit.com/r/uBlockOrigin/comments/yjoh9p/
2022-11-02 08:32:54 -04:00
Raymond Hill
4863f3093e
Do not inject scriptlets on navigation events in Firefox
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2343
2022-10-28 11:07:46 -04:00
Raymond Hill
d992824625
Just to be sure no race condition
Related commit:
- d1f8a05d2d
2022-10-27 16:28:55 -04:00
Raymond Hill
d1f8a05d2d
Further ensure scriptlets are actually injected
Related feedback:
- https://www.reddit.com/r/uBlockOrigin/comments/ye6abt/

Possibly because the Opera sidebar window is a special
case, it appears the scriptlets must be injected at a
later time.

Use a global isolated window variable to detect whether
the scriptlets have really be injected, and ultimately
inject them at main content script time when it is found
they haven't been injected at that point.
2022-10-27 15:52:03 -04:00
Raymond Hill
bccd5a0264
Harden scriptlet injections
This commit make it so scriptlet injections will occur
at the earliest possible time on all platform.

This should also fix the case reported at:
- https://www.reddit.com/r/uBlockOrigin/comments/ye6abt/

Which is caused by the fact that there is no webNavigation
events being fired by the browser. In such case, the changes
here will make it so that uBO will detect that the scriptlet
were not injected and will inject them at main content script
injection time.
2022-10-27 14:16:21 -04:00
Raymond Hill
ae5717ea72
Just use the already existing method 2022-10-24 09:30:29 -04:00
Raymond Hill
fb4059d11c
Add missing API method in neutered resource 2022-10-24 09:11:02 -04:00
Raymond Hill
df7bedbe04
Return punycoded hostname in static extended filtering 2022-10-24 09:08:50 -04:00
q1800
08eb790145
Update support.html (#3876) 2022-10-21 14:17:18 -04:00
Raymond Hill
3d3ad0e386
Void elements (i.e. link) do not need self-closing slash
Ref.:
  https://html.spec.whatwg.org/multipage/syntax.html#void-elements
2022-10-21 12:17:37 -04:00
Raymond Hill
433adac6ff
[mv3] Add ability to handle entity-based CSS and scriptlet injection filters
This commit adds the ability to inject entity-based plain CSS
filters and also a set of the most commonly used entity-based
scriptlet injection filters.

Since the scripting API is not compatible with entity patterns,
the entity-related content scripts are injected in all documents
and the entity-matching is done by the content script themselves.

Given this, entity-based content scripts are enabled only when
working in the Complete filtering mode, there won't be any
entity-based filters injected in lower modes.

Also, since there is no way to reasonably have access to the
Public Suffix List in the content scripts, the entity-matching
algorithm is an approximation, though I expect false positives
to be rare (time will tell). In the event of such false
positive, simply falling back to Optimal mode will fix the
issue.

The following issues have been fixed at the same time:

Fixed the no-filtering mode related rules having lower priority
then redirect rules, i.e. redirect rules would still be applied
despite disabling all filtering on a site.

Fixed improper detection of changes to the generic-related CSS
content script, potentially causing undue delays when for example
trying to access the popup panel while working in Complete mode.
The scripting MV3 can be quite slow when registering/updating
large content scripts, so uBOL does its best to call the API only
if really needed, but there had been a regression in the recent
builds preventing uBO from properly detecting unchanged content
script parameters.
2022-10-20 15:48:06 -04:00
Raymond Hill
7ec59b09ac
Fix improperly detecting ruleset changes re. dynamic URL filtering
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2330\
2022-10-19 12:12:09 -04:00
Raymond Hill
9247072061
Import translation work from https://crowdin.com/project/ublock 2022-10-19 11:38:55 -04:00
Raymond Hill
d027a3f7c4
Fix improperly detecting ruleset changes re. dynamic URL filtering
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2330
2022-10-19 11:37:11 -04:00
Raymond Hill
9879b7d03c
[mv3] Fix overwriting valid DNR rules with invalid entries
This fixes a flaw which has existed since the first version of
uBO Lite.

Related issue:
- https://github.com/uBlockOrigin/uBOL-issues/issues/11

Related commit:
- a559f5f271
2022-10-18 16:12:30 -04:00
Raymond Hill
8aa379ef9e
Fix argument-less :watch-attr() procedural operator
It's valid to have no argument for `:watch-attr()`.
2022-10-18 07:35:47 -04:00
Raymond Hill
44812dd3c0
[mv3] Salvage network rules with entity syntax in domain= option
It's possible to salvage network rule with entity syntax-based
entries in their `domain=` option if there exists at least one
entry which is not entity syntax-based.

For negated entries, these can be unconditionally removed
safely.
2022-10-17 17:41:13 -04:00
Raymond Hill
614e65a6a5
Import translation work from https://crowdin.com/project/ublock 2022-10-17 08:24:54 -04:00
Raymond Hill
04119e9cdd
Properly handle unsupported `nth-child(an of selector)
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2284#issuecomment-1280325910
2022-10-17 07:26:51 -04:00
Raymond Hill
d22b4e9f71
[mv3] Revert attempt at fixing rules with entity-based syntax
This will need more careful analysis to properly address this.
2022-10-16 13:20:49 -04:00
Raymond Hill
985ea24e82
[mv3] Add support for redirect= filters
This adds support for `redirect=` filters. As with `removeparam=`
filters, `redirect=` filters can only be enforced when the
default filtering mode is set to Optimal or Complete, since these
filters require broad host permissions to be enforced by the DNR
engine.

`redirect-rule=` filters are not supported since there is no
corresponding DNR syntax.

Additionally, fixed the dropping of whole network filters even though
those filters are still useful despite not being completely
enforceable -- for example a filter with a single (unsupported) domain
using entity syntax in its `domain=` option should not be wholly
dropped when there are other valid domains in the list.
2022-10-16 12:05:24 -04:00
Raymond Hill
5a9cd724ca
Add missing method to neutered api 2022-10-15 14:46:12 -04:00
Raymond Hill
30bd6c7bb8
Parse -abp-has as declarative if possible
With the new csstree-based parser, it should now be
safe to parse `-abp-has` as declarative. There are over
a hundred such cosmetic filters in EasyList, and we want
to have these filters declaratively enforced whenever
possible in order to let the browser do the work natively
rather than rely on JS code.
2022-10-14 13:04:47 -04:00
Raymond Hill
af47189da4
Import translation work from https://crowdin.com/project/ublock 2022-10-13 08:24:39 -04:00
Raymond Hill
873c2e7264
[mv3] Support conditional env_mv3 directive to parser
Related issue:
- https://github.com/uBlockOrigin/uBOL-issues/issues/1
2022-10-11 12:02:33 -04:00
Raymond Hill
8eb28a446c
[mv3] Introduce per-site filtering modes in lieu of per-site toggle switch 2022-10-10 12:28:24 -04:00
Raymond Hill
5777b672a4
Import translation work from https://crowdin.com/project/ublock 2022-10-10 10:46:19 -04:00
Raymond Hill
5659194932
Fix broken :has() operator in HTML filtering
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2228#issuecomment-1273119017
2022-10-10 08:38:40 -04:00
Raymond Hill
3f8e3fe0c6
Fix nth-of-type() not accepting identifier-based arguments
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2284#issuecomment-1271552479
2022-10-07 09:12:45 -04:00
Raymond Hill
93953f9b21
Prepend attribute flags with space
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2310#issuecomment-1269001494
2022-10-06 16:57:03 -04:00
Raymond Hill
9c0d76346b
Fix discarding attribute flags
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2310
2022-10-05 07:08:35 -04:00
Raymond Hill
24273d2c94
Escape attribute values
Related issues:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2284#issuecomment-1265417399
2022-10-04 08:11:31 -04:00
Raymond Hill
e12cd232a0
Procedural operators without parenthesis are invalid
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2305

Bump up selfie/compile version numbers. Related feedback:
- 85adde9f0c (commitcomment-85569639)
2022-10-03 10:47:29 -04:00
Raymond Hill
1a9a19a91f
[mv3] Open options page at first install
To be sure first time users are properly informed about the
possibility to enable broad permissions for better filtering.
2022-09-30 09:18:52 -04:00
Raymond Hill
28aee736a5
[mv3] Add support for removeparam= filter option
Consequently, AdGuard URL Tracking Protection (AUTP) has been
added to the set of available filter lists.

However, removeparam= equivalent DNR rules can only be enforced
when granting uBOL broad permissions. If broad permissions are
not granted, removeparam= equivalent DNR rules are ignored.

Exception removeparam= filters are not supported, and these are
present in AUTP and meant to unbreak some websites which are
known to break as a result of removing query parameters.

This is issue might be mitigated in the future by making the
conversion from filters to DNR rules more complicated but this
can never replace the accuracy of uBO's filtering engine being
able to fully enforce arbitrary exception removeparam= filters.

Also, it is not possible to translate regex-based removeparam=
values to DNR rules, so these are dropped at conversion time.

As with other filters to DNR rules conversion, the converter
coallesce many distinct removeparam= filters into fewer DNR
rules.
2022-09-29 19:51:33 -04:00
Raymond Hill
80e17af9fa
Fix parsing of cosmetic filters with empty-string attribute value
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2303
2022-09-29 12:54:25 -04:00
Raymond Hill
b5e2ca8826
Import translation work from https://crowdin.com/project/ublock 2022-09-28 10:40:55 -04:00
Raymond Hill
de0f45581c
Fix logging of sub_frame types
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/2302
2022-09-28 09:58:44 -04:00
Raymond Hill
13927fc203
Rules with excludedResourceTypes must not block main_frame
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2298
2022-09-28 09:37:10 -04:00
Raymond Hill
fe4cfeba2e
Code review re. attribute serializer
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2300

Related commit:
- 7379bafb23
2022-09-28 09:05:04 -04:00
Raymond Hill
7379bafb23
Fix serializing of unquoted attribute values
Related commit:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2300
2022-09-28 08:34:39 -04:00
Raymond Hill
d3e4bec30a
Add missing ellipsis character 2022-09-27 20:04:38 -04:00
Raymond Hill
61e9a6e9c9
Import translation work from https://crowdin.com/project/ublock 2022-09-27 20:00:06 -04:00
Raymond Hill
0cd019ec7d
Fix preview of :style()-based cosmetic filters 2022-09-27 09:32:58 -04:00
Raymond Hill
51c2e22c7a
[mv3] Fix procedural operator matches-media()
The failure was caused by the fact that there is no
window.matchMedia() API available in Nodejs. The validation
is now done using cssTree.
2022-09-27 07:46:24 -04:00
Raymond Hill
115f7bb687
Fix operator token-to-ctor map
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2294
2022-09-26 22:27:50 -04:00
Raymond Hill
990ad75ca8
Redirect non-existing operators to a void operator
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2292

This will prevent unexpected oversezealous blocking if ever
this happens again. The internal void operator will ensure
no blocking takes place and issue a note about non-existing
operator to the dev tools console.
2022-09-26 16:46:24 -04:00
Raymond Hill
9a31ac8076
Revert removal of matches-css-related filters
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2292

Related commit:
- a71b71e4c8
2022-09-26 12:23:13 -04:00
Raymond Hill
e29e760b43
Use higher resolution favicons
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2287
2022-09-26 10:18:24 -04:00
Raymond Hill
59aa235952
Forbid relative selector at top level
Related commit:
- a71b71e4c8
2022-09-25 08:51:48 -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
c698a9fcec
Fix overzealous validation of :style() arguments 2022-09-24 12:14:50 -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
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
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
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
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
10406f5f74
Import translation work from https://crowdin.com/project/ublock 2022-09-17 08:35:54 -04:00
Raymond Hill
e1b54514cc
[mv3] Add badge reflecting number of injectable content on current site
Additonally, general code review.
2022-09-17 08:26:41 -04:00
Raymond Hill
232c44eeb2
[mv3] Add scriptlet support; improve reliability of cosmetic filtering
First iteration of adding scriptlet support. As with cosmetic
filtering, scriptlet niijection occurs only on sites for which
uBO Lite was granted extended permissions.

At the moment, only three scriptlets are supported:
- abort-current-script
- json-prune
- set-constant

More will be added in the future.
2022-09-16 15:56:35 -04:00
Raymond Hill
e7da3beddd
Fix typo in source code of "Filter lists" pane 2022-09-15 14:57:34 -04:00
Raymond Hill
34aab95107
[mv3] Add support for specific cosmetic filtering
Specific plain CSS cosmetic filters are now supported.

Cosmetic filtering will occur only after the user explicitly
grant uBO extended permissions for a given site, so that it
can inject CSS on the site.

A new button in the popup panel allows a user to grant/revoke
extended permissions to/from uBO Lite for the current site.

More capabilities will be carefully added for when extended
permissions are granted on a site, so specific cosmetic
filtering through plain CSS is the first implemented capability.

Generic and procedural cosmetic filtering is not implemented.

The current implementation for plain CSS cosmetic filters is
through declarative content injection, which does not require
the service worker to be alive, the browser takes care to
inject the cosmetic filters.

However declarative CSS injection does not support user
styles, so the injected cosmetic filters are "weak". I consider
this is a browser issue, since user styles are supported by
Chromium, there is just no way in the API to specify user
styles for the injected content.

Also:
- Fixed dark theme issues
- Added Steven Black's hosts file

Keep in mind all this is very experimental and implementation
details in this release may (will) greatly change in the future.
2022-09-15 13:14:08 -04:00
Raymond Hill
43a20f08a8
Import translation work from https://crowdin.com/project/ublock 2022-09-15 12:19:31 -04:00
Raymond Hill
3435e9886e
Import translation work from https://crowdin.com/project/ublock 2022-09-13 17:58:12 -04:00
Raymond Hill
e31637af78
[mv3] Add ability to enable/disable filter lists 2022-09-13 17:44:24 -04:00
Raymond Hill
d11a3f2fa3
Fix broken :not() operator when forcing parsing as procedural
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2262
2022-09-13 16:15:22 -04:00
Raymond Hill
887a87d9ca
Add support to report/filter SVG image elements
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2260
2022-09-11 12:20:01 -04:00
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
b6b6e49d57
Add original Firefox-authored google-ima shim script
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2158
2022-09-11 10:54:54 -04:00
Raymond Hill
9ce9588737
Import translation work from https://crowdin.com/project/ublock 2022-09-11 09:18:20 -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
453fb1eb5e
Fix wording 2022-09-10 21:12:40 -04:00
Raymond Hill
4314764c48
Add missing translatable string
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1681
2022-09-10 21:05:09 -04:00
Raymond Hill
0d80a1132d
Fix typo in CSS 2022-09-10 16:08:05 -04:00
Raymond Hill
5716c1c6a0
Add two more strings to translate
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1681
2022-09-10 14:16:23 -04:00
Raymond Hill
ac89b4e0f7
Import translation work from https://crowdin.com/project/ublock 2022-09-10 14:15:08 -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
1258414f37
Report ruleset stats in popup panel 2022-09-08 10:04:08 -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
04114942aa
Add missing method to shim script
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2225
2022-08-21 12:54:02 -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
e54025d6bf
Import translation work from https://crowdin.com/project/ublock 2022-08-16 09:46:02 -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
e62604f889
Add queue-related initialization code to AMZN shim script
This would render obsolete the AMZN-related exception at the
following URL:

https://play.mylifetime.com/shows/married-at-first-sight/season-15/episode-1

And possibly lower the likelihood of breakage on other sites.
2022-08-05 11:26:23 -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
51d47f4539
Import translation work from https://crowdin.com/project/ublock 2022-07-15 13:41:23 -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
313d694040
Add missing method to outbrain surrogate script
Related issue:
- https://github.com/uBlockOrigin/uAssets/issues/13834
2022-06-25 11:06:05 -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
Raymond Hill
6fbcfc5114
Prevent picker from being larger than viewport
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/2114
2022-06-10 11:11:29 -04:00
Raymond Hill
c1f5ac6656
Import translation work from https://crowdin.com/project/ublock 2022-06-09 11:29:11 -04:00
Raymond Hill
c825790cd8
Import translation worl from https://crowdin.com/project/ublock 2022-06-03 13:02:57 -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
816a380237
Change github.xyz to github.link 2022-05-08 11:23:50 -04: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
9486efe886
Import translation work from https://crowdin.com/project/ublock 2022-04-28 11:00:36 -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
862d84f279
Import translation work from https://crowdin.com/project/ublock 2022-04-15 11:15:16 -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
5dcf6ecd41
Fix misaligned icon in logger 2022-03-31 10:59:31 -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
b5843c4c07
Import translation work from https://crowdin.com/project/ublock 2022-03-30 09:52:05 -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
699832e296
Import translation work from https://crowdin.com/project/ublock 2022-03-25 09:43:57 -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
070706c7ea
Raise opacity of void rows in logger
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2064
2022-03-23 14:30:28 -04:00
Raymond Hill
5523b345c7
Fix epicker's transparency issue with dark theme
Related discussion:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/1963#discussioncomment-2120210

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2062
2022-03-22 13:57:37 -04:00
Raymond Hill
678dd89ca7
Add Cloudflare Pages as CDN provider for uBO's own filter lists 2022-03-20 08:17:17 -04:00
Raymond Hill
4faba3d94b
Import translation work from https://crowdin.com/project/ublock 2022-03-19 12:46:44 -04:00
Raymond Hill
b4774c4b98
Make browser use dark theme built-in widget in dark theme
Related discussion:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/1963#discussioncomment-2120312
2022-03-19 12:43:26 -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
0613052415
Import translation work from https://crowdin.com/project/ublock 2022-03-11 17:30:26 -05: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
25fe95eb89
Fix unthemed dark mode style
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/1963#discussioncomment-2303987
2022-03-06 12:34:06 -05:00
Raymond Hill
8648c00581
Import translation work from https://crowdin.com/project/ublock 2022-02-27 08:30:36 -05:00
Raymond Hill
7eb19c3a69
Drop more irrelevant entries from troubleshooting information 2022-02-23 15:41:03 -05:00
Raymond Hill
c78178055a
Fix comment 2022-02-23 08:40:07 -05:00
Raymond Hill
5619840066
Fix previous commit regarding PSL
The library itself was fixed properly but failed to
properly transcribe the fix manually.

Related commit:
- 38855b1ff6
2022-02-22 19:16:16 -05:00
Raymond Hill
38855b1ff6
Fix testing a 8-bit integer instead of a 32-bit integer in PSL library
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2002

The code was testing only the LSB of a 32-bit integer to detect
whether the current rule was a wildcard (`*`), while it had to
compare against the whole 32-bit integer.

The breakage occurred when the LSB of an offset to the character
buffer happened to match the ASCII code of `*` (42, 0x2A).

(An offset is used when a label is longer than 4 characters)
2022-02-22 18:53:50 -05:00
Raymond Hill
75424b77d5
Update translation strings
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2000
2022-02-22 08:47:33 -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
a21b0c08e5
Import translation work from https://crowdin.com/project/ublock 2022-02-19 09:06:07 -05:00
Raymond Hill
92bca7ea6e
Tone down highlighted ribbon in popup panel 2022-02-18 07:30:34 -05:00
Raymond Hill
ff52919cfc
Remove extraneous cursor style in picker 2022-02-17 09:06:59 -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
d42dcde01e
Import translation work from https://crowdin.com/project/ublock 2022-02-16 11:21:51 -05:00
Raymond Hill
0676cf66b2
Fine tune color for "keyword" style
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/1963#discussioncomment-2173524
2022-02-16 10:26:26 -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
3ea92f87a3
Prevent unset minimal width for popup panel
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1972
2022-02-13 08:25:23 -05:00
Raymond Hill
3e2f779373
Fix un-themed scroll lock in _My rules_
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/1963#discussioncomment-2159810
2022-02-11 15:14:31 -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
678ea59d12
Import translation work from https://crowdin.com/project/ublock 2022-02-11 12:42:47 -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
9a5acbbfcd
Fix un-themed buttons in logger
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/1963#discussioncomment-2158199
2022-02-11 11:08:48 -05:00
Raymond Hill
35a9e2b06c
Import translation work from https://crowdin.com/project/ublock 2022-02-10 07:30:26 -05:00
Raymond Hill
c776ac72c8
Fine tune padding as suggested
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1970
2022-02-09 17:14:05 -05:00
Raymond Hill
ad7eb5d1da
Provide exact link for the origin of the library
As per AMO review team request.

Related documentation:
- https://extensionworkshop.com/documentation/publish/third-party-library-usage/
2022-02-09 13:11:38 -05:00
Raymond Hill
3b0b240b9b
Add information about exact origin of the library as per AMO review request 2022-02-09 12:57:37 -05:00
Raymond Hill
53c98c27cf
Use theme-related shade of red for DOM inspector
Candidate for revision to stable release.
2022-02-09 10:26:25 -05:00
Raymond Hill
9ce1f38736
Import translation work from https://crowdin.com/project/ublock 2022-02-09 09:07:21 -05:00
Raymond Hill
934b57019c
Fix bad font size in DOM inspector
Candidate for a revision for current stable release.
2022-02-09 08:36:44 -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
b8db519268
Import translation work from https://crowdin.com/project/ublock 2022-02-08 07:43:45 -05:00
Raymond Hill
4e5112a0fd
Fine tune hue for syntax highlighting 2022-02-07 17:23:51 -05:00
Raymond Hill
7192430f56
Max lightness to 40 for syntax coloring in light theme
Except when the color is used for emphasis.
2022-02-07 11:17:12 -05:00
Raymond Hill
ba5125853f
More CSS fine tuning after more testing 2022-02-07 10:42:06 -05:00
Raymond Hill
b0ecb4f8b8
Import translation work from https://crowdin.com/project/ublock 2022-02-07 07:30:36 -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
128ec3a7e4
More fine tuning to bring element picker in line with theme 2022-02-06 18:58:29 -05:00
Raymond Hill
32207c1219
Fix overly small font size in element picker 2022-02-06 18:50:16 -05:00
Raymond Hill
47d211ac5c
Improve legibility of selection versus background 2022-02-06 14:25:57 -05:00
Raymond Hill
0e5d5fa9f0
Don't overuse primary color in element picker 2022-02-06 13:25:14 -05:00
Raymond Hill
76a596bdab
Fix un-schemed rendering of error condition in element picker 2022-02-06 10:27:13 -05:00
Raymond Hill
abbeee0d3c
Import translation work from https://crowdin.com/project/ublock 2022-02-06 08:32:01 -05:00
Raymond Hill
959d18d665
Use root color when emphasis is used
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/1963#discussioncomment-2118460
2022-02-06 08:12:52 -05:00
Raymond Hill
ed1b5e2053
Fix untheme parts in element picker widget
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/1963#discussioncomment-2117965
2022-02-05 17:17:16 -05:00
Raymond Hill
6eb9b0998e
Import translation work from https://crowdin.com/project/ublock 2022-02-05 16:57:08 -05:00
Raymond Hill
b166edb904
Import translation change after updating messages.json 2022-02-05 16:56:13 -05:00
Raymond Hill
e44768f5d3
Ensure click2load.html widget is dark-theme aware
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/1963#discussioncomment-2117460
2022-02-05 13:34:48 -05:00
Raymond Hill
8080048848
Remove usage of period in short description
From what I gather looking at Firefox for Android, a
period is used in a sentence only when there were
prior usage of punctuation in the descripton, i.e.
a comma, or a a period in a previous sentence. Single
standalone sentence should not have a trailing period.
2022-02-05 09:59:31 -05:00
Raymond Hill
ebbda6c29c
Import translation work from https://crowdin.com/project/ublock 2022-02-05 07:58:20 -05:00
Raymond Hill
ce0bdb4369
More CSS fine tuning
Additionally, have a list of preset colors for the color
picker (unlike Firefox, Chromium's built-in color picker
does not have a list of preset colors by default).
2022-02-05 07:42:17 -05:00
Raymond Hill
ed25ed6a6c
Fix selection color in codemirror editor
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/1963#discussioncomment-2113694
2022-02-04 18:31:00 -05:00
Raymond Hill
35490439b9
Fix cname-related ink in logger
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/1963#discussioncomment-2112321
2022-02-04 12:41:50 -05:00
Raymond Hill
dbf4ed7f4b
Fix grab area of element picker to accomodate dark theme 2022-02-04 09:25:50 -05:00
Raymond Hill
020dad8e58
Fix case of unthemed background in logger
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/1963#discussioncomment-2110873
2022-02-04 08:24:24 -05:00
Raymond Hill
e434142d52
Import translation work from https://crowdin.com/project/ublock 2022-02-04 07:41:20 -05:00
Raymond Hill
1e81e2f751
More fine-tuning of default theme
Bring default color theme more in line with previous
versions.

Additionally, use `button` tags for navigation bar tabs,
as per MDN guidelines:

https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#interactive_content
2022-02-03 16:24:48 -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
795bf07fd7
Import translation work from https://crowdin.com/project/ublock 2022-02-03 06:20:12 -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
q1800
88d465fdd0
Correct GitHub link for HSLuv author (#3863)
I believe this was an error. Just submitted PR to correct error.
2022-02-02 16:30:14 -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
2bc9c8aa38
Added i18n strings related to theme stuff 2022-02-02 15:00:29 -05:00
Raymond Hill
14c8775ce3
Import translation work from https://crowdin.com/project/ublock 2022-02-02 14:53:38 -05:00
Raymond Hill
7b5e5b28c2
Import translation work from https://crowdin.com/project/ublock 2022-02-01 10:38:27 -05:00
Raymond Hill
39e1adfc2d
Mark revert/commit buttons as disabled by default
Related feedback:
- 4ee8a5948d (commitcomment-65716257)
2022-01-31 16:14:56 -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
7b29c7ef3e
Import translation work from https://crowdin.com/project/ublock 2022-01-31 09:53:04 -05:00
Raymond Hill
e110cce92a
Fine tune rule colors
Use explicit color values, as alpha-merging does not guarantee
uniform lightness.
2022-01-31 09:10:20 -05:00
Raymond Hill
819279d99d
More fine-tuning following CSS changes 2022-01-30 20:13:31 -05:00
Raymond Hill
f8c6be868c
Fine tune lightness (Luv) of rule colors in light theme
Trying to use same Luv for both light and dark theme does not
really work -- best to have each them have their own Luv for
rule colors.
2022-01-30 19:39:18 -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
a5ca565e9c
Add hashComponents() to FingerprintJS v3 shim
Related feedback:
- f4824bd0d9 (commitcomment-64534458)
2022-01-28 09:26:57 -05:00
Raymond Hill
fba680f9ab
Improve google-analytics shim
Related issue:
- https://github.com/uBlockOrigin/uAssets/issues/11456
2022-01-24 12:26:24 -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
5e44d6fd07
Import translation work from https://crowdin.com/project/ublock 2022-01-12 10:16:58 -05:00