Commit Graph

4372 Commits

Author SHA1 Message Date
Raymond Hill 3a5606125d
Import translation work from https://crowdin.com/project/ublock 2023-10-10 10:42:14 -04:00
Raymond Hill 437453233d
Support restoring from `application/json` file
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/2853
2023-10-10 10:16:55 -04:00
Raymond Hill 0a18f75897
Fix dumping of CFE internals when no cosmetic filters present 2023-10-09 11:12:10 -04:00
Raymond Hill 02c7b32bef
Improve `google-ima.js` surrogate
Related issues:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2265
- https://github.com/uBlockOrigin/uAssets/issues/19981
2023-10-07 12:27:03 -04:00
Raymond Hill 4cac9d185b
Reduce race conditions in scriptlet injection on Firefox
This is done by taking advantage through Firefox-specific
contentScripts.register() API:

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/contentScripts
2023-10-02 08:42:03 -04:00
Raymond Hill b95c90ba7c
Import translation work from https://crowdin.com/project/ublock 2023-09-22 09:36:01 -04:00
Raymond Hill 20d3c6a466
Fix detection of leading combinators
Related feedback:
https://github.com/uBlockOrigin/uBlock-issues/issues/2778#issuecomment-1722488224
2023-09-17 10:37:43 -04:00
Raymond Hill 7ef3408712
Fix regression in `:is()` operator
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/2818
2023-09-16 09:45:46 -04:00
Raymond Hill 313a3121c9
Do not assume set viewport for popup panel when using portrait mode in descktop
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/2814
2023-09-12 20:33:14 -04:00
Raymond Hill 2571660161
Fix removal of `:scope` prefix in `:has()` operator
Related feedback:
https://github.com/uBlockOrigin/uBlock-issues/issues/2778#issuecomment-1705101771
2023-09-11 12:34:53 -04:00
Raymond Hill ba8820fe31
Import translation work from https://crowdin.com/project/ublock 2023-09-08 09:19:26 -04:00
Raymond Hill eccfd3b823
Position reload icon in logger as per feedback
Related feedback:
https://github.com/uBlockOrigin/uBlock-issues/discussions/2782
2023-08-22 19:11:52 -04:00
Raymond Hill 3c7f35ed9c
Import translation work from https://crowdin.com/project/ublock 2023-08-22 10:50:04 -04:00
Raymond Hill 77c3ad2812
Fix bad regression in cosmetic filtering
Related commit:
393fd90f9d
2023-08-20 13:14:36 -04:00
Raymond Hill 55d068aca3
Use Unicode version of hostnames in element picker
Related feedback:
https://www.reddit.com/r/uBlockOrigin/comments/15vfkm6/
2023-08-20 11:27:19 -04:00
Raymond Hill 393fd90f9d
Disallow trailing CSS universal selector unless properly separated
Related discussion:
https://www.reddit.com/r/uBlockOrigin/comments/15tzgud/ads_on_twitterx_again/jwn8bkj/
2023-08-20 10:41:43 -04:00
Raymond Hill 0ad456e905
[mv3] Rename `uBOL-issues` repo to `uBOL-home`
From now on, new uBOL releases will go into uBOL-home repo.
2023-08-19 11:26:33 -04:00
Raymond Hill 857abb380b
[mv3] Add support for converting `^responseheader()` filters to DNR
Additionally, finalize versioning scheme for uBOL. Since most updates
will be simply related to update rulesets, the version will from now
on reflects the date at which the extension package was created:

  year.month.day.minutes

So for example:

  2023.8.19.690
2023-08-19 07:48:14 -04:00
Raymond Hill 2bbad0c692
Make `permissions=` as a modifier in logger 2023-08-17 17:11:47 -04:00
Raymond Hill dde246f202
Do not issue extraneous doc separators in logger 2023-08-17 09:28:29 -04:00
Raymond Hill fbc7a0e0ae
Properly serialize CSS combinators according to position in selector
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/2778

Regression from:
bb41d9594f

The regression occurred because the modified code made the assumption
that a leading combinator would never be preceded by whitespace, while
the parser didn't prevent this.

The parser has been fixed to ensure there is never a leading
whitespace in a selector.
2023-08-15 10:07:42 -04:00
Raymond Hill 62f2a3e68d
Fix broken mapping between scriptlet aliases and canonical name
Related commit:
bf591d93fb
2023-08-14 13:09:19 -04:00
Raymond Hill bf591d93fb
Imrpove `no-xhr-if` scriptlet
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/2773

The `randomize` paramater introduced in https://github.com/gorhill/uBlock/commit/418087de9c
is now named `directive`, and beside the `true` value which is meant
to respond with a random 10-character string, it can now take the
following value:

  war:[web_accessible_resource name]

In order to mock the XHR response with a web accessible resource. For
example:

  piquark6046.github.io##+js(no-xhr-if, adsbygoogle.js, war:googlesyndication_adsbygoogle.js)

Will cause the XHR performed by the webpage to resolve to the content
of `/web_accessible_resources/googlesyndication_adsbygoogle.js`.

Should the resource not exist, the empty string will be returned.
2023-08-14 10:03:50 -04:00
Raymond Hill bb41d9594f
[mv3] Use workaround to inject scriptlets in Firefox
Additionally:

Use `export UBO_VERSION=local` at the console to build MV3 extension using
current version of uBO code base. By default, the version is taken from
`./platform/mv3/ubo-version' and usually set to last stable release.
2023-08-11 13:22:25 -04:00
Raymond Hill 79ed0c76cb
Use non-normalized URL for reload/report operations
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/2774
2023-08-10 12:10:19 -04:00
Raymond Hill 7bcc340ab0
Add commented keywords to `googlesyndication_adsbygoogle.js` scriptlet
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/2773
2023-08-10 09:54:58 -04:00
Raymond Hill 3c609793fd
Improve `fingerprint2.js` scriptlet
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/2741
2023-08-09 09:28:05 -04:00
Raymond Hill a3a2ac5ec0
Nothing can come after action operator in procedural cosmetic filters
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/2760
2023-08-09 08:26:35 -04:00
Raymond Hill 96d7b278b4
Output scriplet errors to console in dev build 2023-08-08 10:29:54 -04:00
Raymond Hill 9ac18318af
Fix parsing cosmetic filter anchor when using AdGuard/ABP modifiers
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/2765
2023-08-07 13:58:15 -04:00
Raymond Hill 443c30f18c
Import translation work from https://crowdin.com/project/ublock 2023-08-07 10:46:39 -04:00
Raymond Hill 84cc69aa10
Support negated pattern for stack test in scriptlets
Prepend pattern with `!` to test for unmatched patterns in
stack trace. This applies to sctiplet parameters which purpose
is to test against the stack, i.e. `aost` and `json-prune`.

Additionally, dropped support for JSON notation in favor of
optional variable arguments notation.

Related discussion:
- https://github.com/uBlockOrigin/uBlock-discussions/discussions/789#discussioncomment-6520330
2023-07-31 09:38:04 -04:00
Raymond Hill 223e230e49
Fix looking up clickable URLs in code viewer
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2759
2023-07-29 10:51:15 -04:00
Raymond Hill fdb6dc2cc2
Fix remnants of visible text in collapsed rows
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/2632#discussioncomment-6517792
2023-07-24 07:40:10 -04:00
Viktor Szépe c23a9ada33
Fix typos 2023-07-23 10:01:08 -04:00
Raymond Hill c74fc6460e
Add visual hint for filtered out rows in firewall pane
Related discussion:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/2632
2023-07-22 09:11:23 -04:00
Raymond Hill e23ce99f34
Use `, ` when normalizing list of selectors 2023-07-20 08:05:58 -04:00
Raymond Hill 9ead6ad5ac
Remove obsolete entry
Related commit:
- ee0649329c
2023-07-18 09:42:28 -04:00
Raymond Hill ee0649329c
Remove obsolete web_accessible_resources
Add removed resource as an alias of `no-window-open-if.js`.

Related discussion:
- https://github.com/uBlockOrigin/uAssets/issues/19002#issuecomment-1638367659
2023-07-18 09:39:06 -04:00
Raymond Hill ef42819b33
Import translation work from https://crowdin.com/project/ublock 2023-07-17 09:36:56 -04:00
Raymond Hill cf43be53a6
Fix overly wide source link button
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/2735
2023-07-17 09:17:33 -04:00
Raymond Hill cdf385f5f4
Add missing (deprecated) method to google ima
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2265#issuecomment-1637094149
2023-07-16 11:23:31 -04:00
Raymond Hill aa6baf9a29
Fix regression in handling of experimental `header=` filter option
Also completed fix for reverse lookup issues related to `header=`
filter option:
https://github.com/uBlockOrigin/uBlock-issues/issues/1932
2023-07-14 09:02:10 -04:00
Raymond Hill 0da7e12ea4
Only already normalized CSS selectors can be fast path-compiled
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2730

CSS selectors used in cosmetic filtering are normalized in order
to ignore non-functional differences. For instance:

    example.org##body      p
    example.org#@#body p

The first cosmetic filter should be excepted by the second one,
but this was not the case because the fast path use to compile
common CSS selectors was not causing normalization to take
place.

The fix is to ensure that the fast path used to compile most
common CSS selectors is taken only when in presence of already
normalized CSS selectors.
2023-07-13 18:02:10 -04:00
Raymond Hill fbcd6cf29b
Add scriptlet alias for increased compatibility with AdGuard's lists
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2729#issuecomment-1632373662
2023-07-12 07:50:12 -04:00
Raymond Hill ec06981965
Improve compatibility with AdGuard's scriptlets
Related:
https://testcases.agrd.dev/Filters/scriptlet-rules/test-scriptlet-rules.html
2023-07-11 18:25:21 -04:00
Raymond Hill 4a83b80328
[mv3] Properly enforce generic cosmetic exception filters
Related issue:
- https://github.com/uBlockOrigin/uBOL-issues/issues/58
2023-07-11 14:38:35 -04:00
Raymond Hill 4a570c151f
[mv3] Merge modifyHeaders rules where feasible 2023-07-10 13:13:20 -04:00
Raymond Hill ff7c3d0ad6
Add `permissions=` handling to built-in benchmark 2023-07-10 12:00:02 -04:00
Raymond Hill 0f6400c160
[mv3] Add support for `permissions=` filter option
Related discussion:
https://github.com/uBlockOrigin/uBlock-issues/discussions/2714
2023-07-10 11:56:57 -04:00