Re:A bookmarklet to kill sticky headers
by Noumenon72 on Saturday February 01, 2025 @08:56PM
(#42904851)
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.
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:
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.