Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

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

Closed
Yuki2718 opened this issue Jun 19, 2023 · 2 comments
Closed

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

Yuki2718 opened this issue Jun 19, 2023 · 2 comments

Comments

@Yuki2718
Copy link

See AdguardTeam/FiltersCompiler#181

@gorhill
Copy link
Contributor

gorhill commented Jun 26, 2023

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 added a commit to FiltersHeroes/PolishSocialCookiesFiltersDev that referenced this issue Jun 28, 2023
set-cookie/storage dla uBo DEV, z PCC/PCZ wyłapane ułomnym regexem:

!/bakeCookie, .*, (true|True|false|False|yes|Yes|no|ok|OK)|(y|Y|No|n|N)|([0-9]|1[0-5]), /
!/addToStorage,.*, (undefined|false|true|null|emptyObj|emptyArr|\'\'|yes|no|\{\}|\[\]|\"\")|(([0-9]|[1-9][0-9]{1,3}|[12][0-9]{4}|3[01][0-9]{3}|32[0-6][0-9]{2}|327[0-5][0-9]|3276[0-7]))/

można rozważyć w grudniu 2023 oczyszczenie plików:

https://github.com/FiltersHeroes/PCCassets/blob/main/sections/plCDB/bakeCookie.txt
https://github.com/FiltersHeroes/PCCassets/blob/main/sections/plCDB/localStorage.txt

lekko powiązane AdguardTeam/FiltersCompiler#181 AdguardTeam/Scriptlets#332
@krystian3w
Copy link

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.

gorhill added a commit to gorhill/uBlock that referenced this issue Jun 28, 2023
Related issue:
- AdguardTeam/Scriptlets#332

Additionally, uBO's own scriplet syntax now also accept quoting
the parameters with either `'` or `"`. This can be used to avoid
having to escape commas when they are present in a parameter.
@slavaleleka slavaleleka added the enhancement Improvement of existent feature label Nov 2, 2023
@adguard-bot adguard-bot assigned slavaleleka and unassigned maximtop Feb 6, 2024
adguard pushed a commit that referenced this issue Feb 12, 2024
Squashed commit of the following:

commit 421e0fe
Author: Slava Leleka <v.leleka@adguard.com>
Date:   Fri Feb 9 19:30:48 2024 +0200

    add set-cookie-reload aliases

commit e90bf17
Author: Slava Leleka <v.leleka@adguard.com>
Date:   Fri Feb 9 19:30:20 2024 +0200

    update compatibility table
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants