AdguardTeam / AdguardTeam/tsurlfilter
Support for uBO media queries
- Lingua principale
- TypeScript
- Stelle
- 81
- Fork
- 20
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
uBO now supports media queries. The tsurlfilter's converter does not support it yet.
Reference: https://github.com/gorhill/uBlock/wiki/Procedural-cosmetic-filters#subjectmatches-mediaarg
Examples:
- ```adblock
example.com###target-3 > .target-4:matches-media((min-width: 1920px) and (min-height: 930px)):style(color: red !important)
```
should be converted to
```adblock
example.com#$#@media (min-width: 1920px) and (min-height: 930px) { #target-3 > .target-4 { color: red !important; } }
```
- ```adblock
github.com##pre:matches-media(print):style(white-space:pre-line !important;)
```
should be converted to
```adblock
github.com#$#@media (print) { pre { white-space:pre-line !important; } }
```
FIXME:
- This is typically an element hiding rule
```adblock
example.com###target-1 > .target-2:matches-media((min-width: 800px))
```
and perhaps it can be converted to
```adblock
example.com#$#@media (min-width: 800px) { #target-1 > .target-2 { display: none !important; } }
```
but I'm not sure about that
Reference: https://kb.adguard.com/en/general/how-to-create-your-own-ad-filters#examples-9
@slavaleleka Do you have a better idea for the last case? 🙂
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.