If I go to github my add-on won’t work and I won’t have any popup asking for the permissions. I understand that now with Manifest V3 it’s opt-in. But how can I ask for the permission to run the content scripts?
I’m aware of browser.permissions.request but I didn’t find how to use it to give access to the website data / allowing my content script.
Is there another solution?
I found my answer,
I was not using browser.permissions.request correctly.
Here is how you can ask for the access of a website data: browser.permissions.request({ origins: ["https://github.com/*"] })
This has been discussed here several times and it can be more complex than expected.
It may be best to check if you have permissions each time you need it and if it’s missing, request it. But may bring further issues…
See for example: