Skip to content

Instantly share code, notes, and snippets.

@GoesuZuegs
Created June 11, 2018 14:52
Show Gist options
  • Save GoesuZuegs/8acfdbb79046935ae5e505978737812e to your computer and use it in GitHub Desktop.
Save GoesuZuegs/8acfdbb79046935ae5e505978737812e to your computer and use it in GitHub Desktop.
Hide scrollbars completely in Firefox
(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