Commit Graph

11116 Commits

Author SHA1 Message Date
Raymond Hill 1809a9b32c
Make Firefox dev build auto-update 2023-07-06 09:00:52 -04:00
Raymond Hill 7e856d750b
New revision for dev build 2023-07-06 08:54:08 -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 c02b0e6232
Make Firefox dev build auto-update 2023-07-05 10:11:12 -04:00
Raymond Hill 95c7acd18c
New revision for dev build 2023-07-05 10:02:22 -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 ed89293c62
Make Firefox dev build auto-update 2023-07-04 07:41:04 -04:00
Raymond Hill b8fd6cf548
New revision for dev build 2023-07-04 07:30:03 -04:00
Raymond Hill 80b3f3c3c0
Fix regression in cloud storage import of "Filter lists" pane
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2721
2023-07-04 07:27:14 -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 60b21b1422
Prevent negative position when widget size is greater than viewport size
Related issues:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2718
- https://github.com/uBlockOrigin/uBlock-issues/issues/2704
2023-07-03 07:14:52 -04:00
Raymond Hill e52da39839
Fine tune network filter option anchor detection
The change allows to better parse AdGuard filters with `replace=`
option when the value to the `replace=` option contains dollar
sign character `$`. uBO will still reject these filters but will
better identify which dollar sign `$` is the real filter option
anchor.
2023-07-03 06:54:46 -04:00
Raymond Hill 622cda2cdf
Add visual hint when not all sublists are enabled
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2687
2023-07-03 06:49:09 -04:00
Raymond Hill f0a364c803
Make Firefox dev build auto-update 2023-07-01 10:40:37 -04:00
Raymond Hill 44b281e517
Import translation work from https://crowdin.com/project/ublock 2023-07-01 10:33:02 -04:00
Raymond Hill d3032a6889
New revision for dev build 2023-07-01 10:28:05 -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 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