removed old menu creation code
This commit is contained in:
parent
b707096ed8
commit
e21b68c240
1 changed files with 13 additions and 13 deletions
|
|
@ -66,9 +66,9 @@ export class mzta_Menus {
|
||||||
}
|
}
|
||||||
|
|
||||||
async reload(also_special = []) {
|
async reload(also_special = []) {
|
||||||
await browser.menus.removeAll().catch(error => {
|
// await browser.menus.removeAll().catch(error => {
|
||||||
console.error("[ThunderAI] ERROR removing the menus: ", error);
|
// console.error("[ThunderAI] ERROR removing the menus: ", error);
|
||||||
});
|
// });
|
||||||
this.removeClickListener();
|
this.removeClickListener();
|
||||||
this.loadMenus(also_special);
|
this.loadMenus(also_special);
|
||||||
}
|
}
|
||||||
|
|
@ -314,16 +314,16 @@ export class mzta_Menus {
|
||||||
|
|
||||||
this.logger.log("addMenu: " + id);
|
this.logger.log("addMenu: " + id);
|
||||||
|
|
||||||
await new Promise(resolve =>
|
// await new Promise(resolve =>
|
||||||
browser.menus.create({
|
// browser.menus.create({
|
||||||
id: id,
|
// id: id,
|
||||||
title: this.getCustomTextAttribute(id) + is_default == 1 ? (browser.i18n.getMessage(id) || name) : name,
|
// title: this.getCustomTextAttribute(id) + is_default == 1 ? (browser.i18n.getMessage(id) || name) : name,
|
||||||
contexts: this.getContexts(id),
|
// contexts: this.getContexts(id),
|
||||||
parentId: root
|
// parentId: root
|
||||||
},
|
// },
|
||||||
resolve
|
// resolve
|
||||||
)
|
// )
|
||||||
);
|
// );
|
||||||
|
|
||||||
if (act) {
|
if (act) {
|
||||||
this.menu_listeners[id] = act;
|
this.menu_listeners[id] = act;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue