Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Kill sticky headers.
(function () {
var i, elements = document.querySelectorAll('body *');
for (i = 0; i < elements.length; i++) {
if (getComputedStyle(elements[i]).position === 'fixed') {
elements[i].parentNode.removeChild(elements[i]);
}
}
})();
@bookmunkie
Copy link

bookmunkie commented Sep 7, 2018

Is it at all possible to adapt this to a Stylus/Stylish script?

@marty60
Copy link

marty60 commented May 13, 2019

Mozilla broke the code I was using to make this a standalone button. Had to install the kill sticky addon to get it back

The bookmarklet still works fine so the war on sticky/fixed objects continues.

@nbeaver
Copy link

nbeaver commented Jul 2, 2019

@tejasanilshah
Copy link

tejasanilshah commented Jul 27, 2020

Loved the sticky header on the new site. Loved killing it even more.
Thanks for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment