feat: add entry for Independent Panel and Keyboard Shortcuts

This commit is contained in:
josc146
2023-04-02 21:34:58 +08:00
parent 60b479729a
commit 5fbbd5d825
12 changed files with 93 additions and 7 deletions
+3
View File
@@ -156,6 +156,8 @@ Browser.commands.onCommand.addListener(async (command) => {
selectionText: '',
useMenuPosition: false,
}
console.debug('command triggered', message)
if (menuConfig[command].action) menuConfig[command].action()
Browser.tabs.sendMessage(currentTab.id, {
type: 'CREATE_CHAT',
data: message,
@@ -208,6 +210,7 @@ function refreshMenu() {
useMenuPosition: tab.id === currentTab.id,
}
console.debug('menu clicked', message)
if (menuConfig[message.itemId].action) menuConfig[message.itemId].action()
Browser.tabs.sendMessage(currentTab.id, {
type: 'CREATE_CHAT',
data: message,