mirror of
https://github.com/mdn/webextensions-examples.git
synced 2026-04-16 06:18:35 +02:00
fix commands undefined error
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
* shortcut: "Ctrl+Shift+Y"
|
||||
* }]
|
||||
*/
|
||||
chrome.commands.getAll(function(commandsArray) {
|
||||
chrome.commands.getAll(function(commands) {
|
||||
commands.forEach(function(command) {
|
||||
console.log(command);
|
||||
});
|
||||
@@ -24,4 +24,4 @@ chrome.commands.getAll(function(commandsArray) {
|
||||
*/
|
||||
chrome.commands.onCommand.addListener(function(command) {
|
||||
console.log("onCommand event received for message: ", command);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user