by RandomBacon · 6y ago · 0 comments
javascript:(function(){(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]);}}})();document.querySelector('body').style.setProperty('overflow','auto','important'); document.querySelector('html').style.setProperty('overflow','auto','important');})()It's likely that simply setting a particular cookie with a dummy value would bypass this.
The server doesn't serve you the content until you accept... so it does matter what the server does.
It might be that I'm dumb and can't figure out how to add a ublock/umatrix rule to block it, but I'd love a single purpose addon that just deletes "overflow:hidden" in all cases.
https://chrome.google.com/webstore/detail/behindtheoverlay/l...
https://addons.mozilla.org/en-US/firefox/addon/behind_the_ov...
And while it's rarer than those, I've definitely also seen page components which show a preview of the content until you click on them, then expand to show everything else. Those would break as well.
So while you'd certainly block modal popups that prevent scrolling, you'd also break a bunch of things on other sites that use the overflow property for more legitimate reasons.
The slide out menus would be a shame, but I'd give that up to prevent it's rampant abuse everywhere else.
Alternatively, you can put user options there too, like a sort of floating toolbar. Sites like Medium do this in their WYSIWYG editor, and some of my own sites do this to display such options to logged in users.
Oh, and media players you might want to keep open as you scroll down the page/through the site. YouTube has a miniplayer option for just this, and a site with a music jukebox might want to use the same thing there too.
And yes, those mini carts you see on ecommerce websites when you add a product to your basket.
> webmail client
> WYSIWYG editor
> media players
So did GP edit their comment, or did you ignore half of it?
It's also possible that the creator of the site did some weird stuff and the entire body has fixed positioning for some weird reason. You can't predict how people will use innocuous CSS rules, and randomly deleting elements just because they have a certain style is easy but wildly imprecise. Seems better to just set everything with position: fixed to be position: static and unset any overflow rules.
I don't know which this is (or where the line is), but here's my latest project at my day job, where we used `position: sticky` for a sort of control bar, that I think worked out fairly well. (There are still some UI issues, but I think fewer than most of our peers trying to implement similar functionality).
https://digital.sciencehistory.org/works/4j03d097t
Switch to "transcript" tag, scroll around, click on timecodes to listen to that part of recording, etc.