4 ms·
I’ve tried a lot of ad blockers over the years. Browsing mainstream news on the internet, in particular, highlights the absolute cesspool of pop ups and auto-pl
by lysozyme 4y ago
I’ve tried a lot of ad blockers over the years. Browsing mainstream news on the internet, in particular, highlights the absolute cesspool of pop ups and auto-playing videos that characterize the contemporary web.
None, least of all Stop the Madness, have worked as well and on as many devices as this simple bookmarklet, whose author I don’t know but who has saved me countless aggravations
javascript:(function%20()%20%7B%20var%20i,%20elements%20=%20document.querySelectorAll('body%20*');%20%20for%20(i%20=%200;%20i%20%3C%20elements.length;%20i++)%20%7B%20if%20(%5B%22sticky%22,%20%22fixed%22%5D.includes(getComputedStyle(elements%5Bi%5D).position))%20%7B%20elements%5Bi%5D.parentNode.removeChild(elements%5Bi%5D);%20%7D%20%7D%20%7D)();
Edit: credit to the original author [1] and thank you!
1. https://alisdair.mcdiarmid.org/kill-sticky-headers/ https://alisdair.mcdiarmid.org/kill-sticky-headers/
- weaksauce 4y agojavascript:( function(){ let i, elements = document.querySelectorAll('body *'); for (i = 0; i < elements.length; i++) { if(getComputedStyle(elements[i]).position === 'fixed' || getComputedStyle(elements[i]).position === 'sticky') { elements[i].parentNode.removeChild(elements[i]); } } document.body.style.overflow = "auto"; document.body.style.position = "static"; })() here's the script for people that want to see the stuff without all the url encodings. oh and I added a thing that stops them from stopping your scrolling(think the kind that pop up an ad or something and stop you from scrolling) one of the most useful bookmarklettes that I use many times a day. I got it from the original author too I think
- noodles_nomore 4y agoThis is great. I just discovered that in firefox you can have bookmarks without a title. So if you put this as the only item and without a title into the "Bookmarks Toolbar" folder, you have a simple button that you can add to your toolbar. This is hacky, but good enough for me.
- shreyshnaccount 4y agoLove it!
- nathanasmith 4y agoI’ve had the Kill Sticky bookmarklet handy as the first item in the bookmarks bar of every browser I’ve used for years and it is phenomenal in how simple and useful it is. Works everywhere from my iPad to my desktop and everywhere in between. Really a sanity saver and I can’t recommend it highly enough.
- rd 4y agoFor the uneducated, what does this actually do?
- johnthedebs 4y agoIt searches the page for and removes all elements that have a "sticky" or "fixed" position. Elements positioned in those ways stay in the frame all the time, and are usually used for things like: videos that follow you, persistent chat buttons/windows, headers that stay in view even as you scroll, and page overlays.
- lapcat 4y agoStopTheMadness is not an ad blocker. It can run user scripts though.
- freediver 4y agoCan you give an example of sites encountered in regular browsing this helps with?
- leavjenn 4y agoFor example, the top bar on New Yorker: https://www.newyorker.com/news/letter-from-the-uk/riding-londons-unexpectedly-fantastic-elizabeth-line https://www.newyorker.com/news/letter-from-the-uk/riding-lon... . Or a more obviously one, the HUGE top bar on Material Design site: https://material.io https://material.io .