Add-ons for Pale Moon and other applications
General discussion, compatibility, contributed extensions, themes, plugins, and more.
Moderators: FranklinDM, Lootyhoof
-
Jalkhov
- Apollo supporter
- Posts: 38
- Joined: 2019-12-22, 00:44
- Location: Venezuela
-
Contact:
Unread post
by Jalkhov » 2022-01-17, 19:45
I will use this board for my noob questions. It happens that I have had to learn XUL by disassembling extensions and with one or another decent (but archaic) link that I find out there, unfortunately I did not start my career as a programmer in the golden age of XUL/XPCOM. I have an extension which in the customization box looks like this, I do not know what I'm missing.
This is the button code:
Code: Select all
<toolbarpalette id="BrowserToolbarPalette">
<toolbarbutton id="addonToolbarButton"
class="toolbarbutton-1 chromeclass-toolbar-additional"
oncommand="addon.toggleBar()"
label="Amazing Addon"
tooltip="addon-tooltip">
<menupopup id="blank" />
</toolbarbutton>
</toolbarpalette>
The button icon is placed by css
Code: Select all
#addonToolbarButton {
list-style-image: url("chrome://addon/skin/addon-icon/icon-24.png");
}
[iconsize="small"] #addonToolbarButton
{
list-style-image: url("chrome://addon/skin/addon-icon/icon-16.png");
}
-
moonbat
- Knows the dark side
- Posts: 4942
- Joined: 2015-12-09, 15:45
-
Contact:
Unread post
by moonbat » 2022-01-18, 00:26
Jalkhov wrote: ↑2022-01-17, 19:45
I will use this board for my noob questions.
No. Use
the right board and don't be a noob straight off the bat
If you're adding toolbar buttons, you need to overlay the toolbar customization dialog with the stylesheet where you've defined your button names/colors, like so in chrome.manifest -
Code: Select all
style chrome://global/content/customizeToolbar.xul chrome://myextension/skin/myicondefinition.css
It's well documented in the XUL Tutorial
for toolbars. Go through its relevant sections instead of simply copypasting from other extensions without understanding what you're doing.
-
Jalkhov
- Apollo supporter
- Posts: 38
- Joined: 2019-12-22, 00:44
- Location: Venezuela
-
Contact:
Unread post
by Jalkhov » 2022-01-18, 21:53
moonbat wrote: ↑2022-01-18, 00:26
It's well documented in the XUL Tutorial
for toolbars. Go through its relevant sections instead of simply copypasting from other extensions without understanding what you're doing.
Thanks, and thanks for that link, it will be very useful
-
moonbat
- Knows the dark side
- Posts: 4942
- Joined: 2015-12-09, 15:45
-
Contact:
Unread post
by moonbat » 2022-01-19, 00:31
See
the XUL tutorial as well. In fact bookmark the base website because it is the only backup of old Mozilla documentation for XUL extension development. There's tons of stuff and API references there.