Options page for Firefox addon using the Add

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

链接地址: http://www.djcxy.com/p/65248.html

上一篇: 我如何将一个Pyglet精灵与一个Pymunk形状绑定,以便它们一起旋转?

下一篇: Firefox插件的选项页面使用添加