Idwal Posted October 15, 2019 Share Posted October 15, 2019 Hello, I'm just curious if it would be possible to convert a bookmarklet, written in Javascript, so it could be instead triggered by an Alfred workflow using a hot key? The bookmarklets in question all act on Workflowy and they are detailed in the link below. So instead of being reliant upon selecting a bookmarklet from a folder in my favourites in Safari, I was hoping to invoke a hot key in Alfred to trigger the script. Any guidance on whether or not this would be possible would be appreciated. Thanks. https://rawbytz.wordpress.com/software/ Link to comment
deanishe Posted October 15, 2019 Share Posted October 15, 2019 You can use AppleScript to tell Safari to execute JavaScript in a tab: tell application "Safari" to do JavaScript "alert('injected JS!');" in document 1 Link to comment
Idwal Posted October 16, 2019 Author Share Posted October 16, 2019 Many thanks for this. However, it would be great if you could indicate where I'm supposed to put this? I'm in a dark room looking for the light switch at present. Cheers. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now