4 ms·
Almost. This modification would cover it: ... for (i = 0; i < elements.length; i++) { if (getComputedStyle(elements[i]).position === 'fixed' ||
by jrapdx3 9y ago
Almost. This modification would cover it:
...
for (i = 0; i < elements.length; i++) {
if (getComputedStyle(elements[i]).position === 'fixed' ||
getComputedStyle(elements[i]).position === 'sticky') {
elements[i].parentNode.removeChild(elements[i]);
}
} ...
There are probably more clever ways to go, but this will do the trick. BTW haven't found many sites using "sticky", but good to be ready just in case.