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 watch-attr, spath, min-text-length and fix parsing AdGuard's rules #240
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Related issue: gorhill/uBlock #3683 This commit further increases uBO's procedural cosmetic filters Adguard's cosmetic filter syntax -- specifically those procedural cosmetic filters where plain CSS selectors appeared following a procedural operator (this was rejected as invalid by uBO). Also, experimental support for `:watch-attrs` procedural operator, as discussed in <uBlockOrigin/uBlock-issues#341 (comment)>. Support may be dropped before next release depending on whether a better solution is suggested. Additionally, the usual opportunistic refactoring toward ES6 syntax. Co-authored-by: gorhill <585534+gorhill@users.noreply.github.com>
As reported in the following commit: - AdguardTeam/AdguardFilters@4fe02d73cee6
…ilters Reported by https://github.com/uBlock-user in https://github.com/orgs/uBlockOrigin/teams/ublock-issues-volunteers/discussions/56 For some reasons, many cosmetic filters in Adguard's Annoyance List are plain cosmetic filters disguised as style-based cosmetic filters, and this was breaking uBO's ability to reverse lookup such filters from the logger.
Related issue: - uBlockOrigin/uBlock-issues#356 Co-authored-by: gorhill <585534+gorhill@users.noreply.github.com>
The purpose of this new `:nth-ancestor(n)` operator is to lookup the nth ancestor relative to the currently selected node. It is essentially equivalent to `:xpath(..)`, where ancestor distance is expressed as a number rather than a sequence of slash-separated `..`. The rationale to introduce this new procedural selector is to have a low overhead way to accomplish ancestor selection.
Where `x` is the minimal text length of the subject DOM element. DOM elements whose text length is greater than or equal to `x` will be selected.
The purpose is to avoid having to iterate through
all input nodes at each operator implementation
level. The `transpose` method deals with only one
input node, and the iteration is performed by the
main procedural filtering entry points.
Additionally:
- Rename `:watch-attrs` to `:watch-attr`
- `:watch=attrs` is deprecated and will be kept around
until it is safe to remove it completely
|
Thanks again for your input, which is really important to keep the project alive. I'm going to put it to testing, just as before. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
I skipped changes for html filtering.
Now should be more green, so fixing
use of sibling-related CSS syntax at prefix positionand addingremoveand properupwardonly left. As you can see looks like that all should be good, but maybe will be good to test that again with more „real" examples.