I’m trying to port my Chrome extension for Firefox. It opens after clicking on the addon button in the addon bar a new tab with an address http://example.com#url=http://url-of-the-current-page.com
.
The code for this is void(window.open('http://example.com#url='+window.location.href,'_blank'));
.
This code is triggered by background script looking like chrome.browserAction.onClicked.addListener(function(tab) { chrome.tabs.executeScript(tab.id, {file: "code.js"}) });
.
In Chrome this works like a charm. In Firefox it triggers the popup blocker with an alert Firefox prevented this site from opening a popup window
.
How could i avoid popup blocker triggering and just immediately open new tab with my url?