From 969052912327da7798618fed8c6fc7ae9d24f372 Mon Sep 17 00:00:00 2001 From: buzz-lightsnack-2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Tue, 23 Apr 2024 22:45:06 +0800 Subject: [PATCH] add direct options manipulation for side panel --- scripts/GUI/sidepanel.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/GUI/sidepanel.js b/scripts/GUI/sidepanel.js index 2d60c75..ebdd510 100644 --- a/scripts/GUI/sidepanel.js +++ b/scripts/GUI/sidepanel.js @@ -47,7 +47,13 @@ export default class Sidebar { await chrome.sidePanel.setOptions({enabled: false}); // Then, re-enable it. - await chrome.sidePanel.setOptions({enabled: true}); + chrome.sidePanel.setOptions({enabled: true}); }; }; + + // Set the options. + // @param {object} options the options + async setOptions(options) { + await chrome.sidePanel.setOptions(options); + } } \ No newline at end of file