Commit graph

4879 commits

Author SHA1 Message Date
Raymond Hill
68a256bdde
Improve trusted-prevent-dom-bypass scriptlet 2025-03-25 12:12:00 -04:00
Raymond Hill
e100f9e85c
Import translation work from https://crowdin.com/project/ublock 2025-03-25 08:20:43 -04:00
Raymond Hill
d18311213d
Improve jsonl-prune-... scriptlets 2025-03-24 12:16:10 -04:00
Raymond Hill
0fce659bb0
Use Object.hasOwn instead of Object.prototype.hasOwnProperty
Reference:
https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwn
2025-03-24 08:15:09 -04:00
Raymond Hill
0c8de6b550
Fix prevent-innerHTML scriptlet 2025-03-24 07:33:21 -04:00
Raymond Hill
8f78faf980
Import translation work from https://crowdin.com/project/ublock 2025-03-22 16:11:10 -04:00
Raymond Hill
95a3be9d56
Add jsonl-prune-xhr-response/jsonl-prune-fetch-response scriptlets
As discussed internally with filter list volunteers.
2025-03-22 16:01:43 -04:00
Raymond Hill
7a2f4960d0
Import translation work from https://crowdin.com/project/ublock 2025-03-21 13:29:30 -04:00
Raymond Hill
88fa550a96
Improve [json-prune|trusted-replace]-fetch-response scriptlets
Output more information to the logger in verbose mode.
2025-03-20 12:06:58 -04:00
Raymond Hill
5b81369fc2
bidiTrie is hardcoded
Thus no need to threat it as if it was a changing parameter.
2025-03-20 12:03:17 -04:00
Raymond Hill
76b80baaea
Fix TypedArray overflow
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3582
2025-03-20 07:14:38 -04:00
Raymond Hill
18349292a6
Improve logging ability in new prevent-innerHTML scriptlet 2025-03-19 12:43:36 -04:00
Raymond Hill
fe744816f1
Add prevent-innerHTML scriptlet
@description
Conditionally prevent assignment to `innerHTML` property.

@param [selector]
Optional. The element must matches `selector` for the prevention to take
place.

@param [pattern]
Optional. A pattern to match against the assigned value. The pattern can be
a plain string, or a regex. Prepend with `!` to reverse the match condition.

As discussed with filter list volunteers.
2025-03-19 12:34:03 -04:00
Raymond Hill
98b011f64c
[mv3] Add support for explicit generichide filter option
`generichide` option is implicitly enforced on all sites unless an
exception overrides `generichide`. Though rare, sometimes a
`generichide` exception needs to be overridden so that generic
cosmetic filtering is made possible on a specific site.

This commit is to add support for restoring generic cosmetic
filtering on sites which were excluded through a `generichide`
exception.

Concretely, this is needed to ensure the test suite can properly
verify that generic cosmetic filtering is working when the
filtering mode is set to "complete":

||ublockorigin.github.io^$generichide,important
2025-03-18 17:15:35 -04:00
Raymond Hill
d36ea89a02
Improve prevent-set[Timeout|Interval] scriptlets 2025-03-17 08:02:30 -04:00
Raymond Hill
4aebdbb0a9
Add quit button to element zapper mode
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/1968

Given the availability of this new quit button, the element zapper
will now default to stick around after zapping an element.
2025-03-16 05:50:53 -04:00
Raymond Hill
9e946ce0c3
Improve trusted-override-element-method scriptlet
As discussed with filter list maintainers:
https://github.com/uBlockOrigin/uBlock-discussions/discussions/933
2025-03-15 07:50:28 -04:00
Raymond Hill
db7210a24a
Import translation work from https://crowdin.com/project/ublock 2025-03-14 10:59:26 -04:00
Raymond Hill
34cea70924
Disable obsolete cache-control workaround for Firefox
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3576

This is the first step, a trivial code change which disable the
injection of `Cache-Control` header in Firefox.

In the next dev cycle, the second step will be to remove all
the code related to `Cache-Control` injection.
2025-03-14 10:47:14 -04:00
Raymond Hill
a009623d97
[mv3] Improve generic cosmetic filtering
Specifically, properly exclude generic cosmetic filters according to
specific cosmetic exceptions.

Related issue:
https://github.com/uBlockOrigin/uBOL-home/issues/181
2025-03-13 13:15:27 -04:00
Raymond Hill
7db84ef13d
Do not blindly force https in urlskip
Related discussion:
https://github.com/uBlockOrigin/uBlock-issues/issues/3206#issuecomment-2708584507
2025-03-11 09:15:40 -04:00
Raymond Hill
bf9549115c
Import translation work from https://crowdin.com/project/ublock 2025-03-08 17:22:46 -05:00
Raymond Hill
31d82c494b
Fix typo in variable name 2025-03-06 14:15:02 -05:00
Raymond Hill
03fb6ee059
Import translation work from https://crowdin.com/project/ublock 2025-03-06 09:59:35 -05:00
Raymond Hill
fc231998b9
Improve overlay-buster scriptlet
Related discussion:
https://github.com/uBlockOrigin/uBlock-issues/discussions/3470
2025-03-06 09:50:37 -05:00
Raymond Hill
a483f7955f
Add ability to inject scriptlets according to origin of ancestor contexts
New syntax for scriptlet-based filtering: it is now possible to
inject a scriptlet in a context according to whether an ancestor
origin matches a specific hostname. Example:

  example.com>>##+js(set, iAmEmbeddedInExampleDotCom, true)

The new `>>` specifier means that the scriptlet will not be injected
in `example.com`, but will be injected in all direct and indirect
embedded contexts in pages loaded from `example.com`

The new ancestor domain specifier also works for entity directives:

  example.*##+js(set, iAmEmbeddedInExampleDotEffectiveTLD, true)

This is an experimental feature, to be further evaluated and
discussed by filter list maintainers. This is not a complete
implementation, by choice. Do not open issues regarding this
new syntax, the current shortcomings are known.

The new syntax is being discussed internally at:
https://github.com/uBlockOrigin/uBlock-discussions/discussions/244
2025-03-06 08:57:27 -05:00
Raymond Hill
e636c32f2a
Fix range parser in prevent-setTimeout scriptlet
Related feedback:
https://github.com/uBlockOrigin/uBlock-discussions/discussions/925#discussioncomment-11940830
2025-03-04 07:12:56 -05:00
Raymond Hill
987ddad1fd
[mv3] Adjust as per feedback
Related discussion:
https://github.com/uBlockOrigin/uBOL-home/issues/156#issuecomment-2696060398
2025-03-04 07:02:41 -05:00
Raymond Hill
1dbd280ba3
[mv3] Convert domain= to to= for csp=/permissions= options
Related discussion:
https://github.com/uBlockOrigin/uBOL-home/issues/156#issuecomment-2694741399
2025-03-03 11:45:54 -05:00
Raymond Hill
34df044808
Add filter option synonyms for strict1p/strict3p
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3554
2025-03-01 16:26:46 -05:00
Raymond Hill
36404543e4
Increase URL buffer size to 8192 (from 2048)
Related:
https://github.com/easylist/easylist/commit/777d7ba9
2025-03-01 14:48:51 -05:00
Raymond Hill
cff88d547f
Import translation work from https://crowdin.com/project/ublock 2025-03-01 09:26:44 -05:00
Raymond Hill
ea8853cda3
Use onmessage/postMessage instead of BroadcastChannel in diff updater 2025-02-28 17:18:48 -05:00
Raymond Hill
d41989e62a
Improve disable-newtab-links scriptlet
Related discussion:
https://github.com/uBlockOrigin/uBlock-issues/discussions/3551
2025-02-25 13:02:44 -05:00
Raymond Hill
9c26a07b53
Improve prevent-addEventListener scriptlet
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3360
2025-02-24 12:47:54 -05:00
Raymond Hill
e56ca0f612
Import translation from https://crowdin.com/project/ublock 2025-02-23 12:20:17 -05:00
Raymond Hill
0013e04fd3
Import translation work from https://crowdin.com/project/ublock 2025-02-22 07:47:33 -05:00
Raymond Hill
ce724d5c47
Import translation work from https://crowdin.com/project/ublock 2025-02-20 15:19:57 -05:00
Raymond Hill
5921e50e03
Fix reverse lookup of ##^responseheader(...) filters
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3544
2025-02-20 15:11:36 -05:00
Raymond Hill
9bb1a2baaf
Improve evaldata-prune scriptlet 2025-02-20 09:47:36 -05:00
Raymond Hill
9f27b9fedd
Import translation work from https://crowdin.com/project/ublock 2025-02-20 09:02:06 -05:00
Raymond Hill
344539d793
Comply with Mozilla's "User Consent and Control"
Make clear that the hostname of the page with issue is being sent
to GitHub's server when searching existing reports or creating a
new report.
2025-02-20 08:06:50 -05:00
Raymond Hill
0df7faffac
Improve noeval-if scriptlet
Related feedback:
https://github.com/uBlockOrigin/uBlock-issues/issues/2907#issuecomment-2660051167
2025-02-19 14:01:27 -05:00
Raymond Hill
f12351688a
Import translation work from https://crowdin.com/project/ublock 2025-02-19 07:51:43 -05:00
Fanboynz
35a47d674b
Add "closed","next", "mandatory", "agree/disagree" values to cookies.js (#3934)
* Add closed and next values to cookies.js

* Add mandatory to cookie value

* Add disagree/aggree
2025-02-19 07:36:02 -05:00
Raymond Hill
60ed584fc1
Import translation work from https://crowdin.com/project/ublock 2025-01-15 10:06:48 -05:00
Raymond Hill
ab0f4ba0d4
[mv3] Fix conversion of filters with important option
Related issue:
https://github.com/uBlockOrigin/uBOL-home/issues/266
2025-01-10 10:25:15 -05:00
Raymond Hill
f8975e3a6a
Better integrate latest eslint version 2025-01-10 10:25:15 -05:00
Fanboynz
4b12247da1
Add decline value to cookie.js (#3933) 2025-01-10 09:21:19 -05:00
Raymond Hill
2266473336
Fix regression in trusted-replace-argument scritplet
Related feedback:
https://github.com/uBlockOrigin/uBlock-discussions/discussions/859#discussioncomment-11751928

Regression from:
adced29b5b
2025-01-06 20:04:22 -05:00