How Do I Trigger a Specific Chrome Extension Function via JavaScript or Other Means?

I'd like to create a macro to trigger a specific extension function in Vivaldi (Chrome Based).

The thing is that Vivaldi is currently affected by a bug which prevents user to deploy the classic chrome://extensions/shortcuts

Therefore, I would like to write a script to fire from Keyboard Maestro.

I am a complete JS noob and even after digging for hours on the web I couldn't marshal a single line of useful code.

Digging into the filesystem I've found the manifest.json files used by Vivaldi to trigger the extensions, and yet I am too inexperienced to decode them.

Can anyone point me to the right direction? Any help would be greatly appreciated by me and possibly many others in the Vivaldi community! (3.6 KB)

Hey Alex,

My understanding is that browser extensions are hardened to prevent access from external mechanisms.

You can sometimes use AppleScript UI-Scripting to click toolbar buttons.


Thanks Chris. That's crucial to know.

I am trying to devise a work-around for the bug.

The following is the most primitive solution that comes to mind:

The Vivaldi bug can be avoided by setting the shortcuts to Global.
This is a real pain because it means that the shortcut will be activated from anywhere in MacOS. This could possibly be creating conflicts with other macros and shortcuts.
As a compromise, I could map a globally unused shortcut to the Chrome Extension I want to activate.
After that, I could use KM to press the new abstruse shortcut while pressing the old simple shortcut.

I've tried the above but the KM macro does not trigger the corresponding Vivaldi macro. My hypothesis is that Vivaldi is interfering with that. When setting a Vivaldi Extension to 'Global', the browser might be start monitoring keyboard inputs at the hardware level. So it could be cancelling the macro if does not see it coming directly from the keyboard.

Having tried that, do you have any other idea of how I could work around the bug?

Using AppleScript to press the buttons would be quite inelegant. Another problem with this is that it might not work with some extension functions that aren't GUI assigned.

Hey Alex,

I'm not using Vivaldi at present except for testing.

The 4.2.2406.48 update seems to have solved the keyboard shortcut problem.

I just added hotkeys for 1Password and Extensity, and they're working.

1⠀⠀for 1Password

E⠀⠀⠀⠀⠀ for Extensity


Unfortunately is not working, for many users.

Even after investigating, it seems like there's no real logic in who gets the bug and who doesn't.

I still haven't found a workaround to this glitch, as it seems that Vivaldi is interfering with KM macros. Vivaldi does not trigger any action when called from KM.

Thanks for the help.

Hey Alex,

I have Extensity mapped to Opt-E, and I can drive that with Keyboard Maestro 10.0.1 on my system.

Vivaldi 4.3.2439.65 on macOS 10.14.6 Mojave

Frustrating that you can't get it to work...