old_contents: chrome.browserAction.onClicked.addListener(function(tab) {
    window.open(chrome.runtime.getURL("index.html"));
  });
  
  // Firefox
  browser.browserAction.onClicked.addListener(function(tab) {
      browser.tabs.update({
          url: "index.html"
      });
  });
  
  
  chrome.runtime.onInstalled.addListener(function (tab) {
    window.open(chrome.runtime.getURL("index.html"));
  });
  
  //Firefox
  browser.runtime.onInstalled.addListener(function (tab) {
    browser.tabs.update({
        url: "index.html"
    });
  });
new_contents: if (navigator.userAgent.search("Firefox")) {
  
    browser.browserAction.onClicked.addListener(function(tab) {
        browser.tabs.create({
            url: "index.html"
        });
    });
  
    browser.runtime.onInstalled.addListener(function (tab) {
      browser.tabs.create({
          url: "index.html"
      });
    });
  }
  else {
    chrome.browserAction.onClicked.addListener(function(tab) {
        window.open(chrome.runtime.getURL("index.html"));
    });
  
    chrome.runtime.onInstalled.addListener(function (tab) {
        window.open(chrome.runtime.getURL("index.html"));
    });
  }
  
subject: Make extension firefox compatible (#989)