I don’t want all_url permissions, because it made some users weary
However since implementing arrive, to detect iframes, it’s forcing all_urls required.
I just tried making it optional but it still shows up as required and now also in optional.
If you set your content script to be injected into every page, it automatically means that you need access to all data on all pages:
Maybe switching to MV3 would help here, since in MV3 the addon needs to be enabled manually for each host. But actually I’m not sure, these things with MV3 are way too new to me.
Another workaround is to watch when permissions are added:
And then register content scripts using:
Upgrading to manifest v3 corrected the issue
Well, that’s a sentence you don’t see every day , or ever.
Seriously now, so far there have been A LOT of issues with MV3 so double-check or triple check that this is really what you want .
You will need to use
permissions.request to get access to the any host (even if it’s listed as a non-optional permission or “host_permissions” in MV3):