AdguardTeam / AdguardTeam/AdguardBrowserExtension
Support for cap_html_filtering condition
- Langage dominant
- TypeScript
- Étoiles
- 4.4k
- Forks
- 449
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
### Issue Details
Similar: https://github.com/AdguardTeam/AdguardBrowserExtension/issues/2146
https://github.com/gorhill/uBlock/wiki/Static-filter-syntax#if-condition
Sometimes an annoyance or popup case can be dealt with by either removing the script from that page entirely (**HTML filtering**) or with the use of **scriptlets** and it makes sense that the scriptlet rules don't get injected into a page that HTML filtering has already been applied to.
So I use this in [my list](https://github.com/MasterKia/PersianBlocker/blob/main/PersianBlocker.txt):
```adb
example.com##^script:has-text(BadStuff)
!#if !cap_html_filtering
example.com##+js(FirstScriptlet)
example.com##+js(SecondScriptlet)
example.com##+js(ThirdScriptlet)
!#endif
```
For AdGuard it _can_ be translated into `!#if (!adguard_app_windows && !adguard_app_mac && !adguard_app_android && !adguard_ext_firefox)` but it makes sense to have a dedicated condition for this.
### Proposed solution
`!#if cap_html_filtering`
### Alternative solution
`!#if (!adguard_app_windows && !adguard_app_mac && !adguard_app_android && !adguard_ext_firefox)`
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.