Re:Wait, What's a Bookmarklet?
by Khoth on Wednesday October 25, 2023 @12:32PM
(#38014609)
I use one to get rid of fixed headers on a page
[ Parent
| on HN ]
Re:Wait, What's a Bookmarklet?
by williamdclt on Wednesday October 25, 2023 @12:50PM
(#38014874)
I use that all the time (to get rid of any fixed element, incl footers and floating sidebars)
Re:Wait, What's a Bookmarklet?
by colinprince on Wednesday October 25, 2023 @12:57PM
(#38014990)
ya, same, I don't know where I got this one but I modified it to include sticky
javascript:var ni%3Ddocument.createNodeIterator(document.documentElement,NodeFilter.SHOW_ELEMENT,function(node)%7Breturn document.defaultView.getComputedStyle(node,null).getPropertyValue("position").match(/sticky|fixed/) %3F NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT%3B%7D)%3Bwhile(currentNode%3Dni.nextNode())%7Bconsole.log(currentNode.remove())%3B%7D