2 ms·
Does this little update to the bookmarklet solve the issue? I'm not a webdev, feel free to fix it. (function () { var i, elements = document.querySelectorA
by sean2 9y ago
Does this little update to the bookmarklet solve the issue? I'm not a webdev, feel free to fix it.
(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]);
}
// 2017 update:
if (getComputedStyle(elements[i]).position === 'sticky') {
elements[i].parentNode.removeChild(elements[i]);
}
}
})();
- jrapdx3 9y agoAlmost. 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.