Live data from Hacker News

A bookmarklet to kill sticky headers (2013)

alisdair.mcdiarmid.org

51–60 of 91 posts

Re: A bookmarklet to kill sticky headers (2013)

#51
The whole entire internet is broken.

Specifically what I mean is HTML is flawed. It should never have been a presentation format. It should've always been a DATA format, like JSON, or XML, from day one. The browser itself would then be able to display information (pages) in whatever style, colors, and format it wants.

Probably 99.999% of developers agree with this, but we're stuck in a RUT it seems. I know what I'm sort of talking about is the "Semantic Web", and I'm probably preaching to the choir to bring it up on Hacker News.

But I'm wondering if it's possible to change? What would it take? We'd need some major movement, almost like Web3, or Blockchains, that got everyone to wake up and realize there's an easier way. We're stuck because there's no real incentive for change. It's a chicken and egg problem. No one is gonna be first to design something, unless everyone else is already using it. :( Thanks for listening. That was step one I guess.

Re: A bookmarklet to kill sticky headers (2013)

#52

This article is about removing all fixed elements on a page. Not only do other elements catch strays, fixed isn't the industry standard way of making sticky headers in 2025!

Fixed isn't the industry standard way of making sticky headers in 2025 What is? Flexbox? Or something else? (Not a FE dev, though I'm vaguely conversant in CSS, mostly by using it to fix site annoyances on my own via stylesheet management extensions such as Stylus.)

There's `position: sticky` now for headers. It has better ergonomics than fixed and it's nice than it's supported by all modern browsers.

https://developer.mozilla.org/en-US/docs/Web/CSS/position

Re: A bookmarklet to kill sticky headers (2013)

#54
A "kill-fixed" bookmarklet that kills anything with position "fixed" or "sticky" is essential to making websites usable. The "best" is Substack, where I load the page with JavaScript disabled, then enable it to kill the red fixed-position bar telling me that JavaScript is essential.

Re: A bookmarklet to kill sticky headers (2013)

#56

Dont hate me, but I would like to have the opposite functionality Just for mobile, where it is very annoying on long pages (Laravel Docs for example) to scroll up just to get the menue button.

Same here, and I want the sticky Safari bottom tool bar back! Why is that not configurable?

Re: A bookmarklet to kill sticky headers (2013)

#57

Earlier quoted context omitted.

Fixed isn't the industry standard way of making sticky headers in 2025 What is? Flexbox? Or something else? (Not a FE dev, though I'm vaguely conversant in CSS, mostly by using it to fix site annoyances on my own via stylesheet management extensions such as Stylus.)

There's `position: sticky` now for headers. It has better ergonomics than fixed and it's nice than it's supported by all modern browsers. https://developer.mozilla.org/en-US/docs/Web/CSS/position

Thanks!

Re: A bookmarklet to kill sticky headers (2013)

#58

Love it! Since it's now 2025, we probably should search for "fixed" & "sticky" Here's a minified version with "sticky" added: javascript:(()=>[...document.querySelectorAll('body *')].map(el=>["fixed","sticky"].includes(getComputedStyle(el).position)&&el.remove()))();

Interestingly running this in the console works but from a bookmarklet changes all the page content to false,false,false,.... (on firefox)

Any idea?

Re: A bookmarklet to kill sticky headers (2013)

#59

Love it! Since it's now 2025, we probably should search for "fixed" & "sticky" Here's a minified version with "sticky" added: javascript:(()=>[...document.querySelectorAll('body *')].map(el=>["fixed","sticky"].includes(getComputedStyle(el).position)&&el.remove()))();

Interestingly running this in the console works but from a bookmarklet changes all the page content to false,false,false,.... (on firefox) Any idea?

Change map to forEach?
Post reply on HN