3 ms·
uBlock already does this, but sometimes this leads to an annoying side effect. Some sites put "overflow=hidden" on the main element to get rid of scroll bars wh
by sorenjan 4y ago
uBlock already does this, but sometimes this leads to an annoying side effect. Some sites put "overflow=hidden" on the main element to get rid of scroll bars while showing a modal cookie consent dialog. If you only block the consent dialog you'll see a normal page but you can't scroll or consent, so you have to open the page inspector and start editing.
- nebalee 4y agoWe recently had a post here on HN about a bookmarklet that deals with this issue: https://news.ycombinator.com/item?id=32998091 https://news.ycombinator.com/item?id=32998091
- bdw5204 4y agoI think scrollbar blocking is another website "feature" that browsers should disable by default. I don't want to have to deal with the page inspector to browse the web and that isn't even an option on a phone browser. I can't think of a single legitimate use case for blocking the scrollbar or right clicking but just in case there is one the browser should still offer a way to enable such JavaScript code on a website by website basis.
- enlyth 4y agoThis is impossible to implement in practice though. Scrollbar "blocking" as you call it, is just an overflow: hidden CSS style, which is perfectly warranted and needed in some cases on some elements. How do you identify which element is the "main" one for the given website? It doesn't have to always be <body>, it could be something which is nested.
- BeefWellington 4y agoYou can do both of those things in Firefox, IIRC. Right-clicking is in about:config as: dom.event.contextmenu.enabled -> False You can also bypass any disabling features by holding shift when right clicking. I think this setting forces scrollbars to be visible on any scrollable content in FF as well (though this one I'm only about 50% on): layout.testing.overlay-scrollbars.always-visible
- gorhill 4y agoEasyList Cookie already contains a section to address this, using uBO syntax.[1] Best is to report such instances to EasyList maintainers so that a fix will benefit everybody using the list. * * * [1] https://github.com/easylist/easylist/blob/master/easylist_cookie/easylist_cookie_specific_uBO.txt https://github.com/easylist/easylist/blob/master/easylist_co...