Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I 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??

This is the Chrome Addon directory
Img

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.
Posted
Comments
Sergey Alexandrovich Kryukov 16-Feb-15 17:51pm    
Do you have the source code for the available add-on?
—SA
Member 11456390 17-Feb-15 5:32am    
You can find the Chrome Addon's code here: https://github.com/collab-uniba/githubchat
Sergey Alexandrovich Kryukov 17-Feb-15 11:28am    
All right. Then, you need to write a brand new Mozilla plug-in using Mozilla rules, which are different, and probably you will be able to re-use some code from this project...
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900