mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-20 15:27:32 +09:00
fix ubO pt.4
This commit is contained in:
parent
3f10f6cfc5
commit
e134fea1ba
3 changed files with 16 additions and 1 deletions
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -31,6 +31,11 @@
|
|||
"browser_style": {
|
||||
"type": "boolean",
|
||||
"optional": true
|
||||
},
|
||||
"default_area": {
|
||||
"type": "string",
|
||||
"enum": ["navbar", "menupanel", "tabstrip", "personaltoolbar"],
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"optional": true
|
||||
|
|
|
|||
|
|
@ -218,9 +218,12 @@
|
|||
"enum": [
|
||||
"alarms",
|
||||
"clipboardWrite",
|
||||
"dns",
|
||||
"idle",
|
||||
"notifications",
|
||||
"privacy",
|
||||
"storage"
|
||||
,"unlimitedStorage"
|
||||
]
|
||||
},
|
||||
{ "$ref": "MatchPattern" }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue