Commit Graph

1388 Commits

Author SHA1 Message Date
Raymond Hill c8307f58a3
Improve `xml-prune` scriptlet
Related feedback:
https://github.com/uBlockOrigin/uAssets/issues/25164#issuecomment-2326358453
2024-09-03 11:15:16 -04:00
Raymond Hill f552f655cb
Fix `prevent-window-open` for when logger is open
Related discussion:
https://github.com/uBlockOrigin/uBlock-discussions/discussions/906
2024-08-31 12:36:20 -04:00
Raymond Hill 7f11d6216e
Improve `prevent-window-open` scriptlet
As discussed with filter list maintainers.
2024-08-30 10:25:39 -04:00
Raymond Hill ae5dc6299e
Improve `validate-constant` scriptlet helper
Add support for `json:`-prefixed values.
2024-08-29 13:47:48 -04:00
Raymond Hill 0dcb985601
Improve `trusted-replace-outbound-text` scriptlet
When the replacement starts with `json:`, it will be first
decoded using JSON.parse(). Example:

example.com##+js(trusted-replace-outbound-text, somefn, json:"ok")

The doublequotes are required since this is what JSON.parse()
expects as a valid JSON string.
2024-08-27 12:49:35 -04:00
Raymond Hill 3a249f395c
Improve `prevent-xhr` scriptlet
As per filter list maintainers feedback.
2024-08-26 14:28:53 -04:00
Raymond Hill 79e10323ad
Use helper function to lookup safe cookie values
This helper function is now used by `set-cookie` and
`set-local-storage-item` scriptlets, so changes in the
helper function will benefit both scriptlets.
2024-08-19 14:56:15 -04:00
Fanboynz 3e2171f550
Add checked/unchecked to set-cookie (#3923) 2024-08-19 14:40:33 -04:00
Fanboynz 41c2258f91
Add allowed/denied to set-local-storage (#3922) 2024-08-18 09:14:44 -04:00
Raymond Hill 5287f6e029
Code review of scriptlet helper 2024-08-18 09:12:54 -04:00
Raymond Hill 56dfdd2568
Improve various scriptlets
Specifically, improve proxying of native methods.
2024-08-16 11:49:16 -04:00
Raymond Hill db3dc69bcc
Improve `href-sanitizer` sciptlet
Tolerate unexpected spaces in extracted URL parameters.

Related feedback:
https://github.com/uBlockOrigin/uBlock-issues/issues/3297#issuecomment-2283806183
2024-08-12 13:45:46 -04:00
Raymond Hill fb037e97d0
[mv3] Improve `remove-attr.js` scriptlet
Related issue:
https://github.com/uBlockOrigin/uBOL-home/issues/166
2024-08-06 14:47:03 -04:00
Raymond Hill 3668445679
Use random trusted-types policy name
Related commit:
4f0d1301ab
2024-08-04 00:15:40 -04:00
Raymond Hill 4f0d1301ab
Improve `trusted-replace-node-text` scriptlet
Related discussion:
https://github.com/brave/adblock-resources/pull/194
2024-08-03 20:09:21 -04:00
Raymond Hill ec633887dd
Improve `abort-on-stack-trace` scriptlet
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3314
2024-07-28 10:44:17 -04:00
Fanboynz 76246f2c59
Add dismissed to set-cookie (#3921) 2024-07-27 08:26:59 -04:00
Raymond Hill 84be9cde6d
Improve `href-sanitizer` scriptlet
Support ability to recursively unwrap destination URL. Example:

    ...##+js(href-sanitizer, a.clickTracker, ?r?u)

Related discussion:
https://github.com/uBlockOrigin/uBlock-discussions/discussions/775#discussioncomment-10120835
2024-07-23 09:21:17 -04:00
Raymond Hill bf75dc2f90
Code review of `trusted-replace-node-text` scriptlet 2024-07-22 09:51:40 -04:00
Raymond Hill 14d90418b8
Fix regression in `trusted-replace-node-text` scriptlet
Related commit:
8afd9e233d
2024-07-21 08:34:18 -04:00
Raymond Hill 62f87b0ea8
Rename parameters as per earlier commit
Related commit:
8afd9e233d
2024-07-20 09:43:08 -04:00
Raymond Hill 8afd9e233d
Improve `trusted-replace-node-text` scriptlet
Related discussion:
https://github.com/uBlockOrigin/uAssets/discussions/23769#discussioncomment-10102276
2024-07-20 08:57:11 -04:00
Fanboynz f2c4328a2e
Switch to updated Icelandic ABP List (#3920) 2024-07-19 08:01:38 -04:00
Raymond Hill 77feb25c4d
Improve `set-constant` scriptlet
Related feedback:
https://github.com/uBlockOrigin/uBlock-discussions/discussions/881#discussioncomment-10072370
2024-07-17 09:36:55 -04:00
Raymond Hill 9ce3056361
Improve `prevent-fetch` scriptlet
Add `statusText` as overridable property in response instance.

Supported values are: `""`, `"Not Found"`. `statusText` defaults
to `"OK"` when not overridden.
2024-07-14 12:15:53 -04:00
Raymond Hill e785b99338
Improve `prevent-fetch` scriptlet
Related discussion:
https://github.com/uBlockOrigin/uBlock-discussions/discussions/848#discussioncomment-10027757

Added support for AdGuard's `responseType` parameter. Extended the
meaning of that 3rd parameter to also be a JSON string with
properties to set on the returned response instance. Currently
supported properties:

- `ok`, supported values: `false`, `true`
- `type, supported values: `"basic"`, `"cors"`, `"opaque"`

Reference:
https://github.com/AdguardTeam/Scriptlets/blob/master/wiki/about-scriptlets.md#-%EF%B8%8F-prevent-fetch
2024-07-13 11:02:54 -04:00
Raymond Hill 66e3a1ad47
Improve `href-sanitizer` scriptlet
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3297

Mind that the sanitized URL can have Unicode characters beyond
ASCII.
2024-07-10 12:43:36 -04:00
Raymond Hill 97d11c03c2
Add `trusted-suppress-native-method` scriptlet
Reference:
https://github.com/AdguardTeam/Scriptlets/blob/5a92d79489/wiki/about-trusted-scriptlets.md#trusted-suppress-native-method

This is a first draft version, see code comments for details.
2024-07-09 13:03:50 -04:00
Raymond Hill a3576ea651
Add support for `$currentISODate$` in `trusted-set-cookie` scriptlet
Related discussion:
https://github.com/uBlockOrigin/uAssets/discussions/20789#discussioncomment-9979107
2024-07-07 11:19:40 -04:00
Fanboynz 37d31a82d8
Add essential and nonessential to set-cookie (#3919) 2024-07-07 09:25:34 -04:00
Raymond Hill 8eb3b19c69
Improve logging in `prevent-addEventListener` scriptlet
Related feedback:
https://github.com/uBlockOrigin/uAssets/discussions/17907#discussioncomment-9871079
2024-06-25 09:08:46 -04:00
scripthunter7 83aee4a516 Update subscription URL for hufilter 2024-06-20 10:48:09 +02:00
Raymond Hill b4d8750f44
Improve `set-cookie` scriptlet
Related feedback:
https://github.com/uBlockOrigin/uBlock-issues/issues/3178#issuecomment-2178502856
2024-06-19 08:48:54 -04:00
Raymond Hill cb0f65e035
Improve `trusted-replace-node-text` scriptlet
Related discussion:
https://github.com/uBlockOrigin/uAssets/discussions/24143
2024-06-18 10:03:54 -04:00
Fanboynz bdb99862ce
Add hide and hidden to set-cookie (#3918) 2024-06-14 14:32:11 -04:00
Raymond Hill 9072772f61
Improve `trusted-replace-[fetch|xhr]-response` scriptlets
Related discussion:
https://github.com/uBlockOrigin/uBlock-discussions/discussions/831#discussioncomment-9750621
2024-06-13 09:32:30 -04:00
Raymond Hill 91ee5bdeae
Improve `prevent-addEventListener` scriptlet
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3061#issuecomment-2159662039
2024-06-11 07:44:43 -04:00
Raymond Hill fa6740a059
Improve `trusted-replace-outbound-text` scriptlet
As per filter list maintainers feedback.
2024-06-05 08:40:02 -04:00
Raymond Hill cc417a0cd4
Fix transition to AdGuard Dutch from EasyDutch
Related feedback:
https://github.com/uBlockOrigin/uBlock-issues/discussions/3250

Related commit:
f1f63c940b
2024-06-03 10:46:08 -04:00
Raymond Hill 0e1e4b82c5
Improve `trusted-set-cookie` scriptlet
Replace placehoders instead of direct assignement

Related feedback:
https://github.com/uBlockOrigin/uAssets/pull/23877#issuecomment-2134417389
2024-05-28 09:18:09 -04:00
Raymond Hill 59ffc96e89
Fallback to requestAnimationFrame when requestIdleCallback is not available
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3237
2024-05-16 09:29:12 -04:00
Fanboynz 7f0b2f4a5e
Add Approved/disapproved (#3917) 2024-05-14 21:51:27 -04:00
Raymond Hill ee67cd6284
Improve `trusted-click-element` scriptlet
Use `openOrClosedShadowRoot` to lookup shadow root.

Related issue:
https://github.com/AdguardTeam/AdguardFilters/issues/178995
2024-05-14 11:37:19 -04:00
Raymond Hill ca7d2ad61d
Replace EasyDutch with AdGuard Dutch
Related discussion:
https://github.com/uBlockOrigin/uBlock-discussions/discussions/380#discussioncomment-9402570
2024-05-12 10:19:37 -04:00
Raymond Hill f1f63c940b
Replace EasyDutch with AdGuard Dutch
Related discussion:
https://github.com/uBlockOrigin/uBlock-discussions/discussions/380#discussioncomment-9402570
2024-05-12 10:17:54 -04:00
Raymond Hill 509dba1441
Fix regression in previous commit
Related feedback:
https://github.com/uBlockOrigin/uAssets/issues/23652#issuecomment-2105555721

Related commit:
2ccc3135c1
2024-05-11 19:05:14 -04:00
Fanboynz 363ad6795c
Add accept/reject to local-storage (#3916) 2024-05-09 20:51:07 -04:00
Raymond Hill 4d8ee35ef7
Improve `noeval-if` scriptlet
Related feedback:
https://github.com/uBlockOrigin/uBlock-discussions/discussions/841#discussioncomment-9320245
2024-05-05 11:46:16 -04:00
Raymond Hill 2ccc3135c1
Improve `trusted-set-local-storage-item` scriptlet
Related discussion:
df1041c616 (commitcomment-141265533)
2024-05-05 06:54:46 -04:00
Raymond Hill 91dfcbef2a
Improve `remove-[attr|class]` scriptlets
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3215
2024-04-17 09:17:49 -04:00