![Firefox logo](https://assets-prod.sumo.prod.webservices.mozgcp.net/media/uploads/products/2020-04-14-08-36-13-8dda6f.png)
Hiding the scroll bar?
Im currently reading books (pdfs) in firefox and I would like to hide the scroll bar. Im using full screen mode and especially the bar the the bottom is annoying while reading. I've seen a few topics posted about this issue but they are from a few years back and the solution posted doesn't seem to work anymore. (creating profile/chrome/userChrome.css with some code) But maybe the code is just outdated or I did something wrong. Im not too sure.
The best solution to me would be to just hide the bottom scroll bar. I didnt find any option in about:config except for making them (bottom and right) both thinner.
I would greatly appreciate any help.
選ばれた解決策
Try this Code:
javascript:(function(){let e=document.documentElement.querySelector("#viewerContainer");e.style.scrollbarWidth=e.style.scrollbarWidth==="none"?"":"none";})();この回答をすべて読む 👍 1
すべての返信 (3)
I used ChatGPT and Trial and Error to get this Javascript, which can be used as a bookmark. "javascript:(function(){let e=document.documentElement;e.style.scrollbarWidth=e.style.scrollbarWidth==="none"?"":"none";})();" That does exactly what I want, hiding the scroll bar as a toggle. But this doesnt seem to work in the PDF Viewer.
Then I tried to reduce the size to a minimum with the about:config settings "widget.non-native-theme.scrollbar.size.override 1" and "widget.non-native-theme.win.scrollbar.use-system-size false". That seems like a good workaround. Maybe someone knows if I can toggle that on and off somehow without going into the settings and searching it everytime to change it?
選ばれた解決策
Try this Code:
javascript:(function(){let e=document.documentElement.querySelector("#viewerContainer");e.style.scrollbarWidth=e.style.scrollbarWidth==="none"?"":"none";})();
cor-el said
Try this Code: javascript:(function(){let e=document.documentElement.querySelector("#viewerContainer");e.style.scrollbarWidth=e.style.scrollbarWidth==="none"?"":"none";})();
Works perfectly! Thanks a lot! :)