Copy and add the following code in the background
Open the options page#
browser.action.onClicked.addListener(() => {
browser.runtime.openOptionsPage()
})
Open the sidePanel page#
browser.sidePanel
.setPanelBehavior({ openPanelOnActionClick: true })
.catch((error) => console.error(error));