From 629a9d1796995bcdf637e04557c5d97009861af7 Mon Sep 17 00:00:00 2001 From: tengel Date: Wed, 20 Mar 2024 11:25:14 -0500 Subject: [PATCH] migrate FF tweaks from wiki --- firefox/user.js | 129 ++++++++++++++++++++++++++++++ firefox/userChrome.css | 175 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 304 insertions(+) create mode 100644 firefox/user.js create mode 100644 firefox/userChrome.css diff --git a/firefox/user.js b/firefox/user.js new file mode 100644 index 0000000..8b2a995 --- /dev/null +++ b/firefox/user.js @@ -0,0 +1,129 @@ +// user.js +// ref: https://github.com/pyllyukko/user.js/blob/master/user.js +// updated for v99 + +user_pref("accessibility.typeaheadfind.autostart", false); +user_pref("accessibility.typeaheadfind.flashBar", 0); +user_pref("app.normandy.enabled", false); +user_pref("app.shield.optoutstudies.enabled", false); +user_pref("beacon.enabled", false); +user_pref("camera.control.face_detection.enabled", false); +user_pref("config.trim_on_minimize", true); +user_pref("datareporting.healthreport.service.enabled", false); +user_pref("datareporting.healthreport.service.firstRun", true); +user_pref("datareporting.healthreport.uploadEnabled", false); +user_pref("datareporting.policy.dataSubmissionEnabled", false); +user_pref("device.sensors.enabled", false); +user_pref("dom.push.connection.enabled", false); +user_pref("dom.push.enabled", false); +user_pref("dom.webnotifications.enabled", false); +user_pref("experiments.enabled", false); +user_pref("experiments.manifest.uri", ""); +user_pref("experiments.supported", false); +user_pref("font.minimum-size.x-western", 14); +user_pref("general.smoothScroll", false); +user_pref("geo.enabled", false); +user_pref("geo.wifi.uri", ""); +user_pref("media.autoplay.default", 5); +user_pref("network.allow-experiments", false); +user_pref("network.dns.disablePrefetch", true); +user_pref("network.protocol-handler.external.mailto", false); +user_pref("pdfjs.disabled", true); +user_pref("permissions.default.camera", 2); +user_pref("permissions.default.desktop-notification", 2); +user_pref("permissions.default.geo", 2); +user_pref("permissions.default.microphone", 2); +user_pref("permissions.default.xr", 2); +user_pref("signon.rememberSignons", false); +user_pref("toolkit.telemetry.bhrPing.enabled", false); +user_pref("toolkit.telemetry.firstShutdownPing.enabled", false); +user_pref("toolkit.telemetry.newProfilePing.enabled", false); +user_pref("toolkit.telemetry.reportingpolicy.firstRun", false); +user_pref("toolkit.telemetry.server", ""); +user_pref("toolkit.telemetry.shutdownPingSender.enabled", false); +user_pref("toolkit.telemetry.updatePing.enabled", false); + +user_pref("doh-rollout.balrog-migration-done", true); +user_pref("doh-rollout.disable-heuristics", true); +user_pref("doh-rollout.doneFirstRun", true); +user_pref("doh-rollout.doorhanger-decision", "UIDisabled"); +user_pref("doh-rollout.home-region", "US"); +user_pref("doh-rollout.uri", ""); + +user_pref("browser.proton.enabled", false); +user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true); +user_pref("widget.content.gtk-theme-override", "TOK"); +user_pref("widget.non-native-theme.enabled", false); +user_pref("widget.non-native-theme.gtk.scrollbar.allow-buttons", true); +user_pref("widget.non-native-theme.gtk.scrollbar.round-thumb", false); +user_pref("widget.non-native-theme.scrollbar.active-always-themed", false); +user_pref("widget.non-native-theme.scrollbar.size", 16); +user_pref("widget.non-native-theme.scrollbar.size.override", 16); +user_pref("widget.non-native-theme.scrollbar.style", 2); + +user_pref("browser. safebrowsing. enabled", false); +user_pref("browser.safebrowsing.appRepURL", ""); +user_pref("browser.safebrowsing.malware.enabled", false); +user_pref("browser.safebrowsing.phishing.enabled", false); + +user_pref("browser.aboutConfig.showWarning", false); +user_pref("browser.aboutHomeSnippets.updateUrl", ""); +user_pref("browser.bookmarks.showMobileBookmarks", true); +user_pref("browser.bookmarks.showRecentlyBookmarked", false); +user_pref("browser.download.autohideButton", false); +user_pref("browser.download.useDownloadDir", false); +user_pref("browser.formfill.enable", false); +user_pref("browser.messaging-system.whatsNewPanel.enabled", false); +user_pref("browser.selfsupport.enabled", false); +user_pref("browser.selfsupport.url", ""); +user_pref("browser.startup.page", 0); +user_pref("browser.xul.error_pages.expert_bad_cert", true); +user_pref("browser.zoom.full", false); + +user_pref("extensions.pocket.api", ""); +user_pref("extensions.pocket.enabled", false); +user_pref("extensions.pocket.oAuthConsumerKey", ""); +user_pref("extensions.pocket.site", ""); +user_pref("browser.toolbarbuttons.introduced.pocket-button", true); + +user_pref("browser.search.suggest.enabled", false); +user_pref("browser.search.widget.inNavBar", true); +user_pref("browser.urlbar.formatting.enabled", false); +user_pref("browser.urlbar.matchOnlyTyped", true); +user_pref("browser.urlbar.searchSuggestionsChoice", false); +user_pref("browser.urlbar.showSearchSuggestionsFirst", false); +user_pref("browser.urlbar.suggest.engines", false); +user_pref("browser.urlbar.suggest.quicksuggest", false); +user_pref("browser.urlbar.suggest.quicksuggest.sponsored", false); +user_pref("browser.urlbar.suggest.searches", false); +user_pref("browser.urlbar.suggest.topsites", false); +user_pref("browser.urlbar.trimURLs", false); +user_pref("browser.urlbar.update1", false); +user_pref("browser.urlbar.update1.interventions", false); +user_pref("browser.urlbar.update1.searchTips", false); +user_pref("browser.urlbar.update1.view.stripHttps", false); + +user_pref("browser.newtab.preload", false); +user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons", false); +user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features", false); +user_pref("browser.newtabpage.activity-stream.default.sites", ""); +user_pref("browser.newtabpage.activity-stream.disableSnippets", true); +user_pref("browser.newtabpage.activity-stream.enabled", false); +user_pref("browser.newtabpage.activity-stream.feeds.section.topstories", false); +user_pref("browser.newtabpage.activity-stream.feeds.telemetry", false); +user_pref("browser.newtabpage.activity-stream.feeds.topsites", false); +user_pref("browser.newtabpage.activity-stream.filterAdult", false); +user_pref("browser.newtabpage.activity-stream.prerender", false); +user_pref("browser.newtabpage.activity-stream.section.highlights.includeBookmarks", false); +user_pref("browser.newtabpage.activity-stream.section.highlights.includeDownloads", false); +user_pref("browser.newtabpage.activity-stream.section.highlights.includePocket", false); +user_pref("browser.newtabpage.activity-stream.section.highlights.includeVisited", false); +user_pref("browser.newtabpage.activity-stream.showSearch", false); +user_pref("browser.newtabpage.activity-stream.telemetry", false); +user_pref("browser.newtabpage.activity-stream.telemetry.ping.endpoint", ""); +user_pref("browser.newtabpage.activity-stream.topSitesRows", 0); +user_pref("browser.newtabpage.directory.ping", ""); +user_pref("browser.newtabpage.directory.source", "data:text/plain,{}"); +user_pref("browser.newtabpage.enabled", false); +user_pref("browser.newtabpage.enhanced", false); +user_pref("browser.newtabpage.pinned", "[]"); diff --git a/firefox/userChrome.css b/firefox/userChrome.css new file mode 100644 index 0000000..ff09763 --- /dev/null +++ b/firefox/userChrome.css @@ -0,0 +1,175 @@ +/* userChrome.css */ +/* ref: https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/non_floating_sharp_tabs.css */ +/* updated for v99 */ + +/* disable various UI elements */ + +#star-button { display: none !important; } +#feed-button[feeds] { display: none !important; } +#context-sendlink { display:none !important; } +#context-sendlinktodevice { display:none !important; } +#context-sendpage { display:none !important; } +#context-sendpagetodevice { display:none !important; } +#context-searchselect { display: none !important; } + +/* DISABLE URL BORDER FATNESS */ + +#nav-bar{ --toolbar-field-focus-border-color: transparent} + +/* This gets rid of the shadow, prevents the expansion of the URL bar*/ + +#urlbar:focus-within > #urlbar-background { + box-shadow: none !important; + border-color: -moz-accent-color !important; + border-width: 1px !important; +} + +#urlbar[breakout][breakout-extend] { + top: calc((var(--urlbar-toolbar-height) - var(--urlbar-height)) / 2) !important; + left: 0 !important; + width: 100% !important; +} + +#urlbar[breakout][breakout-extend] > #urlbar-input-container { + height: var(--urlbar-height) !important; + padding-block: 0 !important; + padding-inline: 0 !important; +} + +/* This gets rid of the shadow, prevents the expansion of the Search bar*/ + +#searchbar:focus-within { + box-shadow: none !important; + border-color: -moz-accent-color !important; + border-width: 1px !important; +} + +#searchbar[breakout][breakout-extend] { + top: calc((var(--searchbar-toolbar-height) - var(--searchbar-height)) / 2) !important; + left: 0 !important; + width: 100% !important; +} + +#searchbar[breakout][breakout-extend] > #searchbar-textbox { + height: var(--searchbar-height) !important; + padding-block: 0 !important; + padding-inline: 0 !important; +} + +/* Bring back tab separator lines that were removed in Proton */ + +.tabbrowser-tab:not(:hover, [beforehovered], [selected], [last-visible-tab], [beforeselected-visible])::after { + content: ""; + display: block; + border-left: 1px solid currentColor; + margin-block: 1px; + margin-left: -1px; + opacity: 0.3; +} + +/* No round shapes */ + +* { + border-radius: 0 !important; +} + +/* hamburger menu item spacing */ + +:root { + --arrowpanel-menuitem-padding: 4px 8px !important; +} +menupopup > menuitem, +menupopup > menu { + padding-block: 4px !important; +} + +/* It's not strictly a requirement, but this style expects compact_proton.css to be loaded before it. */ + +:root[id]{ + --proton-tab-block-margin: 0px !important; + --tab-block-margin: 0px !important; + --tabs-shadow-size: 1px !important; + + /* Remove next line if you want selected tab to have color other than toolbar background - then it follows your theme color */ + --lwt-selected-tab-background-color: var(--toolbar-bgcolor) !important; +} + +/* removes line under tabs (makes them tabs again) */ + +.tabbrowser-tab[visuallyselected="true"] { + appearance: tab !important; +} + +/* Uncomment next line to force specific color for tab top line */ +/* #tabbrowser-tabs{ --tab-line-color: blue !important; } */ + +/* These next two rules set a color for border around tabs and between tabs & navigation toolbars. Set to transparent to remove the border.*/ +#nav-bar{ + /* This overrides value in compact_proton.css */ + box-shadow: 0 -1px 0 0 color-mix(in srgb, currentcolor 30%, transparent) !important; +} +.tab-background[selected]{ + border-inline: 1px solid color-mix(in srgb, currentcolor 30%, transparent) !important; +} + +#TabsToolbar{ + --toolbarbutton-inner-padding: 7px !important; +} +#navigator-toolbox:not([movingtab]) > #titlebar > #TabsToolbar{ + --toolbar-bgcolor: transparent; +} + +#TabsToolbar .toolbarbutton-1 > .toolbarbutton-badge-stack, +#TabsToolbar .toolbarbutton-1 > .toolbarbutton-icon{ border-radius: 2px !important; } + +/* tabs newtab button needs some special styling... */ +#tabs-newtab-button{ padding-inline: 0 !important; } +#tabbrowser-arrowscrollbox > #tabs-newtab-button > .toolbarbutton-icon{ + border-radius: 0 !important; + width: initial !important; + height: initial !important; + padding: 9px !important; +} +:root[uidensity="compact"] #tabbrowser-arrowscrollbox > #tabs-newtab-button > .toolbarbutton-icon{ + padding: 7px !important; +} + +#scrollbutton-up, +#scrollbutton-down{ border-radius: 0 !important; border-width: 0 !important; padding-inline: 3px !important; } + +/* tab shaping */ +.tabbrowser-tab{ padding-inline: 0 !important; } + +:root[uidensity="compact"] #tabbrowser-tabs[positionpinnedtabs] .tabbrowser-tab[pinned]{ min-height: calc(var(--tab-min-height) + 2px) !important; } + +.tab-content[pinned]{ padding-inline: 11px !important; } + +.tab-background{ + border-radius: 0 !important; + box-shadow: none !important; +} + +/* Line to mark selected tab */ +.tab-background[selected]::before, +.tabbrowser-tab:hover > stack > .tab-background::before{ + display: -moz-box; + height: 2px; + content: ""; +} +.tab-stack:hover > .tab-background::before{ + background-color: inherit; +} +.tab-stack > .tab-background[selected]::before{ + background-color: highlight; + background-image: linear-gradient(var(--tab-line-color),var(--tab-line-color)); +} +/* Photon-like tab on hover animation for the top line */ +@keyframes tab-onhover-line-anim{ from{ margin-inline: 20px } to { margin-inline: 0 } } + +.tab-stack:hover > .tab-background::before{ animation: tab-onhover-line-anim 160ms } + +/* Disable animation for selected and pinned tabs */ +.tabbrowser-tab:is([pinned],[selected]) > .tab-stack > .tab-background::before{ animation: none } + +/* moves context-line to the bottom */ +.tab-context-line{ -moz-box-ordinal-group: 2; margin-inline: 10px !important; }