Skip to content

Commit

Permalink
add cmd in with-backgroudn
Browse files Browse the repository at this point in the history
  • Loading branch information
louisgv committed May 6, 2023
1 parent 6ad1405 commit 12cc651
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
8 changes: 7 additions & 1 deletion with-background/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,11 @@ console.log(
)

chrome.action.onClicked.addListener(() => {
console.log(generateMnemonic())
console.log(`action clicked: ${generateMnemonic()}`)
})

chrome.commands.onCommand.addListener((command) => {
if (command === "test") {
console.log(`test command: ${generateMnemonic()}`)
}
})
10 changes: 9 additions & 1 deletion with-background/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@
"manifest": {
"host_permissions": [
"https://*/*"
]
],
"commands": {
"test": {
"suggested_key": {
"default": "Alt+W"
},
"description": "Open the extension main popup"
}
}
}
}

0 comments on commit 12cc651

Please sign in to comment.