Created
June 11, 2018 14:52
-
-
Save GoesuZuegs/8acfdbb79046935ae5e505978737812e to your computer and use it in GitHub Desktop.
Hide scrollbars completely in Firefox
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
const css = ` | |
scrollbar, scrollcorner, scrollbar thumb, scrollbar scrollbarbutton { | |
pointer-events: none !important; | |
-moz-appearance: none !important; | |
visibility: hidden !important; | |
} | |
`; | |
Components.utils.import("resource://gre/modules/Services.jsm"); | |
const sss = Components.classes["@mozilla.org/content/style-sheet-service;1"].getService(Components.interfaces.nsIStyleSheetService); | |
const sheet = Services.io.newURI("data:text/css;charset=utf-8," + encodeURIComponent(css), null, null); | |
sss.loadAndRegisterSheet(sheet, sss.AGENT_SHEET); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment