Hacker News new | ask | show | jobs
by err4nt 1152 days ago
I rewrote this to be a little more succinct:

    document.querySelectorAll('body *').forEach(tag =>
      getComputedStyle(tag).position === 'fixed' && tag.remove()
    );
- you can use `forEach()` on the NodeList that `querySelectorAll()` returns

- you can use `remove()` directly on the DOM node you want to remove

1 comments

Here for an improved version: https://github.com/t-mart/kill-sticky