From b7b19fed6f576e0a18f80a494a6d2b73e7032b42 Mon Sep 17 00:00:00 2001 From: buzz-lightsnack-2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Sat, 27 Apr 2024 23:35:02 +0800 Subject: [PATCH] attempt sending messages to trigger the pop-up --- scripts/GUI/entrypoints/menu.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/GUI/entrypoints/menu.js b/scripts/GUI/entrypoints/menu.js index 4bece63..a44446b 100644 --- a/scripts/GUI/entrypoints/menu.js +++ b/scripts/GUI/entrypoints/menu.js @@ -1,6 +1,5 @@ import Menu from '/scripts/GUI/menus.js'; import texts from "/scripts/mapping/read.js"; -import ManagedSidebar from "./sidebar.js"; export default class MenuEntry { /* Create all entries. */ @@ -16,12 +15,18 @@ export default class MenuEntry { this.menu.show(); } - /* Disable. */ + /* + Disable. + */ disable () { this.menu.remove(); } + /* + The onclick event + */ static onclick() { - ManagedSidebar.enable(); + // Send the message to open the side panel. + chrome.runtime.sendMessage({"action": "popup_open"}); }; } \ No newline at end of file