-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add support for ":nth-ancestor" and ":upward" #224
Comments
Wiki: subject:nth-ancestor(n) Current usage:
|
Some diffrence beetwen |
One key difference is that As for the mathematical/coding difference, I'm not really sure. If anyone with a university math education can figure out this article or anything similar, that'd be more helpful than anything I could've said. |
uBlock filters already contains a bunch of rules, which uses |
Someone can try, but it will not be me. |
Currently, the highest n-value for
..or perhaps add a few more, to be on the safe side?:
|
Well, you can play around with it: uBlock0_1.16.4.19b1.firefox-legacy.xpi.zip (rename to xpi). |
Don't know much about this stuff, I'm afraid. |
I remember experimenting with the uBO XPI once before to try to copy over entire files from the regular branch, which didn't go so well (It didn't take much changes for the entire extension to cease working entirely), but I presume JustOff intended for the changes to be made to the one single same file that the I could've plausibly done it myself, but I've had a pretty tiring day today. |
I gave you already patched xpi with your rules added. |
Ah, so that's what it was. |
Seems to work just fine! 👍 |
Yes, 9, and we can use this as a workaround, right? |
Yes, all rules looks to have been converted correctly, and I saw them being applied in the logger too. |
Well, @DandelionSprout, @krystian3w, what do you think about this workaround? Is it correct and worth including to the next uBO-legacy release? |
After 15min of setting up a test setup, it seems that So my personal standpoint is that the workaround actually works, if that accounts for anything. So I presume it's includable. |
Thanks everyone for testing, I pushed this workaround to the master for the next release. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
FYI :nth-ancestor will be deprecated for :upward soon -- gorhill/uBlock@72bb700 |
Thank you for letting us know about this. This will probably lead to a new workaround, unless of course someone smarter joins the uBO-legacy improvement to add support for new operators properly. |
This comment has been minimized.
This comment has been minimized.
Since #240, among other things, introduces native support of ':upward(1)': ':nth-ancestor(1)',
':upward(2)': ':nth-ancestor(2)',
':upward(3)': ':nth-ancestor(3)',
':upward(4)': ':nth-ancestor(4)',
':upward(5)': ':nth-ancestor(5)',
':upward(6)': ':nth-ancestor(6)',
':upward(7)': ':nth-ancestor(7)',
':upward(8)': ':nth-ancestor(8)',
':upward(9)': ':nth-ancestor(9)' |
@THEtomaso |
One thing that I noticed right away, is that the Example: Dandelion Sprout's Nordic filters contains this rule: But when opening Also, when clicking on a -- EDIT: |
|
Well, that seems to have fixed the logger issue for But now, |
Yes, that did the trick! 👍 |
Thanks for the confirmation!
I can confirm it works, you can try this one:
and open any YT channel, f.e. https://www.youtube.com/user/NationalGeographic |
Indeed, it works! |
@hawkeye116477: |
While I haven't tested it in Pale Moon (nor SeaMonkey) myself, I think uBO added the new ":nth-ancestor" feature to the regular uBO versions sometime in the past year, and I'm already liking it enough that I'm predicting it'll become a major feature in uBO-specific lists within the next year or two.
So I presume that adding support for it would be advantageous for you guys.
The text was updated successfully, but these errors were encountered: