Comment

Comment by err4nt

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

parent err4nt 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton