I rewrote my extension to WebExtensions for Firefox and Google Chrome, and it works fine for HTTP/HTTPS. However, it no longer works on URLs with the view-source:
scheme. (These URLs are the HTML source code of web pages shown by CTRL+U.)
Firefox 57 gives this error
Error: Missing host permission for the tab
Google Chrome 62 does apparently nothing.
There is no documentation about the view-source scheme. Is there a way to enable the extension for view-source?
I haven't dabbled too much in extensions but since the error involves Host permissions in firefox, check the Host permissions:
In Firefox, from version 56 onwards, extensions automatically get host permissions for their own origin, which is of the form:
moz-extension://60a20a9b-1ad4-af49-9b6c-c64c98c37920/ where 60a20a9b-1ad4-af49-9b6c-c64c98c37920 is the extension's internal ID. The extension can get this URL programmatically by
calling extension.getURL():
browser.extension.getURL(""); // moz-extension://60a20a9b-1ad4-af49-9b6c-c64c98c37920/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With