News for hackers. Stuff that matters.
Re:A bookmarklet to kill sticky headers by crazygringo on Saturday February 01, 2025 @05:06PM (#42902887)
I've been using the Kill-Sticky Chrome extension for years:

https://chromewebstore.google.com/detail/kill-sticky/lekjlgf...

Because it has a configurable keyboard shortcut.

Can't imagine browsing the web without it. At this point hitting Cmd+K when I visit an article is pure reflex.

A bookmarklet would be more secure, but I don't know of a way to assign keyboard shortcuts to one.

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.
Re:A bookmarklet to kill sticky headers by fitsumbelay on Saturday February 01, 2025 @09:16PM (#42904990)
this is awesome. thanks
Re:A bookmarklet to kill sticky headers by aeromusek on Sunday February 02, 2025 @06:50AM (#42908080)
Chrome bookmarks also show up as items in the Bookmarks menu, which means you can use the built-in macOS functionality to assign your own custom keyboard shortcuts in System Preferences → Keyboard.
Re:A bookmarklet to kill sticky headers by gabrielsroka on Sunday February 02, 2025 @01:33PM (#42910607)
> more secure

interesting. that extension's Support section has a link to https://github.com/eemeli/chrome-kill-sticky whose license is MIT, so you could make your own extension. That repo also has a newer version of the code, and that was deployed on the Firefox store, but not on the Chrome store.