support for chromium side panel (#111)

This commit is contained in:
josc146
2023-11-13 14:48:21 +08:00
parent d0fbc9fecb
commit 3e46fa29a6
19 changed files with 62 additions and 19 deletions
+12
View File
@@ -57,6 +57,18 @@ export const config = {
}
},
},
openSidePanel: {
label: 'Open Side Panel',
action: async (fromBackground, tab) => {
console.debug('action is from background', fromBackground)
if (fromBackground) {
// eslint-disable-next-line no-undef
chrome.sidePanel.open({ windowId: tab.windowId, tabId: tab.id })
} else {
// side panel is not supported
}
},
},
closeAllChats: {
label: 'Close All Chats In This Page',
action: async (fromBackground) => {