Custom Quick Commands
-
What?
Allow me to define a javascript function with access to the
chrome.*
orvivaldi.*
api contexts.I could then create a named command which acts as an alias to this function, which could take in parameters similar to the zoom command.
Example use case
I toggle a specific extension several times a day.
Currently I need to use either yet another extension to manage these extensions, or open the extensions page and toggle it myself.
I know I can use the following function to do what I need to do:
function toggleMyThing(){ chrome.management.get("nelgpeiopiigofemmicieijbecebpjbo", e => { chrome.management.setEnabled(e.id, !e.enabled, ()=>{}) }); }
I would like to be able to define this somewhere and call it myself in a quick command:
Related points
This request is similar in concept to custom buttons, though specific to the quick commands feature.
I also see some similarities to the page actions, whereby a user can define their own javascripts that can run on a page. Page Actions can be called from quick commands, but don't have access to the aforementioned APIs. They are also lost every update.
-
@LonM Just a quick email to say that I'd love this.
My use case: I debug print stylesheets a lot. Potentially, you currently have a long process to perform it (developer tools > ... > more tools > rendering > console > rendering > scroll down > click "print stylesheet"). It'd be quite brilliant if I could create my own custom command to do that.
I'm guessing most people don't spend quite as much time looking at print stylesheets as me, so it doesn't really make sense for it to be a built-in feature to do that specific thing.
-
As a developer, this would be so useful. You could automate all sorts of things. Especially if you could use these aliases in a command chain and take a parameter
-
@NonlinearFruit Command chains don’t take parameters at the moment. I wished they could though. Meanwhile it’s possible to create custom keyboard shortcuts and custom buttons with access to the user interface. Both require a javascript modification, but it is very doable and quite handy.