Skip to content

Instantly share code, notes, and snippets.

@peytondmurray
Last active August 11, 2024 08:55
Show Gist options
  • Save peytondmurray/30805106d898cbba4af2c0a0bc1eafa9 to your computer and use it in GitHub Desktop.
Save peytondmurray/30805106d898cbba4af2c0a0bc1eafa9 to your computer and use it in GitHub Desktop.
Firefox tweaks

Disable microphone and camera mini popup window

Set the following variables in about:config

privacy.webrtc.hideGlobalIndicator = true
privacy.webrtc.legacyGlobalIndicator = false

Remove horizontal tabs at the top of Firefox

Make sure to install a vertical tabs extension before doing this!

  1. Go to about:config and set toolkit.legacyUserProfileCustomizations.stylesheets = true
  2. Navigate to your firefox profile directory, it will look like ~/.mozilla/firefox/<random>.default
  3. mkdir chrome && cd chrome
  4. Copy the following CSS into a file called userChrome.css. This will remove the tabs at the top of Firefox:
.tabbrowser-tab {
  visibility: collapse;
}
.titlebar-button {
  height: 27px !important;
}
#nav-bar {
  margin-top: -42px;
  margin-right: 140px;
  box-shadow: none !important;
}

[uidensity="compact"]:root .titlebar-button {
  height: 32px !important;
}
[uidensity="compact"]:root #nav-bar {
  margin-top: -32px;
}

#titlebar-spacer {
  background-color: var(--chrome-secondary-background-color);
}
#titlebar-buttonbox-container {
  background-color: var(--chrome-secondary-background-color);
}
.titlebar-color {
  background-color: var(--toolbar-bgcolor);
}

#main-window[inFullscreen="true"] #sidebar-box,
#main-window[inFullscreen="true"] #sidebar-box + splitter {
    visibility: collapse;
}

#sidebar-box #sidebar-header {
  display: none !important;
}

Make the blank page which briefly appears before a page is rendered dark

  1. Add this to your userChrome.css:
@-moz-document url(chrome://browser/content/browser.xhtml)
{
  #main-window,
  browser[type="content-primary"],
  browser[type="content"],
  tabbrowser#content,
  #content,
  browser[type="content"] > html
  {
     background: #202020 !important;
  }
}
  1. Make a new file called userContent.css in your chrome directory and put the following in it:
@-moz-document url("about:newtab") {
  body {
    background-color: #202020 !important;
  }
}

@-moz-document url("about:blank") {
  body {
    background-color: #202020 !important;
  }
}

@-moz-document url(chrome://browser/content/browser.xhtml) {
  browser[type="content-primary"] {
    background: #202020 !important
  }
}

Make page flash before content load something other than pure white

Firefox settings -> Colors -> Manage Colors -> Use System Colors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment