Re:A Guide to Color from 1692
by alanbernstein on Saturday April 10, 2021 @01:15AM
(#26759110)
I only tested that on this site, but I've been looking for something like this for a while. I thought there would be plenty of extensions to do this automatically, but I've never found one. "Popups", "overlays", now "floaters" is a new term to me, is there a more conventional name for the whole class of "junk that pops up when you try to read a website"?
Re:A Guide to Color from 1692
by CamperBob2 on Saturday April 10, 2021 @05:35PM
(#26765362)
Google the phrase kill sticky for various snippets of code that can be placed on your bookmark toolbar.
In practice, you end up needing at least two or three different buttons to handle different sites. The one I usually use is
javascript:(function(){(function()
{var%20i,elements=document.querySelectorAll('body%20*');
for(i=0;i<elements.length;
i++){var%20p=getComputedStyle(elements[i]).position;
if(p==='fixed'||p==='sticky'||p==='-webkit-sticky')
{elements[i].parentNode.removeChild(elements[i]);}}})
()})()I picked "floaters" because that is one of many en_GB slang terms for a piece of excrement floating in a toilet bowl. cf turd etc.
I will now rename my shortcut to "dump floaters". Dump is en_GB for the act of delivering floaters and also a slang term for "get rid of". So I unleash a bit of JS with a name that simultaneously means to create or remove a lump of shit, depending on how you decipher it.
That seems quite appropriate.
Re:A Guide to Color from 1692
by alanbernstein on Wednesday April 14, 2021 @01:38PM
(#26810403)
Ha! I appreciate the update. I'll rename mine accordingly.
javascript: (function () {var 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]);}}})();
Some sites get upset but most don't. I'm very grateful to the original programmer who came up with this code.