On 26/07/2023 13:24, wOxxOm wrote:
> The access to the tab you see in the toolbar menu doesn't give you any
> DOM data by itself, it basically says you have a permission to do things
> like injecting a content script into this page to get that data. The
> permission is granted based upon host_permissions or
> content_scripts->matches or the activeTab
> <
https://developer.chrome.com/docs/extensions/mv3/manifest/activeTab/>
> permission that depends on user gesture.
I think, there should be an option to inject content scripts into the
current tab in response to a click inside sidePanel without the
<all_urls> permission. Perhaps it may be a more specific permission like
"sidePanel.activeTab" or some switch in UI that allows users to grant
and revoke access to active tab from side panel.
Calling permission.request for each host may be annoying for users.
Consider extensions that e.g. extracts metadata from the current page or
shows dates when links were visited.