Here's a link for something I use on such news and blog sites: https://alisdair.mcdiarmid.org/kill-sticky-headers/
I works a surprising amount of the time!
I works a surprising amount of the time!
I can't live without firefox's reader mode, which is pretty much Gopher-for-html.
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]);
}
}
}
)(); (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.Regarding tree mutation - I have to admit, it gives me some petty satisfaction looking at the errors thinking "Where is your sticky NOW!"
I've considered writing an extension to kill them all by default, but I'm afraid I'll break some site in a way that really confuses me and end up wasting more time figuring out what happened than I save with the extension.