AdguardTeam / Scriptlets

AdGuard scriptlets library
GNU General Public License v3.0
148 stars 29 forks source link

Add compatibility with uBO's set-cookie scriptlet #332

Closed Yuki2718 closed 7 months ago

Yuki2718 commented 1 year ago

See https://github.com/AdguardTeam/FiltersCompiler/issues/181

gorhill commented 1 year ago

It's best that uBO just supports #%#//scriptlet(...) syntax in uBO, AdGuard's shouldn't bear the burden of converting ADG syntax to uBO syntax.

krystian3w commented 1 year ago

Translation of uBo syntax to AG at the server level will allow, for example, Polish Cookies-GDPR to deliver on outdated AdGuard products that still know how to retrieve a newer list state from the AdGuard json file - without duplicating filters in uBo syntax to AdGuard rules at the list level.

I may send an update for this list in July 2023 as it merges once again by xxcriticxx due to MajkiIT's increasingly rare login to update the list and merge the community's PR.

Assuming that the problems are not embraced for several years in the list of "AdGuard Cookie Notices" with the same scriptlets, rather, not everything was copied to AdGuard repository to evaluate how it could fix it other than with filters from the set-cookie family (e.g. set-constant like made sometimes Nojuuu or stephenhawk8054).

Because I assume that in neither direction is the filter translated and in filters registry I get an error of unknown scriptlet:

! Invalid selector:
meczyki.pl##+js(gnf)

https://github.com/AdguardTeam/FiltersRegistry/blob/e22112e4ad71ecd0a25859937e3eb61c0642ef70/filters/ThirdParty/filter_237_PolishAnnoyance/diff.txt#L5-L6

https://github.com/AdguardTeam/FiltersRegistry/blob/558e372aca1de278f61595e974c83286fa8a9dcd/filters/ThirdParty/filter_237_PolishAnnoyance/diff.txt#L1671-L1672

https://github.com/FiltersHeroes/PolishAnnoyanceFilters/blob/master/scriptlets/scriptlets.js


I only associate two errors in the handling of the withdrawn remove-attr.js and remove-class.js by the AdGuard team.