Commit graph

1441 commits

Author SHA1 Message Date
Raymond Hill
e713e133eb
Remove "CERT.PL's Warning List" from stock lists
Far too large to be used as a default or stock list.
2025-08-03 08:06:44 -04:00
Raymond Hill
14a9572c86
Remove "AdGuard Tracking Protection"from stock list
It's not needed and too likely to interfere negatively with uBO's
default lists. It was added a long, long time ago when EasyPrivacy
wasn't making use of uBO's own advanced syntax, which is no longer
an issue.
2025-07-31 16:37:10 -04:00
Raymond Hill
d88814bc12
Add filter list for experimental filters 2025-07-23 10:34:19 -04:00
Imre Eilertsen
fd049c9e1f
Added 4 language codes for Firefox. (#3939)
* Added 4 language codes for Firefox.

* Added 4 language codes for Firefox.

* Added Kabyle to Liste AR as well.

As opposed to just AdGuard Français.

* Added Kabyle to Liste AR as well.
2025-06-03 15:40:06 -04:00
Raymond Hill
3cd04c3806
Fix list name; also change for uBOL 2025-05-04 06:42:42 -04:00
Raymond Hill
47f1a19e9e
Change stock UKR list to AdGuard-maintained list 2025-05-04 06:37:31 -04:00
Raymond Hill
8b964a8c54
Fetch diff patches from "reliable" servers only
Some CDN servers take too long to mirror updated resources,
potentially preventing diff-updating to work reliably as
intended.
2025-04-21 15:42:04 -04:00
Raymond Hill
87007e62c0
[mv3] Ensure POL-3 list is separate from POL-0 list in uBOL 2025-04-14 09:07:46 -04:00
Raymond Hill
a06f09acda
Group POL lists together 2025-04-12 09:40:46 -04:00
Raymond Hill
3d2f70ac56
Add POL list for regional malware
Related discussion:
https://github.com/uBlockOrigin/uBlock-discussions/discussions/890#discussioncomment-9632360
2025-04-11 09:06:28 -04:00
Raymond Hill
d1c57d3fa6
Remove stale extraneous POL-2 list
Related issue:
https://github.com/uBlockOrigin/uAssets/issues/27935
2025-04-10 09:35:19 -04:00
Raymond Hill
0c6cbb7fcb
Merge in long overdue change re. UKR list in assets.json
Related discussion:
https://github.com/uBlockOrigin/uBlock-issues/issues/2692
2025-03-31 11:26:41 -04:00
Raymond Hill
b8678d22ea
Remove pointless instructionURL from AdGuard's lists
There is no special extra steps to be taken when enabling an
AdGuard lists, there is no point to have `instructionURL` for
these.

Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3502
2024-12-27 08:34:41 -05:00
Raymond Hill
19f22c438e
Remove pointless instructionURL from AdGuard's lists
There is no special extra steps to be taken when enabling an
AdGuard lists, there is no point to have `instructionURL` for
these.

Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3502
2024-12-26 11:58:34 -05:00
Raymond Hill
3ae28423b9
Remove pointless instructionURL from AdGuard's lists
There is no special extra steps to be taken when enabling an
AdGuard lists, there is no point to have `instructionURL` for
these.

Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3502
2024-12-26 08:05:10 -05:00
Raymond Hill
d47876c547
Use combined list for UKR
As per feedback:
https://github.com/uBlockOrigin/uBlock-issues/issues/2692#issuecomment-2543153158
2024-12-14 11:00:21 -05:00
Raymond Hill
439d608d03
Revert "Use HOSTS version of "Malicious URL Blocklist""
This reverts commit 54ebea31f7.
2024-12-13 11:15:36 -05:00
Raymond Hill
54ebea31f7
Use HOSTS version of "Malicious URL Blocklist"
Related issue:
https://github.com/uBlockOrigin/uBOL-home/issues/256
2024-12-12 20:00:08 -05:00
Raymond Hill
d51a01f0f8
Add regional list for UKR
Related discussion:
https://github.com/uBlockOrigin/uBlock-issues/issues/2692
2024-12-12 12:34:04 -05:00
Raymond Hill
48fed03128
Add "RU AdList: Counters" to stable release of uBO
Related issue:
https://github.com/uBlockOrigin/uBOL-home/issues/229#issuecomment-2408527226
2024-12-04 16:55:18 -05:00
Raymond Hill
4d525f1a55
Move assets/resources into src/js/ 2024-11-27 16:47:11 -05:00
Raymond Hill
adced29b5b
Improve trusted-replace-argument scriptlet
As discussed with filter list maintainers, added ability to
partially replace an argument using the `repl:` prefix. Updated
documentation:

---

@scriptlet trusted-replace-argument.js

@description
Replace an argument passed to a method. Requires a trusted source.

@param propChain
The property chain to the function which argument must be replaced when
called.

@param argposRaw
The zero-based position of the argument in the argument list. Use a negative
number for a position relative to the last argument.

@param argraw
The replacement value, validated using the same heuristic as with the
`set-constant.js` scriptlet.
If the replacement value matches `json:...`, the value will be the
json-parsed string after `json:`.
If the replacement value matches `repl:/.../.../`, the target argument will
be replaced according the regex-replacement directive following `repl:`

@param [, condition, pattern]
Optional. The replacement will occur only when pattern matches the target
argument.

---

Aditionally, more scriptlets moved into their own files.
2024-11-27 15:53:50 -05:00
Raymond Hill
b4a5b411b5
Add "RU AdList: Counters" to stock list
Shouldn't be enabled by default, to conform it's working as
intended.

Related discussion:
https://github.com/uBlockOrigin/uBOL-home/discussions/37#discussioncomment-9629942
2024-11-16 12:01:30 -05:00
Raymond Hill
51edb13a06
Minor code review 2024-11-16 09:54:19 -05:00
Raymond Hill
5f5e3d730f
Improve spoof-css scriptlet
Added special properties to spoof output of getBoundingClientRect().
2024-11-16 09:26:09 -05:00
Raymond Hill
c8174d6032
Improve trusted-set-attr scriptlet
Related feedback:
11ca4a3923 (commitcomment-149148167)
2024-11-16 08:10:25 -05:00
Raymond Hill
e5a088738d
Keep moving related scriptlets into separate files 2024-11-08 11:22:31 -05:00
Raymond Hill
ce4908b341
Improve prevent-xhr scriptlet 2024-11-08 08:48:07 -05:00
Raymond Hill
41616df866
Improve trusted-suppress-native-method scriptlet
Add `debug` as disposition option: if the `how` parameter is `debug`,
the scriptlet will trigger a `debugger` statement and the target
method won't be suppressed. Useful to find out how the method is
being called by page code. To be used for investigation purpose only.
2024-11-08 08:32:19 -05:00
Sander Lepik
f90ccb7c62
Move Estonian list away from .php extension (#3926) 2024-11-07 10:27:26 -05:00
Raymond Hill
e613282698
Improve set-cookie scriptlet
Allow negative integer as valid value.

Related issue:
https://github.com/gorhill/uBlock/pull/3927

Additionally, move cookie-related scriptlets/helpers into its own
source code file.
2024-11-07 10:23:34 -05:00
Raymond Hill
e164250fea
Comment 2024-11-05 09:26:23 -05:00
Raymond Hill
8884f259c1
Improve prevent-refresh scriptlet
Related discussion:
https://github.com/uBlockOrigin/uAssets/issues/25859#issuecomment-2449623891
2024-11-01 11:33:34 -04:00
Raymond Hill
11ca4a3923
Add trusted-set-attr scriptlet
@trustedScriptlet trusted-set-attr

@description
Sets the specified attribute on the specified elements. This scriptlet runs
once when the page loads then afterward on DOM mutations.

Reference: https://github.com/AdguardTeam/Scriptlets/blob/master/wiki/about-trusted-scriptlets.md#-%EF%B8%8F-trusted-set-attr

@param selector
A CSS selector for the elements to target.

@param attr
The name of the attribute to modify.

@param value
The new value of the attribute. Since the scriptlet requires a trusted
source, the value can be anything.

=====

Additionally, start to move scriptlets into their own source files
for easier maintenance and code review.
2024-10-25 19:12:08 -04:00
Raymond Hill
4291c874d9
Fix regression in prevent-xhr scriptlet
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3418
2024-10-17 12:11:50 -04:00
Fanboynz
4d982d9972
Add forbidden/forever values (#3925) 2024-10-11 08:26:37 -04:00
Raymond Hill
85877b12ed
Improve prevent-window-open scriptlet
Support triggering a `debugger` statement when `window.open()` is
called.

Related feedback:
https://github.com/uBlockOrigin/uAssets/issues/25510#issuecomment-2400067735
2024-10-08 19:47:35 -04:00
Raymond Hill
160d7f3c33
Improve trusted-override-element-method scriptlet
Support `debug` as valid `disposition` value: to trigger a `debugger`
statement, but only if uBO's logger is opened.

Related feedback:
https://github.com/uBlockOrigin/uAssets/issues/25510#issuecomment-2395446342
2024-10-06 11:07:42 -04:00
Raymond Hill
6d2b3375f8
Mind that BroadcastChannel contructor can throw in Firefox
BroadcastChannel constructor throws in Firefox when Enhanced
Tracking Protection is set to "strict".

This behavior could cause scriptlet injection to wholly break
when uBO's logger was opened, as BroadcastChannel() is used
by scriptlets to report information to the logger.

This commit ensures that exceptions from BroadcastChannel
constructor are properly handled.

The scriptlets will fall back to report at the console should
they be unable to report to the logger through BroadcastChannel.
2024-10-05 12:42:30 -04:00
Raymond Hill
95b0ce5e3a
Add trusted-override-element-method scriptlet
@description
Override the behavior of a method on matching elements.

@param methodPath
The method which calls must be intercepted.

@param [selector]
A CSS selector which the target element must match. If not specified,
the override will occur for all elements.

@param [disposition]
How the override should be handled. If not specified, the overridden call
will be equivalent to an empty function. If set to `throw`, an exception
will be thrown. Any other value will be validated and returned as a
supported safe constant.

@example
..##+js(trusted-override-element-method, HTMLAnchorElement.prototype.click, a[target="_blank"][style])
2024-10-05 08:35:43 -04:00
Raymond Hill
a0a33eb9b9
Code review for new trusted-prevent-dom-bypass scriptlet
Related commit:
https://github.com/gorhill/uBlock/commit/1abc864742
2024-10-05 07:41:44 -04:00
Raymond Hill
1abc864742
Add trusted-prevent-dom-bypass scriptlet
@description
Prevent the bypassing of uBO scriptlets through anonymous embedded context.

To ensure that a target method in the embedded context is using the
corresponding parent context's method (which is assumed to be
properly patched), or to replace the embedded context with that of the
parent context.

Root issue:
https://issues.chromium.org/issues/40202434

@param methodPath
The method which calls must be intercepted. The arguments
of the intercepted calls are assumed to be HTMLElement, anything else will
be ignored.

@param selector (optional)
A plain CSS selector which will be used in a `document.querySelector()`
call, to validate that the returned element must be processed by the
scriptlet. If no selector is provided, all elements will be processed.

@param targetMethod (optional)
The method in the embedded context which should be delegated to the
parent context. If no method is specified, the embedded context becomes
the parent one, i.e. all  properties of the embedded context will be that
of the parent context.
2024-10-04 12:24:35 -04:00
Ilya (Marshal)
9f4123a4e2
Fix AdGuard Knowledge Base URLs 2024-10-04 11:27:24 +02:00
Raymond Hill
fe49ced2ac
Imrpove prevent-xhr scriptlet; add trusted-prevent-xhr scriptlet
Add support for synchronous `send()` calls.

`trusted-prevent-xhr` is essentially the same as `prevent-xhr` except
that if the `directive` argument is not a known token, it will be
used as is as the response text of the xhr request, whereas `prevent-xhr`
returns an empty string when the directive is unknown.
2024-10-03 13:31:52 -04:00
Raymond Hill
4ccc0d0fda
Minimize memory allocation in scriptlet helper proxy-apply-fn
Probably beneficial in cases of proxied method called in a tight
loop.

Additionally, added `throwFunc` as valid constant in script helper
`validate-constant.fn`. Does what the name implies.
2024-09-19 07:49:54 -04:00
Raymond Hill
11c3a16036
Fix exception thrown in spoof-css in Firefox
Related feedback:
https://github.com/uBlockOrigin/uAssets/issues/25358#issuecomment-2358278979
2024-09-18 10:34:18 -04:00
Raymond Hill
fe3846b72f
Oops meant to be 5s, not 300s... 2024-09-17 18:10:09 -04:00
Raymond Hill
e8f6f3ddff
Throttle down repeated scriptlet logging information
Related feedback
https://github.com/uBlockOrigin/uBlock-issues/issues/3378#issuecomment-2356422784
2024-09-17 17:33:06 -04:00
Raymond Hill
547fae4842
Improve scriptlet helper proxy-apply
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3378
2024-09-17 09:09:19 -04:00
Raymond Hill
901b4ad061
Import changes from https://github.com/gorhill/uBlock/pull/3924 2024-09-05 14:51:47 -04:00