AdguardTeam / AdguardTeam/tsurlfilter

Support for uBO media queries

Aberta
#70 7 comentários 0 reações 1 responsável Reivindicada por @scripthunter7 Ver no GitHub
enhancement Priority: P3 T: AGTree Version: AGTree v5.0
Linguagem predominante
TypeScript
Estrelas
81
Forks
20
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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? 🙂

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.