I'm stuck trying to implement the Action command so that a keyboard shortcut will trigger the function inside background.js. The current code results in nothing happening when the keyboard shortcut is pressed.
Ideally the keyboard shortcut would trigger the function reddenPage inside background.js.
I assume some code needs to be placed in background.js, I'm just not sure where or what the code should be. Any help is much appreciated!
Manifest.json
{
"name": "Page Redder",
"action": {},
"manifest_version": 3,
"version": "0.1",
"description": "Turns the page red when you click the icon",
"permissions": [
"activeTab",
"scripting"
],
"background": {
"service_worker": "background.js"
},
"commands": {
"_execute_action": {
"suggested_key": {
"default": "Ctrl+Shift+F",
"mac": "MacCtrl+Shift+F"
}
}
}
}
background.js
--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/3c64dc27-21bd-4a7b-9901-bc0ce31480f4n%40chromium.org.