5 ms·
I have this handy bookmark that will remove all top-level unmovable HTML on a page. One click will generally remove all popups and banners that obstruct viewing
by joosters 9y ago
I have this handy bookmark that will remove all top-level unmovable HTML on a page. One click will generally remove all popups and banners that obstruct viewing:
javascript:(function()%7B(function%20()%20%7Bvar%20i%2C%20elements%20%3D%20document.querySelectorAll('body%20*')%3Bfor%20(i%20%3D%200%3B%20i%20%3C%20elements.length%3B%20i%2B%2B)%20%7Bif%20(getComputedStyle(elements%5Bi%5D).position%20%3D%3D%3D%20'fixed')%20%7Belements%5Bi%5D.parentNode.removeChild(elements%5Bi%5D)%3B%7D%7D%7D)()%7D)()
(I hope that doesn't get mangled by HN formatting)
For a tiny piece of javascript, it works amazingly well on so many websites. Give it a try!
- sillysaurus3 9y agoHere's my modified version of Kill Sticky: javascript:(function()%7B(function()%7Bdocument.body.style.overflow%20%3D%20'auto'%3B(function%20()%20%7Bvar%20i%2C%20elements%20%3D%20document.querySelectorAll('body%20*')%3Bfor%20(i%20%3D%200%3B%20i%20%3C%20elements.length%3B%20i%2B%2B)%20%7Bif%20(getComputedStyle(elements%5Bi%5D).position%20%3D%3D%3D%20'fixed')%20%7Belements%5Bi%5D.parentNode.removeChild(elements%5Bi%5D)%3B%7D%7D%7D)()%7D)()%7D)() The nice part is that some websites do the stupid scroll block thing, where you can't scroll even after removing the elements. This script undoes that. I'll give yours a try too.
- ce4 9y agoYou'll love Firefox' reader button right next to the URL bar. Try it! No more "click to continue reading", no pop-ups, no scroll locks, and nice formatting.
- deleted 9y ago[deleted]