Code: Select all
function openPage() {
browser.tabs.update({
url: "https://myurl.com/"
});
}
browser.browserAction.onClicked.addListener(openPage);
Now the actual problem. When I click it, it opens the link in the current tab and that's fine, it should do that. When I click it with the middle mouse button though, it doesn't do anything. I want this button to open a new tab with the specified URL after I middle clicked it.
I tried researching for a while but I couldn't find anything useful, any help is appreciated.