Open realrecordzLab opened 4 years ago
I think you'll need to make a background script that is responsible for opening a new tab when the browser action button is clicked. I recommend scaffolding the app with background and standalone to get the relevant manifest and boilerplate background script generated for you, and then tweaking the background handler to open a new tab
Found the solution
browser.browserAction.onClicked.addListener( tab => {
browser.tabs.create({ ... });
});
This will create a new tab when the extension icon is clicked.
I've started using this plugin with vue cli ui. I want to create a new tab when the extension button is clicked, so I've selected standalone when I've configured the project in the ui. The problem is that nothing will happen if I click the extension button so now I'm confused on how to proceed with the project setup. I've added the tab permission in the manifest, is there any other step I need to do?