Hacker News new | ask | show | jobs
by Noumenon72 499 days ago
You can add a Chrome site shortcut whose URL is a bookmarklet, so it will run the bookmarklet when you type "bm" in the address bar (for example).

Taking it even further so it will run with just one keystroke, on my Mac I used Karabiner to run a terminal script that types the bookmarklet in the address bar for me:

    tell application "System Events"
        keystroke "l" using {command down} -- Select the address bar (Cmd+L)
        keystroke "bm" -- Type "bm"
        delay 0.2  # Let Chrome recognize the site shortcut
        keystroke return -- Press Enter
    end tell
In my script I open a new Chrome window before this because the bookmarklet submits a nag screen from my job, but for stickies you could have it just switch back to the window you're reading instead.
1 comments

this is awesome. thanks