Open hrmtsh2 opened 5 months ago
Realised that many samples already use commands (albeit not custom commands). Closing issue
hi @hrmtsh2, could you point me towards any of these samples? much appreciated
Well, coming back to this issue, I have been unable to find a single sample that explicitly uses the "command" property in the manifest (I swear I saw many when I closed the issue!). Even if there were, it was certainly small in number, and many samples do not, in fact, demonstrate the commands API. I suppose one could do this by either incorporating it into existing samples, or by creating a new (set of) api-samples for it. So I will reopen this issue.
Hi @hrmtsh2, an example of an extension using the manifest declaration would be this one: https://github.com/GoogleChrome/chrome-extensions-samples/tree/main/api-samples/default_command_override
The only thing I don't see right now is an example of an extension using the getAll method. I think a new sample demonstrating that or updating an existing sample would make sense, if you want to work on something :)
Sorry I was unable to find this before.
Yes, I will work on a sample demonstrating the getAll()
method. My first idea was to extend the sample you've linked here to use getAll()
in two ways:-
I would like to write a sample for chrome.commands. The idea is to have keyboard shortcuts trigger dark/light mode (through content script injection). It could have different shortcuts for different functionalities (say, one for dark mode and another for embedding reading time estimate). @oliverdunk @jpmedley kindly give suggestions or the go-ahead.