From e21b68c2402d36ab022d0d08bad8e82855d41ed2 Mon Sep 17 00:00:00 2001 From: mic Date: Fri, 11 Apr 2025 23:11:25 +0200 Subject: [PATCH] removed old menu creation code --- js/mzta-menus.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/js/mzta-menus.js b/js/mzta-menus.js index d636261b..f5c1620a 100644 --- a/js/mzta-menus.js +++ b/js/mzta-menus.js @@ -66,9 +66,9 @@ export class mzta_Menus { } async reload(also_special = []) { - await browser.menus.removeAll().catch(error => { - console.error("[ThunderAI] ERROR removing the menus: ", error); - }); + // await browser.menus.removeAll().catch(error => { + // console.error("[ThunderAI] ERROR removing the menus: ", error); + // }); this.removeClickListener(); this.loadMenus(also_special); } @@ -314,16 +314,16 @@ export class mzta_Menus { this.logger.log("addMenu: " + id); - await new Promise(resolve => - browser.menus.create({ - id: id, - title: this.getCustomTextAttribute(id) + is_default == 1 ? (browser.i18n.getMessage(id) || name) : name, - contexts: this.getContexts(id), - parentId: root - }, - resolve - ) - ); + // await new Promise(resolve => + // browser.menus.create({ + // id: id, + // title: this.getCustomTextAttribute(id) + is_default == 1 ? (browser.i18n.getMessage(id) || name) : name, + // contexts: this.getContexts(id), + // parentId: root + // }, + // resolve + // ) + // ); if (act) { this.menu_listeners[id] = act;