AdguardTeam / Scriptlets

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

`set-local-storage-item` does not work on `https://search.brave.com/` #387

Open superlex opened 10 months ago

superlex commented 10 months ago

Hello, it looks like the scriptlet set-local-storage-item does not work on https://search.brave.com/.

Tried search.brave.com,example.org#%#//scriptlet('set-local-storage-item', 'app.usageMetricsOptOut', 'true') and this the result on search.brave.com

1

example.org

2

Tried also the same scriptlet with uBlock Origin. This is the result:

3

Could you take a look, please?

Additional information: Firefox 120 AG Ext v. 4.2.228

AdamWr commented 10 months ago

It seems that it's related to this issue - https://github.com/AdguardTeam/AdguardBrowserExtension/issues/1733 and in the case of Firefox extension injecting scripts is blocked by website's Content-Security-Policy.

Content-Security-Policy: The page’s settings blocked the loading of a resource at inline (“script-src”).

It works fine in Chrome extension and app for Windows (it should works fine with app for macOS and Android as well, but I didn't test it).

superlex commented 10 months ago

Thanks @AdamWr for your explanation! I confirm that it works on AG for Android.