Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Custom widget on extension settings page

7 views
Skip to first unread message

le...@cfotr.com

unread,
Apr 6, 2013, 4:46:10 AM4/6/13
to
hello.

I am developing addon for firefox via Mozilla Addon Builder. I use sdk/simple-prefs in my extension and it's work fine. But existed settings type is not enough.
I want customize extension setting page by adding custom control widget (specifically a clock widget, so user may choose time).

How can i do that ?

Arivald

unread,
Apr 8, 2013, 3:43:46 AM4/8/13
to
W dniu 2013-04-06 10:46, le...@cfotr.com pisze:
Basically You need to make new XBL binding for Your setting type.

https://developer.mozilla.org/en-US/docs/CSS/Getting_Started/XBL_bindings
https://developer.mozilla.org/en-US/docs/XUL/School_tutorial/Custom_XUL_Elements_with_XBL

As base You can use bindings for existing settings, all of them are
implemented in XBL. At least derive it from "setting-base" binding.
http://mxr.mozilla.org/comm-central/source/mozilla/toolkit/mozapps/extensions/content/setting.xml


--
Arivald

Erik Vold

unread,
Apr 8, 2013, 4:25:22 AM4/8/13
to Arivald, dev-ext...@lists.mozilla.org
Hmm I don't think XBL is necessary.

E
_______________________________________________
dev-extensions mailing list
dev-ext...@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-extensions

Erik Vold

unread,
Apr 8, 2013, 4:28:33 AM4/8/13
to lexa, dev-ext...@lists.mozilla.org
You won't need to modify the bootstrap.js file, where that page says do X in the bootstrap.js file in the startup() function, just use the main.js file for your sdk add-on pretty much anywhere you'd like.

The main.js file is evaluated within the startup() function.

Erik

----- Original Message -----
From: "lexa" <le...@cfotr.com>
To: "Erik Vold" <ev...@mozilla.com>
Cc: dev-ext...@lists.mozilla.org
Sent: Saturday, April 6, 2013 9:55:21 AM
Subject: Re: Custom widget on extension settings page

Thank you for your reply.

In documentation which you refer said that i should change bootstrap.js,
but I can't find way to do this via online Add-on builder, so i tried
Add-on SDK.

Inside file bootsrap.js contain a warning:
// IMPORTANT: Avoid adding any initialization tasks here, if you need to
do
// something before add-on is loaded consider addon/runner module
instead!

Should i ignore this warning and add code inside bootstrap.js or i
should add my code in runner.js ?


On Сб, 2013-04-06 at 09:04 -0700, Erik Vold wrote:
> Hey,
>
> You will need to follow the documentation here https://developer.mozilla.org/en-US/docs/Extensions/Inline_Options#Display_notifications
>
> This will give you a reference to the document that displays the preferences in about:addons for your add-on, then you will need to add the clock widget to that document.
>
> Erik
>
> ----- Original Message -----
> From: le...@cfotr.com
> To: dev-ext...@lists.mozilla.org
> Sent: Friday, April 5, 2013 10:46:10 PM
> Subject: Custom widget on extension settings page
>
> hello.
>
> I am developing addon for firefox via Mozilla Addon Builder. I use sdk/simple-prefs in my extension and it's work fine. But existed settings type is not enough.
> I want customize extension setting page by adding custom control widget (specifically a clock widget, so user may choose time).
>
> How can i do that ?
0 new messages