I’m trying to make an add-on that closes the current tab when the ‘a’ key on the keyboard is pressed using the
What I’m doing right now is detecting if the key is pressed using content script and sending message to background script using
tabs.remove() is applied.
The problem is that content script won’t kick in for some domains like ‘support.mozilla.org’. Is there some way I can go around this by doing the whole thing in the background script?
I cannot use the commands API for this as the shortcut that I want is a single alphabet key and doesn’t include any meta-keys.