News for hackers. Stuff that matters.
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

   javascript:(function()%20{%20var%20s,e,i,ee=document.getElementsByTagName('*');%20for(i=0;%20e=ee[i];%20i++)%20{%20s=getComputedStyle(e);%20if%20(s%20&&%20s.position%20==%20'fixed')%20e.style.position='static';%20}%20})();
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

Re:Wait, What's a Bookmarklet? by dmlerner on Wednesday October 25, 2023 @03:14PM (#38016978)
Can't live without this. The 10% of the time it doesn't work makes me sad. Super useful from cVim/Vimmium etc, I keep it mapped to 'gh'