Skip to content

Instantly share code, notes, and snippets.

@seaque
Last active April 28, 2024 19:49
Show Gist options
  • Save seaque/7dab0628ebaa861e7278246858fdfae3 to your computer and use it in GitHub Desktop.
Save seaque/7dab0628ebaa861e7278246858fdfae3 to your computer and use it in GitHub Desktop.
Firefox user.js and userChrome.css
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/round_ui_items.css made available under Mozilla Public License v. 2.0
See the above repository for updates as well as full license text. */
/* Make bunch of things in the main UI round */
:root{ --toolbarbutton-border-radius: 24px !important }
#urlbar-input-container > box:hover,
#urlbar-input-container > box[open],
#main-menubar > menu,
#scrollbutton-up,
#scrollbutton-down,
.close-icon > image,
#page-action-buttons > :hover,
.panel-arrowcontent,
.urlbarView-row-inner,
.search-one-offs button,
.subviewbutton-back,
.toolbaritem-combined-buttons > toolbarbutton,
#PopupSearchAutoComplete,
menupopup{ border-radius: 18px }
button,
.tab-background{ border-radius: 12px !important; }
.panel-arrowcontent{ margin-inline-end: 0 !important; }
.panel-arrow{ margin-inline: 17px !important; }
menupopup{ -moz-appearance: none !important; overflow: -moz-hidden-unscrollable !important; }
.tabbrowser-tab[selected]::after,
.tabbrowser-tab[beforeselected-visible]::after{ border-color: transparent !important; }
.urlbar-icon,
toolbar toolbarbutton:not(#back-button):not(.bookmark-item):not(.titlebar-button) > .toolbarbutton-icon{ border-radius: 0px !important; clip-path: circle() }
.tab-close-button,
menugroup:hover > menuitem{ clip-path: circle() }
// PREF: Don't use OS values to determine locale, force using Firefox locale setting
// http://kb.mozillazine.org/Intl.locale.matchOS
user_pref("intl.locale.matchOS", false);
// PREF: Don't use Mozilla-provided location-specific search engines
user_pref("browser.search.geoSpecificDefaults", false);
// PREF: Don't trim HTTP off of URLs in the address bar.
// https://bugzilla.mozilla.org/show_bug.cgi?id=665580
user_pref("browser.urlbar.trimURLs", false);
// PREF: Don't monitor OS online/offline connection state
// https://trac.torproject.org/projects/tor/ticket/18945
user_pref("network.manage-offline-status", false);
// PREF: Disable Mozilla telemetry/experiments
// https://wiki.mozilla.org/Platform/Features/Telemetry
// https://wiki.mozilla.org/Privacy/Reviews/Telemetry
// https://wiki.mozilla.org/Telemetry
// https://www.mozilla.org/en-US/legal/privacy/firefox.html#telemetry
// https://support.mozilla.org/t5/Firefox-crashes/Mozilla-Crash-Reporter/ta-p/1715
// https://wiki.mozilla.org/Security/Reviews/Firefox6/ReviewNotes/telemetry
// https://gecko.readthedocs.io/en/latest/browser/experiments/experiments/manifest.html
// https://wiki.mozilla.org/Telemetry/Experiments
// https://support.mozilla.org/en-US/questions/1197144
// https://firefox-source-docs.mozilla.org/toolkit/components/telemetry/telemetry/internals/preferences.html#id1
user_pref("toolkit.telemetry.enabled", false);
user_pref("toolkit.telemetry.unified", false);
user_pref("toolkit.telemetry.archive.enabled", false);
user_pref("experiments.supported", false);
user_pref("experiments.enabled", false);
user_pref("experiments.manifest.uri", "");
// PREF: Disable sending Firefox crash reports to Mozilla servers
// https://wiki.mozilla.org/Breakpad
// http://kb.mozillazine.org/Breakpad
// https://dxr.mozilla.org/mozilla-central/source/toolkit/crashreporter
// https://bugzilla.mozilla.org/show_bug.cgi?id=411490
// A list of submitted crash reports can be found at about:crashes
user_pref("breakpad.reportURL", "");
// PREF: Disable Pocket
// https://support.mozilla.org/en-US/kb/save-web-pages-later-pocket-firefox
// https://github.com/pyllyukko/user.js/issues/143
user_pref("browser.pocket.enabled", false);
user_pref("extensions.pocket.enabled", false);
// PREF: Do not check if Firefox is the default browser
user_pref("browser.shell.checkDefaultBrowser", false);
// PREF: Scroll through tabs with mouse wheel
user_pref("toolkit.tabbox.switchByScrolling", true);
// PREF: Enable css stylesheets
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);
// PREF: macOS Scrollbar
/*
0: Default Platform scrollbar style
1: macOs scrollbars
2: GTK Scrollbars
3: Android Scrollbars
4: Windows 10 scrollbars
5: Windows 11 scrollbars
*/
user_pref("widget.non-native-theme.scrollbar.style", 5);
user_pref("devtools.accessibility.enabled", false);
user_pref("full-screen-api.transition-duration.enter", '100 100');
user_pref("full-screen-api.transition-duration.leave", '100 100');
user_pref("full-screen-api.transition.timeout", -1);
user_pref("full-screen-api.warning.timeout", -1);
@import url(css/rounded_menupopups.css);
@import url(css/round_ui_items.css);
menupopup:not(.in-menulist) > menuitem,
menupopup:not(.in-menulist) > menu {
padding-block: 2px !important;
}
:root {
--arrowpanel-menuitem-padding: 4px 8px !important;
}
#context-setDesktopBackground, #context-sep-setbackground {
display:none !important;
}
#context-viewsource, #context-sep-viewsource {
display:none !important;
}
#context-bookmarklink {
display:none !important;
}
#context-sendimage, #context-sendvideo, #context-sendaudio {
display:none !important;
}
#context_sendTabToDevice, #context_sendTabToDevice_separator {
display: none !important;
}
#context-sendpagetodevice, #context-sep-sendpagetodevice {
display: none !important;
}
#contentAreaContextMenu
#context-sendlinktodevice
#contentAreaContextMenu
#context-sep-sendlinktodevice
#context-sep-selectall
#context-media-eme-separator {
display: none !important;
}
#context-sep-screenshots {display: none !important;}
#context-openlinkinusercontext-menu {display: none !important;}
#context-savelink {display: none !important;}
#context-navigation,
#context-sep-navigation {
display: none !important;
}
#context-sep-pdfjs-selectall {display: none !important;}
#context-sep-ctp {display: none !important;}
[id*='context-sep'] {display: none !important;}
/* TABS: height */
:root {
--tab-toolbar-navbar-overlap: 0px !important;
--tab-min-height: 30px !important;
}
:root #tabbrowser-tabs {
--tab-min-height: 30px !important;
margin-left: 4px;
}
#TabsToolbar {height: var(--tab-min-height) !important;}
/* Show active colors on main menu bar */
/* #TabsToolbar,
#navigator-toolbox,
#tabs-newtab-button,
#titlebar toolbarbutton:not(:hover):not(:active),
#scrollbutton-up:not(:hover):not(:active),
#scrollbutton-down:not(:hover):not(:active),
.titlebar-color {
background: color-mix(in lab, AccentColor 90%, #e9e) !important;
color: AccentColorText;
fill: AccentColorText !important;
}
#TabsToolbar:-moz-window-inactive,
#navigator-toolbox:-moz-window-inactive,
#tabs-newtab-button:-moz-window-inactive,
#titlebar toolbarbutton:not(:hover):not(:active):-moz-window-inactive,
#scrollbutton-up:not(:hover):not(:active):-moz-window-inactive,
#scrollbutton-down:not(:hover):not(:active):-moz-window-inactive,
.titlebar-color {
background: color-mix(in srgb, 75% grey, AccentColor) !important;
color: unset;
fill: unset !important;
transition: none !important;
} */
vbox.tab-background {
}
hbox[class='titlebar-spacer'] {
width: 1em !important;
}
tab[class="tabbrowser-tab"] {
}
/* UNIFIED EXTENSIONS */
/* https://gist.github.com/qaz69wsx/1739d185cff0a15929ac04c3f277a525 */
#unified-extensions-view {
--uei-icon-size: 16px;
& > .panel-header {
display: none !important;
& + toolbarseparator {
border: none !important;
margin: 0 0 var(--arrowpanel-menuitem-margin-inline) !important;
}
}
& .unified-extensions-item {
margin-block: 0 !important;
}
& .unified-extensions-item-menu-button {
list-style-image: url("chrome://global/skin/icons/more.svg") !important;
padding: 0 0 0 var(--arrowpanel-menuitem-margin-inline) !important;
& > .toolbarbutton-icon {
border: none !important;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment