Skip to content

Instantly share code, notes, and snippets.

@dacto
Forked from alisdair/kill-sticky.js
Last active July 23, 2022 21:03
Show Gist options
  • Save dacto/255f3275570a3b11e6c251c1cbbaa1f9 to your computer and use it in GitHub Desktop.
Save dacto/255f3275570a3b11e6c251c1cbbaa1f9 to your computer and use it in GitHub Desktop.
Kill sticky headers.
(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]);
}
}
})();
javascript:(function(){(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