diff --git a/scripts/GUI/context_menus.js b/scripts/GUI/context_menus.js index f0b011c..219f33d 100644 --- a/scripts/GUI/context_menus.js +++ b/scripts/GUI/context_menus.js @@ -29,7 +29,7 @@ export default class Menu { }; (this.icon) ? this.#options.icon = this.icon : null; - chrome.contextMenus.create(this.#options); + if (!this.#options.hidden) {this.show(); delete this.#options.hidden;}; delete this.#options.id; }; @@ -37,6 +37,10 @@ export default class Menu { chrome.contextMenus.remove(this.ID); }; + show() { + chrome.contextMenus.create(this.#options); + } + /* Update the context menu. @param {Object} options The new options for the context menu.