Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support for cap_html_filtering condition #1758

Closed
alexx7311 opened this issue May 5, 2023 · 2 comments
Closed

Support for cap_html_filtering condition #1758

alexx7311 opened this issue May 5, 2023 · 2 comments

Comments

@alexx7311
Copy link

Issue Details

Similar: AdguardTeam/AdguardBrowserExtension#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:

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)

@alexx7311
Copy link
Author

copy of #2259

@MasterKia
Copy link

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

4 participants