FiltersCompiler
FiltersCompiler copied to clipboard
A tool that compiles & validates filters
uBO supports only with regexp rules: https://github.com/gorhill/ublock/wiki/static-filter-syntax#match-case:~:text=only%20for%20Regular%20Expression These rules are rejected, so can be removed from uBO versions of filters.
I'm not sure what the problem is, but `aceee.org#%#//scriptlet('prevent-canvas', '2d')` is converted to `""`, so it's not available in filters, and in this case `!+ NOT_VALIDATE` does not fix the...
Example: ```adblock /\/[a-f0-9]{32}\.js(?:$|\?)/$script,xmlhttprequest,third-party,domain=example.*|torrentgalaxy.* ```e can be converted to ```adblock /\/[a-f0-9]{32}\.js(?:$|\?)/$script,xmlhttprequest,third-party,domain=example.org|example.com|torrentgalaxy.com|torrentgalaxy.nl ``` if corresponding domains are alive. But there is a question: won't it be a problem if there are many...
The rules in UBO suntax were incorrectly converted ``` philo.com##+js(json-prune-fetch-response, periods.[-].eventStreams.0.id, , propsToMatch, /manifestv2) philo.com##+js(json-prune-xhr-response, periods.[-].eventStreams.0.id, , propsToMatch, /manifestv2) ``` https://github.com/gorhill/uBlock/wiki/Resources-Library#json-prune-fetch-responsejs- to ``` philo.com#%#//scriptlet('ubo-json-prune-fetch-response', 'periods.[-].eventStreams.0.id', '', 'propsToMatch', '/manifestv2') philo.com#%#//scriptlet('ubo-json-prune-xhr-response', 'periods.[-].eventStreams.0.id',...
* not a HOST rule ``` Error: "Rule has spaces, seems to be an host rule" in the rule: "/^https:\/\/[a-z][a-z][a-z][a-z][a-z][a-z][a-z][a-z]+\.com\/en\/([a-z][a-z]+\/)?([a-z][a-z]+\/)?[a-z][a-z]+\?([a-z]+=[^&=? ]*&)*id=[12][0-9][0-9][0-9][0-9][0-9][0-9]/$script,third-party,match-case" ``` * Invalid rule only in report ``` Error:...
Currently, the following AG scriptlet is converted from ```adblock ppomppu.co.kr#%#//scriptlet('href-sanitizer', 'a[href^="https://s.ppomppu.co.kr?"][href*="&target="]', '?target', 'base64decode') ``` to ```adblock ppomppu.co.kr##+js(href-sanitizer, a[href^="https://s.ppomppu.co.kr?"][href*="&target="], ?target, base64decode) ``` However, it should be ```adblock ppomppu.co.kr##+js(href-sanitizer, a[href^="https://s.ppomppu.co.kr?"][href*="&target="], ?target -base64)...
Originally proposed in https://github.com/AdguardTeam/CoreLibs/issues/1966 but it seems it should be done here. Please consider to add `ext_ubol` for uBlock Origin Lite which occaisonally needs different filters than uBlock Origin. And...
Related - https://github.com/AdguardTeam/FiltersCompiler/pull/251 In uBO syntax is `:matches-prop`, so I think that `:matches-property` could be converted to `:matches-prop` for uBO, and `:matches-prop` to `:matches-property` for AdGuard. https://github.com/AdguardTeam/ExtendedCss/?tab=readme-ov-file#extended-css-matches-property https://github.com/gorhill/uBlock/wiki/Procedural-cosmetic-filters#subjectmatches-proparg
The original rule: `||wcs.naver.com^$~script,redirect=nooptext,domain=smartstore.naver.com` uBO version: `||wcs.naver.com^$~script,redirect=noop.txt,domain=smartstore.naver.com,image,media,subdocument,stylesheet,script,xmlhttprequest,other` Screenshot  I don't know why all the types are explicitely added, was there some issue if without the types?