Warning: Undefined variable $pagename in /home/public/wiki.obormot.net/local/config.php on line 262

Warning: Undefined variable $pagename in /home/public/wiki.obormot.net/local/config.php on line 263

Warning: Cannot modify header information - headers already sent by (output started at /home/public/wiki.obormot.net/local/config.php:262) in /home/public/wiki.obormot.net/pmwiki.php on line 1794
Better Kill Sticky — OborWiki
Main »

Better Kill Sticky

This is like Kill Sticky but it also gets position:sticky elements in addition to position:fixed:

javascript:(function(){(function () {var i, elements = document.querySelectorAll('body *');for (i = 0; i < elements.length; i++) {if (getComputedStyle(elements[i]).position === 'fixed' || getComputedStyle(elements[i]).position === 'sticky') {elements[i].parentNode.removeChild(elements[i]);}}})()})()

URL-encoded version:

javascript:(function()%7B(function%20()%20%7Bvar%20i%2C%20elements%20%3D%20document.querySelectorAll('body%20*')%3Bfor%20(i%20%3D%200%3B%20i%20%3C%20elements.length%3B%20i%2B%2B)%20%7Bif%20(getComputedStyle(elements%5Bi%5D).position%20%3D%3D%3D%20'fixed'%20%7C%7C%20getComputedStyle(elements%5Bi%5D).position%20%3D%3D%3D%20'sticky')%20%7Belements%5Bi%5D.parentNode.removeChild(elements%5Bi%5D)%3B%7D%7D%7D)()%7D)()

Drag-and-droppable bookmarklet link:

Better Kill Sticky