Created
August 13, 2018 13:45
-
-
Save nickscript0/aab373915698bbc1456a9ec6789f652c to your computer and use it in GitHub Desktop.
Kill Sticky Headers - Updated Version
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Updated the original to include the new 'sticky' style in addition to 'fixed' https://alisdair.mcdiarmid.org/kill-sticky-headers/ | |
// Note to run this as a Chrome bookmark paste it in the URL field, prefixed with: javascript: | |
(function () { | |
var i, elements = document.querySelectorAll('body *'); for (i = 0; i < elements.length; i++) { | |
if (["sticky", "fixed"].includes(getComputedStyle(elements[i]).position)) { | |
elements[i].parentNode.removeChild(elements[i]); | |
} | |
} | |
} | |
)(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment