Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Kill sticky and fixed headers bookmarklet, and possibly re-enable scrolling of the page
(function () {
const elements = document.querySelectorAll('body *');
const body = document.querySelector('body');
if (getComputedStyle(body).overflow === 'hidden') {
body.style.overflow = "unset";
}
elements.forEach(function (element) {
if (["-webkit-sticky", "sticky", "fixed"].includes(getComputedStyle(element).position)) {
element.parentNode.removeChild(element);
}
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.