1

I am trying to create an option page for my first addon. I don't want to use simple-prefs, it doesn't have the types that I need. So how do I create my own options page?

I found this post. But widget has been removed in firefox 38, so what are other ways to create own options page?

BTW, the firefox's add-on API seems to be very VERY disorganized. Old-dated information and not consistence. Is there a better place/forum/group to look up latest info?

Community
  • 1
  • 1
moon
  • 1,702
  • 3
  • 19
  • 35

1 Answers1

1

It's very easy to do this.

This is a repo of a simple html options demo page: https://github.com/Noitidart/l10n/tree/html-options

The important parts are:

Now this repository makes an xhtml page because this repository shows at the same time a fully localized addon. With xhtml you can use replacements, i highly advise you do the same. When you do use xhtml though make sure to close all typically non-closed tags, like br, img, input, etc tags like: <br> should now be <br/> otherwise youll get xml errors

This repository also shows how to localize your install.rdf, I recommend you fork this repository for the start of your addon.

Noitidart
  • 35,443
  • 37
  • 154
  • 323
  • is there a way to do it in the package.json format? I think the install.rdf and chrome manifest are the legacy way of doing it? I am not sure. Documentation on Firefox add-on site is not helpful at all. – moon Jul 03 '15 at 19:20
  • chrome.manifest method is bootstrap method, similar to legaxy (xul overlay) method but not exactly. when you create an xpi out of your package.json format addon (addon-sdk version) it creates a chrome.manifest and install.rdf, so addon-sdk is a subset of bootstrap addons. I dont know how to do this in addon-sdk/package.json method. – Noitidart Jul 03 '15 at 20:24
  • Thanks for the help. I will try it some other time. I love using firefox but the barrier to create an extension is just too high. I spent ~20 hours on learning the platform and still haven't gotten anywhere. And I finished an extension in ~5 hours on Google Chrome. I am new to both platforms. Sigh... – moon Jul 04 '15 at 04:10
  • @Z-1 you can try converting the google chrome extension with chrome tailor: https://github.com/erikvold/chrome-tailor its quite simple making a firefox addon so dont give up if you need help jump onto irc https://client00.chat.mibbit.com/?url=irc%3A%2F%2Firc.mozilla.org%2F%23extdev im always there as noida – Noitidart Jul 04 '15 at 05:57