Hi All,
I wanted to add a basic checkbox option to my YouTubeNonStop plugin, but I haven't found clear instructions for making that possible.
Is there an extension I can refer to as to how I can create a very simple "Options" page for the extension that has a simple checkbox? Or detailed instructions for making this process as simple as possible?
If I can even get that far, once the checkbox has been checked by the user, how do I save that setting and then read that value into the main xul overlay script responsible for interacting with the page / tabs DOM?
Creating basic options xul page for extension Topic is solved
Moderators: FranklinDM, Lootyhoof
-
- Apollo supporter
- Posts: 41
- Joined: 2014-10-22, 00:32
- Location: USA
-
- Project Contributor
- Posts: 204
- Joined: 2020-03-02, 16:04
Re: Creating basic options xul page for extension
When i was converting FLST options to inline options(options.xul) i based off JustOff's Lull the tabs. Note that this is not fully functional XUL document(as far as i gather - it is some not very clean hack which inlines contents of options.xul into addons manager, hence the name of this options type), so very limited subset of functionality will work.
Prefs are saved on modification.
Unfortunately i can't tell how exactly you watch for pref modification. IIRC the simplest way is to always refer to pref in your xul/js code, but this may have delayed effect if some of your code executed once per page reload or especially if once per window/tab creation.
Prefs are saved on modification.
Unfortunately i can't tell how exactly you watch for pref modification. IIRC the simplest way is to always refer to pref in your xul/js code, but this may have delayed effect if some of your code executed once per page reload or especially if once per window/tab creation.
-
- Moon Magic practitioner
- Posts: 2194
- Joined: 2018-05-05, 13:29
Re: Creating basic options xul page for extension
Read these:
The checkbox will be accessible from the add-on manager.
-
- Apollo supporter
- Posts: 41
- Joined: 2014-10-22, 00:32
- Location: USA
Re: Creating basic options xul page for extension
Thank you, this is perfect.
Not a big deal, but is there a way to add a line break between radio options somehow in the xul?
I tried `<br />` but that didn't push the second radio option to a new line.
-
- Pale Moon guru
- Posts: 35651
- Joined: 2011-08-28, 17:27
- Location: Motala, SE
Re: Creating basic options xul page for extension
XUL is not HTML
You probably want to put items in an <hbox> or <vbox> to organise them in the layout you prefer, or put an orient="vertical" on a containing box to have items one below the other, instead.
You probably want to put items in an <hbox> or <vbox> to organise them in the layout you prefer, or put an orient="vertical" on a containing box to have items one below the other, instead.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite