Migrating Chrome Extension to Firefox

firefox-addon, google-chrome-extension, json, xul

Solution

You might find it easier using the addon SDK:

https://addons.mozilla.org/en-US/developers/docs/sdk/latest/packages/addon-kit/page-mod.html

https://addons.mozilla.org/en-US/developers/builder

Problem

I have a chrome extension with a manifest.json file containing basically this: ``` "content_scripts": [ { "matches": ["*://mail.google.com/mail/*"], "js": ["safegmailbootstrap.js","cryptojs/rollups/aes.js", "javascrypt/aes.js", "javascrypt/md5.js", "javascrypt/aesprng.js", "javascrypt/jscrypt.js", "javascrypt/entropy.js"] } ``` I'm trying to build a firefox extension, I've created all the structures, but still can't make it work in firefox. I think I'm writing the XUL file in /chrome/content wrong. I've tried writing it like this: ``` <?xml version="1.0"?> <overlay id="sample" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script src="safegmailbootstrap.js" /> <script src="cryptojs/rollups/aes.js" /> <script src="javascrypt/aes.js" /> <script src="javascrypt/md5.js" /> <script src="javascrypt/aesprng.js" /> <script src="javascrypt/jscrypt.js" /> <script src="javascrypt/entropy.js" /> </overlay> ``` I don't know which is the analogous of json chrome file "matches" to firefox extension.

Original source