add direct options manipulation for side panel

This commit is contained in:
buzz-lightsnack-2007 2024-04-23 22:45:06 +08:00
parent 729dd6dfbd
commit 9690529123

View file

@ -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);
}
}