diff --git a/scripts/GUI/entrypoints/sidebar.js b/scripts/GUI/entrypoints/sidebar.js index c386a79..079e155 100644 --- a/scripts/GUI/entrypoints/sidebar.js +++ b/scripts/GUI/entrypoints/sidebar.js @@ -1,8 +1,21 @@ import Sidebar from '/scripts/GUI/sidepanel.js' export default class ManagedSidebar { - constructor () { - // WIP - new Sidebar(`/pages/popup.htm`); - } + static manage() { + chrome.runtime.onMessage.addListener( + function(request, sender, sendResponse) { + if (request.action.includes("sidebar_open")) { + ManagedSidebar.enable(); + } + } + ); + } + + static enable() { + new Sidebar(`/pages/popup.htm`); + } + + disable() { + + } } \ No newline at end of file