AdguardTeam / AdguardTeam/ExtendedCss

Implement new pseudo-class ':others()'

Offen
#164 14 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
feature request Priority: P4
Vorherrschende Sprache
TypeScript
Sterne
71
Forks
11
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

@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_

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.