mkozjak
1
So I'd like to run this JS code in Chrome when I press the '-' key:
(async () => {
stores.toggleAudio()
returnToBTT('foo');
})();
This code works when I run it in Chrome's console, but nothing happens when I press '-' in Chrome. How to debug this?
The real java script action does not have anything to do with Chrome (this runs completely in BTT)
For running Java Script in Chrome, you need to use Apple Script, have a look here:
google chrome - Can AppleScript access browser tabs and execute javascript in them? - Stack Overflow
mkozjak
3
Thanks! Was a bit confused.
This is important:
Note: As of August 2018, you may need to navigate to View → Developer → Allow JavaScript from Apple Events for execute javascript
to work
1 Like