I'm pretty new to making extensions, so I'm not sure if this is how they work. In the manifest.json, you can set the browser action to have a default popup. I have my html code and it pops up when you click the extension icon, however, I would like it to open this html in the window or a new tab, and not inside a small popup window. Any way to do this? I couldn't find a quick fix.
To open the popup.html in a new tab, you can pass in the extension url in background.js
. See: https://developer.chrome.com/extensions/extension#method-getURL
Like:
chrome.browserAction.onClicked.addListener(function(activeTab)
{
chrome.tabs.create({'url': chrome.extension.getURL('popup.html')}, function(tab) {
});
});
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