Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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})();


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


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'


I use that all the time (to get rid of any fixed element, incl footers and floating sidebars)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: