Open Nexus-Gits opened 3 months ago
Possibly because the following filter can't be translated into a DNR rule for multiple reasons:
/^https?:\/\/(?:[a-z]{2}\.)?[0-9a-z]{5,16}\.[a-z]{3,7}\/[a-z](?=[a-z]{0,25}[0-9A-Z])[0-9a-zA-Z]{3,26}\/\d{4,5}(?:\?[_v]=\d+)?$/$script,3p,redirect-rule=noop.js,match-case
redirect-rule
can't be converted to DNR@gorhill Sorry, can MV3 use header
now? I see the issue linked here is closed: https://github.com/w3c/webextensions/issues/460
I think this issue can be solved by
*$script,3p,domain=minoplres.xyz,header=Access-Control-Allow-Headers:/megageocheckolololo/
if header
is supported
response header matching was added in Chrome M128, so whenever that version lands?
From RuleCondition documentation, responseHeaders
support is pending. Also, as per HeaderInfo documentation, if the value to match is a regex, it will have to be translatable into simple pattern matching syntax, where only *
and ?
are supported.
Conversion of header=
filters into DNR rules will have to wait for support to be official in stable release, and also to be sure that presence of responseHeaders
rules does not break the extension on older versions of the browser not supporting the capability.
and also to be sure that presence of
responseHeaders
rules does not break the extension on older versions of the browser not supporting the capability
From my experience with https://github.com/ruffle-rs/ruffle/pull/16694, this is doable with just a try/catch for adding the rule conditions on other browsers and older versions of Chrome that hadn't even begun implementing this rule condition, but on versions of Chrome that began implementing this feature behind a flag, adding the rule conditions does not throw but they take into account only their other conditions if the flag is not enabled, which may be undesirable. I had to use this code, suggested by Rob W from the Firefox team, to create a function to detect whether these conditions were really supported before registering them to work around that: https://github.com/w3c/webextensions/issues/638#issuecomment-2181124486. This is the Chrome bug indicating features developed behind a flag are not fully hidden behind the flag: https://issues.chromium.org/issues/347186592#comment9
It may be different for rules registered in the manifest.
It would help if uBO's header=
syntax matched the DNR's HeaderInfo
's syntax:
If specified, this condition matches if the header's value matches at least one pattern in this list. This supports case-insensitive header value matching plus the following constructs:
*
: Matches any number of characters.?
: Matches zero or one character(s).*
and?
can be escaped with a backslash, e.g.\*
and\?
I think uBO could supports the DNR's pattern matching syntax. uBO would still support the regex syntax, which would need to be dropped from the conversion, but plain or pattern-matching syntax would be translated to DNR rule with no special processing.
Reference from MDN:
Looks like it's available for chromium now.
Oh sorry, there's reference link from chromium above already.
Prerequisites
URL(s) where the issue occurs.
Description
Ads do not block by ublock origin lite on this site. when play video it pop up ads
Other extensions used
nothing.
Screenshot(s)
Screenshot(s)
Configuration
Details
```yaml ```