Skip to content

Instantly share code, notes, and snippets.

@nickscript0
Created August 13, 2018 13:45
Show Gist options
  • Save nickscript0/aab373915698bbc1456a9ec6789f652c to your computer and use it in GitHub Desktop.
Save nickscript0/aab373915698bbc1456a9ec6789f652c to your computer and use it in GitHub Desktop.
Kill Sticky Headers - Updated Version
// 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