Miky_1 0 Newbie Poster

Click HereI have a Chrome Addon and I have to implement the same addon in Firefox.
I saw that the directory structure is different but I'm having some problems with Javascript files.
In which Firefox folder should I put my background.js code??
Is there an expert that could help me?

This is the Chrome Addon directory
http://postimg.org/image/geqyizcw9/

And how can I write this Chrome Javascript code for Firefox??

 1)var views = chrome.extension.getViews({type: "popup"});
    2)var storage= chrome.storage.local;
    3)alert(chrome.i18n.getMessage("genericError"));
    4)chrome.tabs.onUpdated.addListener(checkForValidUrl);
      chrome.tabs.onRemoved.addListener(resetBackground);    
    5)chrome.pageAction.setIcon({path: "images/logo16.png", tabId:firedTabId});
    6)chrome.runtime.onMessage.addListener
    7)bgpage = chrome.extension.getBackgroundPage();

Thank you very much, I really don't know how to do that. If you want I could put the github's Chrome Addon project link.