mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-22 16:37:31 +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 = {
|
BrowserAction.prototype = {
|
||||||
build() {
|
build() {
|
||||||
|
let areas = {
|
||||||
|
navbar: CustomizableUI.AREA_NAVBAR,
|
||||||
|
menupanel: CustomizableUI.AREA_PANEL,
|
||||||
|
tabstrip: CustomizableUI.AREA_TABSTRIP,
|
||||||
|
personaltoolbar: CustomizableUI.AREA_BOOKMARKS,
|
||||||
|
};
|
||||||
let widget = CustomizableUI.createWidget({
|
let widget = CustomizableUI.createWidget({
|
||||||
id: this.id,
|
id: this.id,
|
||||||
viewId: this.viewId,
|
viewId: this.viewId,
|
||||||
|
|
@ -83,7 +89,8 @@ BrowserAction.prototype = {
|
||||||
removable: true,
|
removable: true,
|
||||||
label: this.defaults.title || this.extension.name,
|
label: this.defaults.title || this.extension.name,
|
||||||
tooltiptext: this.defaults.title || "",
|
tooltiptext: this.defaults.title || "",
|
||||||
defaultArea: CustomizableUI.AREA_NAVBAR,
|
defaultArea: areas[this.extension.manifest.browser_action.default_area] ||
|
||||||
|
CustomizableUI.AREA_NAVBAR,
|
||||||
|
|
||||||
onBeforeCreated: document => {
|
onBeforeCreated: document => {
|
||||||
let view = document.createElementNS(XUL_NS, "panelview");
|
let view = document.createElementNS(XUL_NS, "panelview");
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,11 @@
|
||||||
"browser_style": {
|
"browser_style": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"optional": true
|
"optional": true
|
||||||
|
},
|
||||||
|
"default_area": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["navbar", "menupanel", "tabstrip", "personaltoolbar"],
|
||||||
|
"optional": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"optional": true
|
"optional": true
|
||||||
|
|
|
||||||
|
|
@ -218,9 +218,12 @@
|
||||||
"enum": [
|
"enum": [
|
||||||
"alarms",
|
"alarms",
|
||||||
"clipboardWrite",
|
"clipboardWrite",
|
||||||
|
"dns",
|
||||||
"idle",
|
"idle",
|
||||||
"notifications",
|
"notifications",
|
||||||
|
"privacy",
|
||||||
"storage"
|
"storage"
|
||||||
|
,"unlimitedStorage"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{ "$ref": "MatchPattern" }
|
{ "$ref": "MatchPattern" }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue