Commit graph

2242 commits

Author SHA1 Message Date
Raymond Hill
28d2326808
[mv3] Better support for toggling line comments 2025-06-13 19:08:11 -04:00
Raymond Hill
786cf0c802
License stuff 2025-06-13 18:22:26 -04:00
Raymond Hill
9ee42b26c1
[mv3] Support toggling line comment using official CodeMirror command 2025-06-13 17:54:20 -04:00
Raymond Hill
88d090b20a
Import translation work from https://crowdin.com/project/ublock 2025-06-13 12:53:44 -04:00
Raymond Hill
b50341089d
[mv3] Expand "Develop" pane
Move "No filtering" section in "Settings" to "Develop" pane. It is
now possible to view/edit the list of hostnames for any of the
filtering mode. This takes care of these issues:
- https://github.com/uBlockOrigin/uBOL-home/issues/270
- https://github.com/uBlockOrigin/uBOL-home/issues/297

Add ability to see all rulesets (read-only), to assist in investigating
filtering issues.
2025-06-13 12:46:05 -04:00
Raymond Hill
a12ed895dd
Import translation work from https://crowdin.com/project/ublock 2025-06-13 12:37:25 -04:00
Raymond Hill
ff8c527b99
[mv3] Revert trying to transpose requestDomains
This breaks uBOL -- unclear error message but disabling rulesets
eventually unbreak the extension, thus possibly a case of going
over the rule limit as a result of transposition.

The `requestDomains` issue will have to wait for the official
Safari fix.
2025-06-12 09:32:59 -04:00
Raymond Hill
7060be775c
Import translation work from https://crowdin.com/project/ublock 2025-06-11 15:23:14 -04:00
Raymond Hill
e43de8c185
[mv3] Firefox doesn't yet support condition.responseHeaders 2025-06-11 09:40:52 -04:00
Raymond Hill
9f3282d74f
[mv3] Safari: expand rsach requestDomains entries into own rule
Related issue:
https://github.com/uBlockOrigin/uBOL-home/issues/358
2025-06-10 15:18:47 -04:00
Raymond Hill
76d8b97869
[mv3] Collect/apply highly generic cosmetic exceptions across lists
Related issues:
- https://github.com/uBlockOrigin/uBOL-home/issues/365
- https://github.com/uBlockOrigin/uAssets/issues/28770
- https://github.com/uBlockOrigin/uAssets/issues/28129
2025-06-10 15:03:14 -04:00
Raymond Hill
deb3247ea2
Update README.md 2025-06-10 09:37:01 -04:00
Raymond Hill
508138764d
[mv3] Properly refresh "Developer mode" checkbox on changes 2025-06-06 08:45:19 -04:00
Raymond Hill
a960140c30
Import translation work from https://crowdin.com/project/ublock 2025-06-03 16:56:10 -04:00
Raymond Hill
e96e380ad1
Use CodeMirror's MergeView to highlight differences between before/after
To make it easier to analyze the effect of a jsonpath.
2025-06-03 10:21:53 -04:00
Raymond Hill
b2c4242138
[mv3] Fix error reporting in registerInjectables() 2025-06-03 07:39:38 -04:00
Raymond Hill
1a9c63254c
[mv3] Report custom DNR rule count in troubleshooting information
As discussed internally.

The custom DNR rule count will be reported only when it's not zero,
and the count is only for effective DNR rules, i.e. it will not be
reported if "Developer mode" is not enabled.
2025-06-03 06:05:56 -04:00
Raymond Hill
0983e62437
[mv3] Fine tuning editor code 2025-06-01 14:34:57 -04:00
Raymond Hill
0dac2206c3
Import translation work from https://crowdin.com/project/ublock 2025-06-01 13:52:48 -04:00
Raymond Hill
fad39c6ce5
[mv3] Add support for code-folding and use custom stream parser 2025-06-01 13:29:46 -04:00
Raymond Hill
837451c17a
Import translation work from https://crowdin.com/project/ublock 2025-05-31 11:32:54 -04:00
Raymond Hill
670e8dc367
[mv3] Add smart spacebar/return auto completion 2025-05-31 09:42:53 -04:00
Raymond Hill
e1f2c6f88d
[mv3] Code review 2025-05-30 18:15:25 -04:00
Raymond Hill
ffb3fef073
[mv3] Add smart backspace in DNR rules editor 2025-05-30 11:23:45 -04:00
Raymond Hill
fbb96c7234
Import translation work from https://crowdin.com/project/ublock 2025-05-30 08:06:25 -04:00
Raymond Hill
c142d9af67
[mv3] Fix dnr-parser for Safari compatibility 2025-05-29 14:33:30 -04:00
Raymond Hill
6221cecf57
[mv3] Fix Safari's compatiblity layer 2025-05-29 14:18:46 -04:00
Raymond Hill
eb3f5a44a9
Import translation work from https://crowdin.com/project/ublock 2025-05-29 10:13:32 -04:00
Raymond Hill
6647ae55a9
Import translation work from https://crowdin.com/project/ublock 2025-05-29 10:10:27 -04:00
Raymond Hill
f2c0633216
[mv3] Add missing translatable string 2025-05-29 10:09:02 -04:00
Raymond Hill
cac62c6dc0
Import translation work from https://crowdin.com/project/ublock 2025-05-29 10:05:13 -04:00
Raymond Hill
9339a75952
[mv3] Add support for custom DNR rules
This feature is hidden behind the "Developer mode" setting in
the dashboard. When "Developer mode" is enabled, a tab named
"Develop" will become available in the dashboard. This tab is
meant to contain tools for technical users.

At the moment, the "Develop" pane allows to create custom DNR
rules through a (CodeMirror-based) editor.

For the sake of convenience, the DNR rule must be entered in
YAML-like format. The format is not really full compliant YAML,
just YAML-like, and very strict in order to ensure the parser
stays simple enough.

Lines starting with `#` are comments and will be ignored by the
parser.

Any line which do not match the parser's expectation will be
marked as invalid, and the whole DNR rule containing such invalid
lines will be discarded.

There must not be empty lines inside a rule definition.

Each DNR rule must be separated with a `---` line, which is
known as a YAML document separator.

String values must not be quoted, otherwise the quotes will be
considered part of the value. There is one exception: `''` will
be parsed as "an empty string".

The editor will attempt to auto-complete known DNR keywords. That
feature will improve over time.

Though the parser will identify some errors, not all invalid DNR
rules are currently identified by the parser, and these will be
reported when the rules are registered through the DNR API. Better
identifying invalid DNR rules at edit time will improve over time.

The editor will report `regexFilter` values which are not
supported by the DNR engine on the current platform.

The editor reacts to instances of `regexFilter: ...` to report
whether a regex value is supported. This means you can test for
a regex value by using `# regexFilter: ...` so that you do not
have to create an actual DNR rules just for the sake of testing.

Custom DNR rules can be exported into a JSON file (a format
known by the DNR API as a "static ruleset").

JSON-based ruleset can be imported, the content will be converted
to YAML-like syntax.

The editor will attempt to convert to YAML pasted content which
can be JSON-parsed. It's possible to paste partially or wholly
JSON-based rulesets.

When disabling "Developer mode", all custom DNR rules will be
unregistered from the DNR API. The DNR rules content will be left
intact in such case. Existing DNR rules will be registered into
the DNR API when re-enabling "Developer mode".

Administrators can prevent "Developer mode" from being enabled
by adding `develop` token to `disabledFeatures` setting.

Related discussion:
https://github.com/uBlockOrigin/uBOL-home/discussions/323

The main motivation is to give list maintainers a tool to assist
with resolving filter issues. Custom DNR rules can assist in
crafting and validating filters meant to work with uBOL.

A secondary motivation is to provide technical users the ability
to further customize their content blocker.

More conveniences will be added over time, this is a first version.
2025-05-29 09:06:02 -04:00
Raymond Hill
4e2585545b
[mv3] This is not needed for uBOL 2025-05-25 19:10:18 -04:00
Raymond Hill
686eefd6b0
[mv3] Remove CERT.PL's Warning List 2025-05-25 18:55:39 -04:00
Raymond Hill
e077d36c6e
Import translation work from https://crowdin.com/project/ublock 2025-05-25 18:17:20 -04:00
Raymond Hill
93d8e639ce
[mv3] Code review last commit
Related commit:
2076d42239
2025-05-23 09:49:07 -04:00
Raymond Hill
2076d42239
[mv3] Add to troubleshooting info whether webext API calls failed
Related discussion:
https://github.com/uBlockOrigin/uBOL-home/issues/327#issuecomment-2904240310
2025-05-23 09:36:21 -04:00
Raymond Hill
13886f728d
[mv3] Fix tag 2025-05-23 08:28:04 -04:00
Raymond Hill
ecc64ae125
[mv3] Give admins ability to prevent usage of zapper
Related issue:
https://github.com/uBlockOrigin/uBOL-home/pull/341
2025-05-22 16:53:11 -04:00
Raymond Hill
4eae23065e
[mv3] Allow body element to vertically scroll
Related issue:
https://github.com/uBlockOrigin/uBOL-home/issues/352
2025-05-22 13:19:02 -04:00
Raymond Hill
408b538e75
[mv3] Add support to convert header= option to DNR rules
Related issue:
https://github.com/uBlockOrigin/uBOL-home/issues/157

The `header=` option will be converted into DNR's `responseHeaders`
condition.

There will be an attempt to convert regex-based values into DNR-
compatible syntax. Not all regex-based patterns can be converted to
use DNR's patterns with `*` and `?` special characters.

The implementation of `header=` option in uBO has been revisited to
improve compatibility with DNR syntax to minimize burden for list
maintainers when creating `header=` filters compatible with both
uBO and uBOL.

The changes:
- Header names are now case-insensitive by default
- Occurrences of `*` in non-regex-based header values now mean
  "matches any number of characters"
- Occurrences of `?` in non-regex-based header values now mean
  "matches zero or one character"

At time of commit, and as per MDN, only Chromium-based browsers
currently support filtering on repsonse headers:
https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/API/declarativeNetRequest/HeaderInfo

Also as per MDN, Chromium 121-127 silently ignore the `responseHeaders`
condition, potentially causing undue blocking of network requests.
Currently uBOL support Chromium 122 and later, meaning we need to mind
potential false positives in Chromium 122-127 for filters using
`header=` option.
2025-05-22 11:46:08 -04:00
Raymond Hill
eee279be01
[mv3] Add codemirror-ubol as submodule 2025-05-21 08:01:21 -04:00
Raymond Hill
7ee99e6875
[mv3] Add fallback fetch in case main one fails 2025-05-20 07:34:05 -04:00
Raymond Hill
a59daf5978
[mv3] Forgot to commit new CSS file 2025-05-19 19:02:41 -04:00
Raymond Hill
13b7f381b2
[mv3] Safari: warn to not open filter issues for stable Safari
Related issue:
https://github.com/uBlockOrigin/uAssets/issues/28408

Stable Safari is known to not block certain network requests due to
the current state of the DNR engine in Safari. The warning is to
ensure volunteers are not burdened by issues originating from the
browser.

Eventually Safari's DNR implementation will catch up with the
specification, at which time the warning will be removed.
2025-05-19 16:55:27 -04:00
Raymond Hill
05f7a7b8c3
[mv3] Minor code review 2025-05-19 10:41:15 -04:00
Raymond Hill
be8b6238d3
[mv3] Add browser info in troubleshooting data 2025-05-19 10:39:31 -04:00
Raymond Hill
ed10973717
[mv3] Add "AdGuard -- Mobile Ads"
Maybe related issue:
https://github.com/uBlockOrigin/uBOL-home/issues/351

The list is enabled by default on mobile devices.
2025-05-18 09:55:20 -04:00
Raymond Hill
4c6f8222af
Import translation work from https://crowdin.com/project/ublock 2025-05-18 09:00:28 -04:00
Raymond Hill
4aa16e9409
[mv3] Add missing image 2025-05-18 08:57:48 -04:00