essandess / adblock2privoxy

Convert adblock config files to privoxy format
https://hackage.haskell.org/package/adblock2privoxy
GNU General Public License v3.0
93 stars 16 forks source link

TODO: remove matched element conversion #24

Closed wmyrda closed 2 years ago

wmyrda commented 6 years ago

One of the element hiding features in list works with the use of ##^ https://github.com/gorhill/uBlock/wiki/Static-filter-syntax#html-filters

In part it is related to the https://github.com/essandess/adblock2privoxy/issues/12 but may be used with out it if only ##^ combination is translated into the rule which would remove line containing that information during the filtering. At least it should work for records as example.com##^.badstuff

PPB_uBlock_AdGuard.txt has several sites which make use of this feature.

My guess is it should work in privoxy as it works using inling stuff, but test I have done for 4fun.tv##^#cModal actually failed so discovery of proper line would be required before actual converter implementation

removeelement.filter

SERVER-HEADER-FILTER: removeelement
s@#cModal@@i
s@id="cModal"@@i

removeelement.action

{+server-header-filter{removeelement}}
^4fun\.tv
essandess commented 6 years ago

Confirm that rule 4fun.tv##^#cModal isn’t parsed and produces no Privoxy rule. I haven’t dug into the syntax or underlying issues necessary to handle such a case.