I tried a few ways to execute a script that gets the source (document.body) of the active tab. All of them work when I use the script on a random url, but NONE of them work when I try to use the script on a link of an extension "chrome-extension://..."
Firstly, I use a PDF viewer extension (that was not made by me) that opens the PDF in HTML format. Then I need to process the source with my extension. Therefore, the link that I try to get the source of starts with "chrome-extension://...".
But I do not have permission to execute scripts in "chrome-extension://". The error I get is:
Uncaught (in promise) Error: Cannot access a chrome-extension:// URL of different extension
Is there any kind of workaround? Is there a way to permit such execution?
Is there any way to get the source (document.body) of an active tab that is another chrome-extension?