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 possibility to allowlist scriptlets #377

Open
superlex opened this issue Nov 1, 2023 · 0 comments
Open

Add possibility to allowlist scriptlets #377

superlex opened this issue Nov 1, 2023 · 0 comments

Comments

@superlex
Copy link

superlex commented Nov 1, 2023

uBlock Origin supports
example.org#@#+js()
to defuse all scriptlets in example.org.

AdGuard should support
example.org#@%#//scriptlet() or example.org#@%#//scriptlet('')
to do the same thing and convert the first one into that.

Furthermore, AdGuard could also add the ability to defuse a specific scriptlet.
For example, if you have

example.org#%#//scriptlet('set-local-storage-item', 'aditem1', '1')
example.org#%#//scriptlet('set-cookie', 'adcook1', '1')
example.org#%#//scriptlet('set-cookie', 'adcook2', '2')

then
example.org#@%#//scriptlet('set-cookie')
should defuse only the last two, while
example.org#@%#//scriptlet() or example.org#@%#//scriptlet('')
should defuse all of them.

NB:
uBlock Origin also supports
#@#+js()
(without domain) to suppress all scriptlet in all sites. AdGuard could do the same, if you find it useful.
For example,
#@%#//scriptlet('set-cookie')
(without domain) could defuse all set-cookie scriptlets everywhere.

References:
https://github.com/gorhill/uBlock/wiki/Static-filter-syntax#scriptlet-injection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment