I have been trying to use the commands API in my project but can't incorporate it into my project. I have included all the required information on my manifest.json file for commands object.
..............
...."commands":{
"run-change-col": {
"suggested_key":"Ctrl+Shift+0",
"description":"Change color by using this key"
},
"run-restore-col": {
"suggested-key": {
"default":"Ctrl+Shift+1"
},
"description": "This is used to restore the old color"
}
}...............
I want my alert prompt to run on the tab opened. But it's not working. Below is my background.js file.
chrome.commands.onCommand.addListener((command) => {
alert(`Command ${command} has been called`);
});
I have tried reloading the extension but it is not working yet!!