AdguardTeam / AdguardTeam/ExtendedCss
Implement new pseudo-class ':others()'
- Lingua principale
- TypeScript
- Stelle
- 71
- Fork
- 11
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
@iSmokeMid69 commented on [Thu Feb 09 2023](https://github.com/AdguardTeam/AdguardBrowserExtension/issues/2285)
### Issue Details
Ublock Has :others() Operator..Which Keep Only A Selected Element Of A Page And Remove Everything Else..This Is Very Useful For Link Shortener Sites
Details -
subject:others()
Experimental.
Description: Target all elements outside than the currently selected set of elements.
Chainable: Yes.
subject: Can be a plain CSS selector, or a procedural cosmetic filter.
Examples:
twitter.com##:matches-path(/^/home/) [data-testid="primaryColumn"]:others()
nature.com##:matches-path(/^/articles//) :is(.c-breadcrumbs,.c-article-main-column):others()
Introduced in uBO 1.41.1b2
For any element feeding into others(), the resultset of the others() operator will include everything else except:
the descendants of a subject element
the ancestors of a subject element
The resultset will contains the siblings of a subject element except when those siblings are either a descendant or ancestor of another subject element.
Though this operator is unlikely to be used in default lists, it opens the door to create specialized filter lists which purpose is some sort of "reader mode", where everything else than a selected set of elements are hidden from view.
Related discussion:
https://www.reddit.com/r/uBlockOrigin/comments/slyjzp/
### Proposed solution
_No response_
### Alternative solution
_No response_
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.