I have one web page and one chrome extension, how can I open url like this chrome-extension://chrome-id/page.html. Here is my code:
$(document).on('click', '#btnOpenChromeExtension', function () {
window.open("chrome-extension://chrome-id/webpage.html", "_blank");
});
But when click, it open new tab in blank page with url is: about:blank. How can I open link is chrome-extension ?
This is restricted due to the extension policies. You need to add to the extension's manifest.json file the following:
{
...
"web_accessible_resources": [
"page/mypage.html"
],
...
}
Of course, this must be your extension. This is the only way I know to make it work.
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