Skip to content

Instantly share code, notes, and snippets.

@maxnatt
maxnatt / kill.js
Last active January 2, 2023 19:48
sticky
/// kill.js
document.querySelectorAll('body *').forEach(function(node) {
if (['fixed', 'sticky'].includes(getComputedStyle(node).position)) {
node.parentNode.removeChild(node);
}
});
document.querySelectorAll('html *').forEach(function(node) {
var s = getComputedStyle(node);
if ('hidden' === s['overflow']) { node.style['overflow'] = 'visible'; }