-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rule Syntax Deprecated #1
Comments
BTW, I did not know or intend for this issue to be listed on the uBlock issue page. I apologize if that was impolite. |
Hi, thanks very much for the feedback! sorry I didn't see this earlier. As this list is primarily for personal consumption across all my devices, I'm less concerned with best-practice than usual. Note the lack of info header in the rules files, for instance. However, after deprecation comes removal, so I appreciate your early warning that this feature will be removed soon. |
I've just been reading through the documentation to find an alternative way to implement my scrip:contains rules, and came across this:
Although my syntax is deprecated, this means it should still work for me as a Firefox user in the future. I'll change the relevant rules to reflect the equivalent syntax, but (lacking chrom(e|ium) support as mentioned in the doc page, there's not much else I can do. |
Demo to test where works as generic:
? |
Since there are now two javascript libraries with that name, you can try their websites to test if this filter still works:
By the looks of things, this filter no longer does the intended job, because blockadblock.com are embedding the script directly into the page. I haven't encountered any uses of this script in the wild for a while. Do you have a real site (and not its product page) that is broken by it? |
A possible alternative to this rule is injecting the builtin scriplet for defusing BlockAdblock, although I'm not sure how to replicate having the rule apply everywhere by default, like with |
from my knowledge this is no works without domain / tld. |
I'm sorry, on reflection I don't think I understand your original query. Could you rephrase that? |
If no add domain / TLD ("suffix") before this filter, so is ignored/discarded (but Nano Adblocker no mark as invalid with comment "why" - https://github.com/NanoAdblocker/NanoCore#notable-change). |
Are you telling me that: Because I've not prefixed this filter rule with a TLD, it's marked as invalid by NanoAdblocker's Filter Linter? If that's not right, try Google translating from another language. I'm sorry I'm having trouble understanding you! 🤷♂️ |
Yes. Filter doesn't works, I tried with similar site, e.g.: https://dniwolne.eu
Works, but without domain - still see alert:
So this filter is no used in latest uBO / Nano Adblocker maybe works in 2014-2018 with bugs in old uBO code. |
OK, now I understand. I'll remove this filter rule now, because it no longer performs its intended purpose. I didn't prefix it with a TLD in the first place, because I wanted it to work automatically, without me having to manually un-break each site. Because this is no longer an option (this filter no longer works), I'll just resort to injecting the scriptlet I mentioned above whenever necessary. |
Has anyone tried to prefix the rule with I use a filter with the "domain" as this wildcard:
That vile button takes up precious real estate on a mobile browser. |
Other story is create good csp filter: e.g. bad in EasyList https://github.com/uBlockOrigin/uAssets/blob/df982907c5bcfc0eff8bed58096d423bb146954b/filters/unbreak.txt#L2372 |
@krystian3w, Thanks, Doug |
Hello,
I noticed that you have a rule that uses
##script:contains(...)
syntax.This is deprecated.
The new syntax is
##^script:has-text(...)
.BTW, I found you here after reading your uBlock issue.
The text was updated successfully, but these errors were encountered: