fix ubO pt.4

This commit is contained in:
wuggy 2026-09-14 15:39:45 -07:00
commit e134fea1ba
3 changed files with 16 additions and 1 deletions

View file

@ -76,6 +76,12 @@ function BrowserAction(options, extension) {
BrowserAction.prototype = {
build() {
let areas = {
navbar: CustomizableUI.AREA_NAVBAR,
menupanel: CustomizableUI.AREA_PANEL,
tabstrip: CustomizableUI.AREA_TABSTRIP,
personaltoolbar: CustomizableUI.AREA_BOOKMARKS,
};
let widget = CustomizableUI.createWidget({
id: this.id,
viewId: this.viewId,
@ -83,7 +89,8 @@ BrowserAction.prototype = {
removable: true,
label: this.defaults.title || this.extension.name,
tooltiptext: this.defaults.title || "",
defaultArea: CustomizableUI.AREA_NAVBAR,
defaultArea: areas[this.extension.manifest.browser_action.default_area] ||
CustomizableUI.AREA_NAVBAR,
onBeforeCreated: document => {
let view = document.createElementNS(XUL_NS, "panelview");

View file

@ -31,6 +31,11 @@
"browser_style": {
"type": "boolean",
"optional": true
},
"default_area": {
"type": "string",
"enum": ["navbar", "menupanel", "tabstrip", "personaltoolbar"],
"optional": true
}
},
"optional": true