Raymond Hill
81b2fcee5d
Fine tune logging capabilities of `json-prune` scriptlet
...
This extends logging capabilities of `json-prune` scriptlet as
follow:
...##+js(json-prune, a, b, stackNeedle, log, [logneedle], logstack, 1)
Whereas before, the only way to log `json-prune` usage was to skip
providing the property chain:
...##+js(json-prune, , b)
Where `b` was the expression to filter out logging output.
With the extended logging capabilities, the logging output can
be filtered out with `logneedle`, which can be a regex literal.
Additionally, to log the stack trace the `stackNeedle` argument
must be set to non-empty string. You can use `/.^/` to log the
stack trace without matching it.
2023-07-29 10:22:52 -04:00
Raymond Hill
bc74ea82af
Deploy changes in assets.dev.json to assets.json
...
Related commit:
- https://github.com/gorhill/uBlock/commit/f6954430d197
2023-07-28 11:16:59 -04:00
Raymond Hill
4649ae4d78
Add `stackNeedle` argument to `json-prune` scriptlet
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2757
2023-07-27 09:41:56 -04:00
Raymond Hill
6d7674e69f
Improve logic to detect `XMLDocument` response in `xml-prune`
...
Related discussion:
- https://github.com/uBlockOrigin/uBlock-discussions/discussions/792#discussioncomment-6561841
Additionally, added extra parameter `..., logdoc, 1` to allow dumping whole
document being worked on to the console.
2023-07-27 08:39:28 -04:00
Raymond Hill
ba31d3c898
Convert `abort-current-script` to variable paramater list
...
Related feedback:
- https://github.com/uBlockOrigin/uAssets/discussions/19154
2023-07-25 09:22:47 -04:00
Raymond Hill
334a7440f3
Improve `xml-prune` scriptlet
...
Related feedback:
- https://github.com/uBlockOrigin/uBlock-discussions/discussions/792#discussioncomment-6536598
2023-07-25 09:06:54 -04:00
Raymond Hill
fa489fdb87
Improve `remove-class` behavior
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2750
2023-07-24 07:33:33 -04:00
Viktor Szépe
c23a9ada33
Fix typos
2023-07-23 10:01:08 -04:00
Raymond Hill
8ddad9e39b
Add `$currentISODate$` to `trusted-set-local-storage-item` scriptlet
...
Related feedback:
- https://github.com/uBlockOrigin/uAssets/issues/19120#issuecomment-1646524557
Additionally, improve logging in `m3u-prune` scriptlet.
2023-07-22 07:57:47 -04:00
peace2000
da8fe2f950
Add 'deny' as valid value for set-cookie ( #3897 )
...
AG added it as well.
6f36f888bb
2023-07-22 06:31:27 -04:00
Raymond Hill
03d0d8d4ce
Eliminate case-sensitivity from values in `set-cookie` scriptlet
...
Related discussion:
- https://github.com/uBlockOrigin/uAssets/discussions/18762#discussioncomment-6338716
Additionally, add `allow` as valid value.
2023-07-20 07:53:14 -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
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
6e78ee096a
Fix handling of empty strings for `set`/`set-attr` scriptlets
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2729
2023-07-11 15:10:27 -04:00
Raymond Hill
786d9b2212
Add `set-attr` scriptlet
...
Reference:
- https://github.com/AdguardTeam/Scriptlets/blob/master/src/scriptlets/set-attr.js
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2347
2023-07-06 08:51:31 -04:00
Raymond Hill
fea6f7f311
Do not bail too early when trapping properties in `acs` scriptlet
...
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2130#issuecomment-1621684566
2023-07-05 10:00:31 -04:00
Raymond Hill
083a318090
Add `set-session-storage-item` scriptlet
...
Reference:
- https://github.com/AdguardTeam/Scriptlets/blob/master/src/scriptlets/set-session-storage-item.js
2023-07-04 07:13:22 -04:00
Raymond Hill
1f57822c33
Add `Accept`/`Reject` as valid values for `set-cookie` scriptlet
...
Related discussion:
- https://github.com/uBlockOrigin/uAssets/discussions/18762
2023-07-01 10:25:19 -04:00
Raymond Hill
e0b4b3d830
Add alias for scriptlet to increase compatibility with AdGuard filter lists
2023-07-01 10:20:23 -04:00
Raymond Hill
b283d6aa33
Add support to remove values in `set-local-storage-item` scriptlet
...
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/2697#discussioncomment-6278359
When using the special value `$remove$`, the scriptlet will remove
the item from the local storage.
2023-06-30 09:03:17 -04:00
Raymond Hill
fd036a51ee
Add compatibility with AdGuard's `#%#//scriptlet(...)` syntax
...
Related issue:
- https://github.com/AdguardTeam/Scriptlets/issues/332
Additionally, uBO's own scriplet syntax now also accept quoting
the parameters with either `'` or `"`. This can be used to avoid
having to escape commas when they are present in a parameter.
2023-06-28 19:35:22 -04:00
Raymond Hill
e0b3b44080
Skip regex-testing context when no context provided
...
Related issue:
- https://github.com/uBlockOrigin/uAssets/issues/18725
Testing the context was causing the deprecated static property
RegExp.$1 to be clobbered, causing webpage breakage because this
property was subsequently used used by the caller.
2023-06-28 18:12:17 -04:00
Raymond Hill
ea4afc0610
Minor code review of `set-local-storage-item` scriptlet
2023-06-23 08:23:08 -04:00
Raymond Hill
f6954430d1
Add support for sublist at any tree depth in "Filter lists" pane
2023-06-21 09:11:21 -04:00
Raymond Hill
9607cba1f6
Group EasyList cookies and uBO cookies as sublists of EasyList/uBO cookies
2023-06-20 13:44:08 -04:00
Raymond Hill
2271834e5c
Revert "Combine EasyList and uBO cookie-related lists"
...
This reverts commit 13fdf25170
.
2023-06-20 12:36:28 -04:00
Raymond Hill
13fdf25170
Combine EasyList and uBO cookie-related lists
2023-06-20 12:01:50 -04:00
Raymond Hill
9443ba80a0
Add `set-local-storage-item`/`trusted-set-local-storage-item` scriptlets
...
Related discussion:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/2697
2023-06-20 10:59:48 -04:00
Raymond Hill
7901a00bd7
Fix handling of `path` in `set-cookie` scriptlet
...
As per feedback from filter list volunteers.
2023-06-18 15:13:54 -04:00
Raymond Hill
bd7318da3c
Fix `m3u-prune` scriptlet
...
Related issue:
- https://www.reddit.com/r/uBlockOrigin/comments/14cbznu/foxcom_ssai_workaround/
2023-06-18 14:29:11 -04:00
Raymond Hill
0bd4b600cf
Rework `nowoif` scriptlet
...
New official name: `no-window-open-if`.
The pattern will now be matched against all arguments passed
to `window.open()`: all the arguments are joined as a single
space-spearated string, and the result is used as the target
for matching the pattern.
To enable logging, used the extra parameters approach, i.e.
`log, 1`, which should come after the positional arguments
`pattern`, `delay`, and `decoy`.
2023-06-17 11:53:08 -04:00
Raymond Hill
112e41b9d5
Fine tune new `set-cookie`/`trusted-set-cookie` scriptlet
...
Added support for extra parameter `reload, 1`. If present,
the scriplet will force a reload of the webpage if the cookie
being set was not already set.
As per feedback from filter list maintainers.
2023-06-16 11:32:12 -04:00
Raymond Hill
5d596b644d
Remove stray whitespaces
2023-06-15 20:00:57 -04:00
Raymond Hill
eaea26b5e9
Add `trusted-set-cookie` scriptlet
...
This new scriptlet is only valid when used in a trusted lists.
Implementation follows:
https://github.com/AdguardTeam/Scriptlets/blob/master/src/scriptlets/trusted-set-cookie.js
2023-06-15 19:57:10 -04:00
Raymond Hill
27a54c0845
Add `set-cookie` scriptlet
...
This new scriptlet is only valid when used in a trusted lists.
Implementation follows:
https://github.com/AdguardTeam/Scriptlets/blob/master/src/scriptlets/set-cookie.js#L16
2023-06-15 11:08:35 -04:00
Raymond Hill
103bdb63c5
Use hard tabs
2023-06-09 08:02:29 -04:00
Raymond Hill
5e46978b8c
Update `contentURL` of NLD
...
Related discussion:
- https://github.com/uBlockOrigin/uAssets/discussions/17919
2023-06-09 07:59:43 -04:00
Raymond Hill
257cfad90d
Update `assets.json` for uBO 1.50.0
...
This may cause some list namesw to not be rendered in a quirky
way in Chromium-based browsers due to country flags emojis not
being available, but this will fixed once people move to
uBO 1.50.0.
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2645
References:
- https://en.wikipedia.org/wiki/Regional_indicator_symbol
2023-06-07 10:31:46 -04:00
Raymond Hill
f8c4b8e52d
Add support to remove attributes in xml-prune scriptlet
...
Related issue:
- https://github.com/uBlockOrigin/uAssets/issues/18244
2023-06-05 08:51:20 -04:00
Raymond Hill
f3b720d532
Improve `href-sanitizer` scriptlet
2023-05-30 09:13:46 -04:00
Raymond Hill
56e1d92dbd
Fix/improve scriptlets
...
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2678
- https://github.com/uBlockOrigin/uAssets/issues/18278
2023-05-30 08:38:35 -04:00
Raymond Hill
2a3a796d33
Minor fix
2023-05-29 15:05:50 -04:00
Raymond Hill
a1a3477b07
Fix oversight in last commit
2023-05-29 14:54:13 -04:00
Raymond Hill
c8de904191
Add `evaldata-prune` scriptlet
...
Related issue:
- https://github.com/uBlockOrigin/uAssets/issues/18278
2023-05-29 14:37:02 -04:00
Raymond Hill
c642541cc4
Minor fine tuning
2023-05-29 07:34:54 -04:00
Raymond Hill
3ee3275dc1
Harden `addEventListener` scriptlet
2023-05-28 14:56:31 -04:00
Raymond Hill
82eee10c3a
Logging-related changes
2023-05-28 10:37:23 -04:00
Raymond Hill
3c9e946107
Log error in dev console is logging is enabled
2023-05-27 19:05:02 -04:00
Raymond Hill
8ed78cfb23
Support pruning by xpath in `xml-prune` scriptlet
...
Related issue:
- https://github.com/uBlockOrigin/uAssets/issues/18244
2023-05-27 17:26:19 -04:00
Raymond Hill
d3fae27017
Add support for xhr in xml-prune
...
Related issue:
- https://github.com/uBlockOrigin/uAssets/issues/18244
2023-05-27 09:14:19 -04:00