News for hackers. Stuff that matters.
Re:Scrollbar Blindness by dahauns on Thursday August 27, 2020 @12:35PM (#24295418)
Very nice!

And for Nuke Overdrive mode, add a check for position: sticky, i.e.

  (function () {
    var elpos,i, elements = document.querySelectorAll('body *');
    for (i = 0; i < elements.length; i++) {
      elpos = getComputedStyle(elements[i]).position;
      if (elpos === 'fixed' || elpos === 'sticky') {
        elements[i].parentNode.removeChild(elements[i]);
      }
    }
  }
  )();
Re:Scrollbar Blindness by hombre_fatal on Thursday August 27, 2020 @06:30PM (#24299427)
Here's that code written by someone who has used Javascript in the last 10 years:

    (function () {
        for (const node of document.querySelectorAll('body *')) {
            if (['fixed', 'sticky'].includes(getComputedStyle(node).position)) {
                node.style.display = 'none'
                // node.remove()
            }
        }
    })()
I found tree mutation too aggressive in the first site I tested it on (the site's JS code expected the navbar to exist, so it just blew up with runtime errors). Simply changing the display property is sufficient.
Re:Scrollbar Blindness by dahauns on Friday August 28, 2020 @09:36AM (#24304643)
Ah, thanks, looks much better! Yeah, I just took the original and quick'n'dirty-added the second condition, all the while thinking "hmm..." - and quickly losing interest again. :)

Regarding tree mutation - I have to admit, it gives me some petty satisfaction looking at the errors thinking "Where is your sticky NOW!"