Commit Graph

11249 Commits

Author SHA1 Message Date
Raymond Hill e0b4b3d830
Add alias for scriptlet to increase compatibility with AdGuard filter lists 2023-07-01 10:20:23 -04:00
Raymond Hill 33b409dd5b
Add support for AdGuard's noop (`_`) network filter option
Reference:
- https://adguard.com/kb/general/ad-filtering/create-own-filters/#noop-modifier

uBO already supported the noop filter option `_` to allow filter
authors to resolve possible ambiguities arising when crafting network
filters with many options.

AdGuard extended the semantic of the `_` option to also resolve
readability issues by supporting multiple instances of the `_` option
in a single filter, and also by supporting any number of consecutive
`_` in a single noop filter option.
2023-06-30 16:09:21 -04:00
Raymond Hill b44815f0c8
Ensure no negative value for `top` property of floating widget in logger
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2704
2023-06-30 11:45:34 -04:00
Raymond Hill b9a24a6f0b
Make Firefox dev build auto-update 2023-06-30 10:01:03 -04:00
Raymond Hill d652b999d8
New revision for dev build 2023-06-30 09:51:59 -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 d54fad26b7
Make Firefox dev build auto-update 2023-06-29 15:20:52 -04:00
Raymond Hill 73c2eed207
New revision for dev build 2023-06-29 15:14:24 -04:00
Raymond Hill 5d6e103186
Add "tabless" filter expression for logger output
Related discussion:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/2711
2023-06-29 15:12:22 -04:00
Raymond Hill 194354cd5d
Add support for logical expressions to `!#if` directive
Reference:
https://adguard.com/kb/general/ad-filtering/create-own-filters/#conditions-directive

This commit should make uBO fully compatible with the `!#if`
directives found throughout AdGuard's filter lists.

Additionally, added the new `!#else` directive for convenience
to filter list authors:

    !#if cap_html_filtering
    example.com##^script:has-text(fakeAd)
    !#else
    example.com##+js(rmnt, script, fakeAd)
    !#endif
2023-06-29 14:50:42 -04:00
Raymond Hill 9433b218f7
Remove obsolete code 2023-06-29 14:49:43 -04:00
Raymond Hill 7867c25128
Add resource aliases for increased compatibility with AdGuard lists 2023-06-29 14:48:43 -04:00
Raymond Hill e6521a8dfe
Make Firefox dev build auto-update 2023-06-29 09:15:49 -04:00
Raymond Hill 8ffbc96ffc
New revision for dev build 2023-06-29 09:06:37 -04:00
Raymond Hill c350e23b2d
Fix regression in parameters-passing in scriptlets 2023-06-29 09:05:48 -04:00
Raymond Hill 8e010f9c87
Make Firefox dev build auto-update 2023-06-28 20:15:43 -04:00
Raymond Hill 1c88928e15
New revision for dev build 2023-06-28 20:07:41 -04:00
Raymond Hill de6b1d361d
Fix typo in new getScriptletArgs() method
Additionally, bring mv3 build up to date with latest changes
to scriptlet framework.
2023-06-28 20:05:59 -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 8b7a5264de
Fix syntax highlighter throwing with invalid patterns
The syntax highlighter could throw with some invalid static
network filter patterns. This was caused by the syntax
highlighter still drilling down the pattern parts after
having told codemirror to style the whole pattern as an
error, thus causing the codemirror stream position to go
backward.
2023-06-28 08:38:47 -04:00
Raymond Hill ea6e2540fd
Make Firefox dev build auto-update 2023-06-23 20:50:56 -04:00
Raymond Hill bf8abd874e
New revision for dev build 2023-06-23 20:45:41 -04:00
Raymond Hill bec4dea155
Minor code review 2023-06-23 20:44:44 -04:00
Raymond Hill 7184f93cb0
Return empty array instead of undefined
Related discussion:
- https://github.com/uBlockOrigin/uAssets/discussions/18649
2023-06-23 20:42:58 -04:00
Raymond Hill 7ba85472d7
[mv3] Properly distinguish trust level when compiling scriptlets
Since in uBOL filter lists from various sources are combined into
a single list, there must be a way to turn on/off trust level
inside the resulting combined filter list so as to be able to
validate the trust level of filters requiring trust.

This commit adds new parser directives understood only by MV3
compiler to turn on/off trust flag internally.
2023-06-23 08:27:07 -04:00
Raymond Hill ea4afc0610
Minor code review of `set-local-storage-item` scriptlet 2023-06-23 08:23:08 -04:00
Raymond Hill e50b391105
Prevent creating report until filter lists are updated
Related discussion:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/2582#discussioncomment-6187066
2023-06-22 14:36:12 -04:00
Raymond Hill 6a817b8258
Revert back to EasyList Cookie Notices 2023-06-21 10:08:28 -04:00
Raymond Hill 6a27a3960b
Make Firefox dev build auto-update 2023-06-21 09:31:24 -04:00
Raymond Hill 73b8ae508f
New revision for dev build 2023-06-21 09:15:03 -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 dfce89d4e1
Make Firefox dev build auto-update 2023-06-20 11:25:59 -04:00
Raymond Hill 835f1d66fd
New revision for dev build 2023-06-20 11:05:33 -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
gorhill db9662f61b Update build log file
Files changed:
M	dist/mv3/log.txt
2023-06-19 14:22:19 +00:00
Raymond Hill 49b3ce58bb
Import translation work from https://crowdin.com/project/ublock 2023-06-19 10:17:36 -04:00
Raymond Hill 4e6a337e12
Make Firefox dev build auto-update 2023-06-18 15:26:15 -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 f6ee3f9878
New revision for dev build 2023-06-18 14:35:49 -04:00
Raymond Hill 3b70d0e134
[mv3] Drop useless property in generated content scripts 2023-06-18 14:34:43 -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 2170aba132
Make Firefox dev build auto-update 2023-06-17 12:06:19 -04:00
Raymond Hill 2c77293040
New revision for dev build 2023-06-17 11:58:56 -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 29015b30df
Make Firefox dev build auto-update 2023-06-16 12:01:27 -04:00
Raymond Hill 683888108c
Import translation work from https://crowdin.com/project/ublock 2023-06-16 11:38:31 -04:00