I am developing a Firefox extension and want to open a custom html page where the user can adjust the settings. I am able to do it in different ways, but would like to use the standard Options button that is shown in the add-on manager of Firefox.
I have seen some documentation about it, but I am having problems on finding proper documentation for this function using the online Add-on Builder: Preferences system, Inline options, Simple prefs.
Does anybody know how to just add that standard Options button that is shown in the add-on manager and handle its click event to show a custom options page? (just like it's possible in Google Chrome)
Builder projects have an 'Properties' dialog that has a field you can paste the extra JSON in that you need to create preferences:
https://www.evernote.com/shard/s1/sh/cdb97850-935d-4cf1-95f1-a25c130d1498/4b0b2553f3aa85e4d6489c1d50492c97
( fixed the link, sorry )
Here's an example in builder that implements all the different types, and contains documentation as well:
https://builder.addons.mozilla.org/package/60337/latest/
You'll notice that one of the type of prefs you can define is a 'control' pref, essentially a button that emits a custom event you can listen of and react to from main.js. You could then open a new tab or addon-page with additional preferences?
https://addons.mozilla.org/en-US/developers/docs/sdk/latest/packages/addon-kit/simple-prefs.html#prefs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With