hufilter / hufilter-dev

Hufilter - The Hungarian Adblock Filter List.
https://github.com/hufilter/hufilter
Creative Commons Attribution 4.0 International
95 stars 28 forks source link

Port some `-abp-has` rules to AdGuard iOS #453

Open scripthunter7 opened 1 month ago

scripthunter7 commented 1 month ago

Basic AdGuard iOS content blocker doesn't support Extended CSS, but probably several -abp-has based rules can be ported to native has to be compatible with the basic iOS cb.

Cyberbeni commented 1 month ago

I was thinking about having an intermediary build step that creates iOS compatible rules from all the rules that include -abp-has via a regex. Then runs aglint on them and deletes the lines that produce an error.

Or if all rules created like that are valid on iOS then there is no need for linting to filter out the bad ones.

scripthunter7 commented 1 month ago

I was thinking about having an intermediary build step that creates iOS compatible rules from all the rules that include -abp-has via a regex.

Yes, something similar would probably work in most cases, although I'm not sure if there is/or will be a rule where this would cause problems (eg if the two rules only work together, but separately cause some kind of incorrect blocking - e.g. one rule only uses -abp-has, but the other -abp-contains, which is not supported by native CSS at all)

Cyberbeni commented 1 month ago

There are rules which contain both (for example this), so there is certainly a need to lint the autogenerated rules.