From 5d4ef3adcce0217696314daf177c1ecb946e4584 Mon Sep 17 00:00:00 2001 From: HJ <11689349+yokoffing@users.noreply.github.com> Date: Sat, 19 Aug 2023 15:39:06 -0400 Subject: [PATCH] Pesky 116 (#192) * add browser.urlbar.weather.ignoreVPN * move prefs * add about page for Translations * restore reader mode * enable Firefox Translations * wording * Update Peskyfox.js * translations * browser.privateWindowSeparation.enabled * add link * Update Peskyfox.js * WFX changes * WFX changes * WFX changes * comment out middlemouse * add accessibility.typeaheadfind --- Peskyfox.js | 249 +++++++++++++++++++++++++--------------------------- 1 file changed, 120 insertions(+), 129 deletions(-) diff --git a/Peskyfox.js b/Peskyfox.js index 4dca74a..2c872d2 100644 --- a/Peskyfox.js +++ b/Peskyfox.js @@ -3,7 +3,7 @@ * Peskyfox * * "Aquila non capit muscas" * * priority: remove annoyances * - * version: 115a * + * version: 116 * * url: https://github.com/yokoffing/Betterfox * ***************************************************************************/ @@ -16,12 +16,15 @@ // [1] https://www.reddit.com/r/firefox/comments/rfj6yc/how_to_stop_firefoxs_dark_theme_from_overriding/hoe82i5/?context=3 user_pref("layout.css.prefers-color-scheme.content-override", 2); +// PREF: disable always using dark theme for private browsing windows [FF106+] +//user_pref("browser.theme.dark-private-windows", false); + // PREF: enable Firefox to use userChome, userContent, etc. user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true); // PREF: disable annoying update restart prompts -// Delay update available prompts for ~1 week -// Will still show green arrow in menu bar +// Delay update available prompts for ~1 week. +// Will still show green arrow in menu bar. user_pref("app.update.suppressPrompts", true); // PREF: add compact mode back to options @@ -54,17 +57,11 @@ user_pref("browser.preferences.moreFromMozilla", false); // [1] https://www.ghacks.net/2022/10/19/how-to-hide-firefoxs-list-all-tabs-icon/ user_pref("browser.tabs.tabmanager.enabled", false); -// PREF: disable Warnings +// PREF: Warnings //user_pref("browser.tabs.warnOnClose", false); // DEFAULT [FF94+] -//user_pref("browser.tabs.warnOnCloseOtherTabs", false); -//user_pref("browser.tabs.warnOnOpen", false); -//user_pref("browser.aboutConfig.showWarning", false); - -// PREF: disable fullscreen delay and notice -user_pref("full-screen-api.transition-duration.enter", "0 0"); -user_pref("full-screen-api.transition-duration.leave", "0 0"); -user_pref("full-screen-api.warning.delay", -1); -user_pref("full-screen-api.warning.timeout", 0); +//user_pref("browser.tabs.warnOnCloseOtherTabs", true); // DEFAULT +//user_pref("browser.tabs.warnOnOpen", true); // DEFAULT +user_pref("browser.aboutConfig.showWarning", false); // PREF: disable welcome notices //user_pref("browser.startup.homepage_override.mstone", "ignore"); // What's New page after updates; master switch @@ -76,47 +73,70 @@ user_pref("browser.aboutwelcome.enabled", false); // disable Intro screens // PREF: disable "What's New" toolbar icon [FF69+] //user_pref("browser.messaging-system.whatsNewPanel.enabled", false); -// PREF: show all matches in Findbar -user_pref("findbar.highlightAll", true); - -// PREF: disable middle mouse click opening links from clipboard -// [1] https://gitlab.torproject.org/tpo/applications/tor-browser/-/issues/10089 -user_pref("middlemouse.contentLoadURL", false); - -// PREF: attempt to remove ugly border drawn around links when clicked +// PREF: attempt to remove ugly border drawn around links when clicked [macOS] //user_pref("accessibility.mouse_focuses_formcontrol", 0); -// The above should work, but you may need to add: //user_pref("browser.display.focus_ring_style", 0); //user_pref("browser.display.focus_ring_width", 0); -// Private Browsing changes [FF106+] -// PREF: disable private windows being separate from normal windows in taskbar [WINDOWS] -//user_pref("browser.privateWindowSeparation.enabled", false); +// PREF: prevent private windows being separate from normal windows in taskbar [WINDOWS] [FF106+] +user_pref("browser.privateWindowSeparation.enabled", false); -// PREF: disable "private window" indicator in tab bar [FF106+] +// PREF: reduce the size of the "private window" indicator in tab bar [FF106+] user_pref("browser.privatebrowsing.enable-new-indicator", false); -// PREF: disable always using dark theme for private browsing windows [FF106+] -//user_pref("browser.theme.dark-private-windows", false); +// PREF: Cookie Banner handling [NIGHTLY] +// [NOTE] Feature still enforces Total Cookie Protection to limit 3rd-party cookie tracking [1] +// [1] https://github.com/mozilla/cookie-banner-rules-list/issues/33#issuecomment-1318460084 +// [2] https://phabricator.services.mozilla.com/D153642 +// [3] https://winaero.com/make-firefox-automatically-click-on-reject-all-in-cookie-banner-consent/ +// [4] https://docs.google.com/spreadsheets/d/1Nb4gVlGadyxix4i4FBDnOeT_eJp2Zcv69o-KfHtK-aA/edit#gid=0 +// 2: reject banners if it is a one-click option; otherwise, fall back to the accept button to remove banner +// 1: reject banners if it is a one-click option; otherwise, keep banners on screen +// 0: disable all cookie banner handling +user_pref("cookiebanners.service.mode", 2); +user_pref("cookiebanners.service.mode.privateBrowsing", 2); + //user_pref("cookiebanners.bannerClicking.enabled", true); // DEFAULT [FF108] + //user_pref("cookiebanners.cookieInjector.enabled", true); // DEFAULT -// PREF: Firefox Translations [NIGHTLY ONLY] -// Visit about:translations to translate your own text as well -// [1] https://blog.nightly.mozilla.org/2023/06/01/firefox-translations-and-other-innovations-these-weeks-in-firefox-issue-139/ -//user_pref("browser.translations.enable", true); // DEFAULT +// PREF: global CookieBannerRules [WiP] +// Global rules that can handle a list of cookie banner libraries / providers on any site. +// This is used for click rules that can handle common Consent Management Providers (CMP) +// [WARNING] Beware of potential bugs and performance issues. Enabling this may negatively +// impact site performance. It requires Firefox to run rule-defined query selectors for +// every page. +//user_pref("cookiebanners.service.enableGlobalRules", true); + +// PREF: Firefox Translations [NIGHTLY] +// Automated translation of web content is done locally in Firefox, so that +// the text being translated does not leave your machine. +// [ABOUT] Visit about:translations to translate your own text as well. +// [1] https://blog.mozilla.org/en/mozilla/local-translation-add-on-project-bergamot/ +// [2] https://blog.nightly.mozilla.org/2023/06/01/firefox-translations-and-other-innovations-these-weeks-in-firefox-issue-139/ +// [3] https://www.ghacks.net/2023/08/02/mozilla-firefox-117-beta-brings-an-automatic-language-translator-for-websites-and-it-works-offline/ +user_pref("browser.translations.enable", true); //user_pref("browser.translations.autoTranslate", true); - //user_pref("browser.translations.alwaysTranslateLanguages", ""); + +/**************************************************************************** + * SECTION: FULLSCREEN NOTICE * +****************************************************************************/ + +// PREF: disable fullscreen delay and notice +user_pref("full-screen-api.transition-duration.enter", "0 0"); +user_pref("full-screen-api.transition-duration.leave", "0 0"); +user_pref("full-screen-api.warning.delay", -1); +user_pref("full-screen-api.warning.timeout", 0); /**************************************************************************** * SECTION: FONT APPEARANCE * ****************************************************************************/ // PREF: smoother font -// [1] https://old.reddit.com/r/firefox/comments/wvs04y/windows_11_firefox_v104_font_rendering_different/?context=3 +// [1] https://reddit.com/r/firefox/comments/wvs04y/windows_11_firefox_v104_font_rendering_different/?context=3 //user_pref("gfx.webrender.quality.force-subpixel-aa-where-possible", true); // PREF: use DirectWrite everywhere like Chrome [WINDOWS] // [1] https://kb.mozillazine.org/Thunderbird_6.0,_etc.#Font_rendering_and_performance_issues -// [2] https://old.reddit.com/r/firefox/comments/wvs04y/comment/ilklzy1/?context=3 +// [2] https://reddit.com/r/firefox/comments/wvs04y/comment/ilklzy1/?context=3 //user_pref("gfx.font_rendering.cleartype_params.rendering_mode", 5); //user_pref("gfx.font_rendering.cleartype_params.cleartype_level", 100); //user_pref("gfx.font_rendering.cleartype_params.force_gdi_classic_for_families", ""); @@ -134,17 +154,21 @@ user_pref("browser.privatebrowsing.enable-new-indicator", false); * SECTION: URL BAR * ****************************************************************************/ -// PREF: URL bar suggestions (bookmarks, history, open tabs) / dropdown options in the URL bar -// user_pref("browser.urlbar.suggest.bookmarks", true); +// PREF: minimize URL bar suggestions (bookmarks, history, open tabs) +// Dropdown options in the URL bar: +//user_pref("browser.urlbar.suggest.bookmark", true); user_pref("browser.urlbar.suggest.engines", false); //user_pref("browser.urlbar.suggest.history", false); -//user_pref("browser.urlbar.suggest.openpage", true); -//user_pref("browser.urlbar.suggest.quickactions", false); // [NIGHTLY] +//user_pref("browser.urlbar.suggest.openpage", false); +//user_pref("browser.urlbar.suggest.quickactions", false); // [NIGHTLY-only] //user_pref("browser.urlbar.suggest.searches", false); //user_pref("browser.urlbar.suggest.weather", true); // DEFAULT [FF108] -// Disable dropdown suggestions with empty query: + //user_pref("browser.urlbar.weather.ignoreVPN", false); // DEFAULT + +// PREF: disable dropdown suggestions with empty query: user_pref("browser.urlbar.suggest.topsites", false); -// enable helpful features: + +// PREF: enable helpful features: user_pref("browser.urlbar.suggest.calculator", true); user_pref("browser.urlbar.unitConversion.enabled", true); @@ -153,21 +177,18 @@ user_pref("browser.urlbar.unitConversion.enabled", true); //user_pref("browser.urlbar.autoFill", true); // [DEFAULT] //user_pref("browser.urlbar.autoFill.adaptiveHistory.enabled", false); -// PREF: Quick Actions in the URL Bar +// PREF: Quick Actions in the URL Bar [NIGHTLY-only] // [1] https://www.ghacks.net/2022/07/19/mozilla-is-testing-quick-actions-in-firefoxs-address-bar/ //user_pref("browser.urlbar.quickactions.enabled", false); //user_pref("browser.urlbar.shortcuts.quickactions", false); -// PREF: Address bar / URL bar dropdown results +// PREF: adjust the amount of Address bar / URL bar dropdown results // This value controls the total number of entries to appear in the location bar dropdown. // [NOTE] Items (bookmarks/history/openpages) with a high "frequency"/"bonus" will always // be displayed (no we do not know how these are calculated or what the threshold is), // and this does not affect the search by search engine suggestion. -// default=10, disable=0 -//user_pref("browser.urlbar.maxRichResults", 1); - -// PREF: do not show search terms in address bar instead of the URL [FF113+] -//user_pref("browser.urlbar.showSearchTerms.enabled", false); +// disable=0 +//user_pref("browser.urlbar.maxRichResults", 5); // default=10 /**************************************************************************** * SECTION: AUTOPLAY * @@ -209,10 +230,10 @@ user_pref("browser.urlbar.unitConversion.enabled", true); // [SETTING] Home>New Windows and Tabs>New tabs //user_pref("browser.newtabpage.enabled", false); -// PREF: Home / New Tab page items +// PREF: Pinned Shortcuts on New Tab // [SETTINGS] Home>Firefox Home Content // [1] https://github.com/arkenfox/user.js/issues/1556 -//user_pref("browser.newtabpage.activity-stream.discoverystream.enabled", false); // unnecessary? +//user_pref("browser.newtabpage.activity-stream.discoverystream.enabled", false); //user_pref("browser.newtabpage.activity-stream.showSearch", true); // NTP Web Search [DEFAULT] user_pref("browser.newtabpage.activity-stream.feeds.topsites", false); // Shortcuts //user_pref("browser.newtabpage.activity-stream.showSponsoredTopSites", false); // Sponsored shortcuts [FF83+] @@ -245,6 +266,7 @@ user_pref("extensions.pocket.enabled", false); //user_pref("extensions.pocket.api"," "); //user_pref("extensions.pocket.oAuthConsumerKey", " "); //user_pref("extensions.pocket.site", " "); + //user_pref("extensions.pocket.showHome", false); /****************************************************************************** * SECTION: DOWNLOADS * @@ -264,7 +286,7 @@ user_pref("browser.download.useDownloadDir", false); // PREF: disable downloads panel opening on every download user_pref("browser.download.alwaysOpenPanel", false); -// PREF: Disable adding downloads to the system's "recent documents" list +// PREF: disable adding downloads to the system's "recent documents" list user_pref("browser.download.manager.addToRecentDocs", false); // PREF: enable user interaction for security by always asking how to handle new mimetypes @@ -294,7 +316,7 @@ user_pref("browser.download.open_pdf_attachments_inline", true); // 2=table of contents (if not available, will default to 1) // 1=view pages // -1=disabled (default) -//user_pref("pdfjs.sidebarViewOnLoad", 2); +user_pref("pdfjs.sidebarViewOnLoad", 2); // PREF: default zoom for PDFs [HIDDEN] // [NOTE] "page-width" not needed if using sidebar on load @@ -304,13 +326,6 @@ user_pref("browser.download.open_pdf_attachments_inline", true); * SECTION: TAB BEHAVIOR * ****************************************************************************/ -// PREF: unload tabs on low memory -// Firefox will detect if your computer’s memory is running low (less than 400MB) -// and suspend tabs that you have not used in awhile -// [1] https://support.mozilla.org/en-US/questions/1262073 -// [2] https://blog.nightly.mozilla.org/2021/05/14/these-weeks-in-firefox-issue-93/ -//user_pref("browser.tabs.unloadOnLowMemory", true); // DEFAULT - // PREF: search query opens in a new tab (instead of the current tab) //user_pref("browser.search.openintab", true); // SEARCH BOX //user_pref("browser.urlbar.openintab", true); // URL BAR @@ -367,6 +382,23 @@ user_pref("browser.tabs.loadBookmarksInTabs", true); // PREF: leave Bookmarks Menu open when selecting a site user_pref("browser.bookmarks.openInTabClosesMenu", false); +// PREF: restore "View image info" on right-click +user_pref("browser.menu.showViewImageInfo", true); + +// PREF: show all matches in Findbar +user_pref("findbar.highlightAll", true); + +// PREF: force disable finding text on page without prompting +// [NOTE] Not as powerful as using Ctrl+F. +// [SETTINGS] General>Browsing>"Search for text when you start typing" +// [1] https://github.com/yokoffing/Betterfox/issues/212 +//user_pref("accessibility.typeaheadfind", false); // enforce DEFAULT + +// PREF: disable middle mouse click opening links from clipboard +// It's been default in Linux since at least FF102. +// [1] https://gitlab.torproject.org/tpo/applications/tor-browser/-/issues/10089 +//user_pref("middlemouse.contentLoadURL", false); + // PREF: Prevent scripts from moving and resizing open windows //user_pref("dom.disable_window_move_resize", true); @@ -399,49 +431,25 @@ user_pref("browser.bookmarks.openInTabClosesMenu", false); //user_pref("dom.disable_open_during_load", true); // DEFAULT //user_pref("privacy.popups.showBrowserMessage", true); // DEFAULT -// PREF: Cookie Banner handling [NIGHTLY] -// [NOTE] Feature still enforces Total Cookie Protection to limit 3rd-party cookie tracking [1] -// [1] https://github.com/mozilla/cookie-banner-rules-list/issues/33#issuecomment-1318460084 -// [2] https://phabricator.services.mozilla.com/D153642 -// [3] https://winaero.com/make-firefox-automatically-click-on-reject-all-in-cookie-banner-consent/ -// [4] https://docs.google.com/spreadsheets/d/1Nb4gVlGadyxix4i4FBDnOeT_eJp2Zcv69o-KfHtK-aA/edit#gid=0 -// 2: reject banners if it is a one-click option; otherwise, fall back to the accept button to remove banner -// 1: reject banners if it is a one-click option; otherwise, keep banners on screen -// 0: disable all cookie banner handling -user_pref("cookiebanners.service.mode", 2); -user_pref("cookiebanners.service.mode.privateBrowsing", 2); - //user_pref("cookiebanners.bannerClicking.enabled", true); // DEFAULT [FF108] - //user_pref("cookiebanners.cookieInjector.enabled", true); // DEFAULT - -// PREF: enable global CookieBannerRules -// This is used for click rules that can handle common Consent Management Providers (CMP) -// [WARNING] Enabling this (when the cookie handling feature is enabled) may -// negatively impact site performance since it requires us to run rule-defined -// query selectors for every page -//user_pref("cookiebanners.service.enableGlobalRules", enable); - /**************************************************************************** * SECTION: UNCATEGORIZED * ****************************************************************************/ -// PREF: restore "View image info" -//user_pref("browser.menu.showViewImageInfo", true); - -// PREF: Disable Reader mode -// Firefox will not have to parse webpage for Reader when navigating. -// Minimal performance impact. -//user_pref("reader.parse-on-load.enabled", false); - -// PREF: Disable backspace action +// PREF: disable backspace action // 0=previous page, 1=scroll up, 2=do nothing //user_pref("browser.backspace_action", 2); // DEFAULT -// PREF: Disable ALT key toggling the menu bar +// PREF: disable Reader mode +// Firefox will not have to parse webpage for Reader when navigating. +// Extremely minimal performance impact, if you enable. +//user_pref("reader.parse-on-load.enabled", false); + +// PREF: disable ALT key toggling the menu bar //user_pref("ui.key.menuAccessKeyFocuses", false); //user_pref("ui.key.menuAccessKey", 18); // DEFAULT -// PREF: CTRL+TAB cycles tabs in chronological order instead of recently- -// used order +// PREF: CTRL+TAB cycles tabs in chronological order instead of +// recently-used order //user_pref("browser.ctrlTab.recentlyUsedOrder", false); // PREF: Spell-check @@ -452,17 +460,27 @@ user_pref("cookiebanners.service.mode.privateBrowsing", 2); // [1] https://kb.mozillazine.org/Ui.SpellCheckerUnderlineStyle#Possible_values_and_their_effects //user_pref("ui.SpellCheckerUnderlineStyle", 1); -// PREF: Limit the number of bookmark backups Firefox keeps -//user_pref("browser.bookmarks.max_backups", 1); +// PREF: limit the number of bookmark backups Firefox keeps +//user_pref("browser.bookmarks.max_backups", 1); // default=15 -// PREF: Allow for more granular control of zoom levels -// Especially useful if you want to set your default zoom to a custom level +// PREF: zoom only text on webpage, not other elements +//user_pref("browser.zoom.full", false); + +// PREF: allow for more granular control of zoom levels +// Especially useful if you want to set your default zoom to a custom level. //user_pref("toolkit.zoomManager.zoomValues", ".3,.5,.67,.8,.9,.95,1,1.1,1.2,1.3,1.4,1.5,1.6,1.7,2,2.4,3"); -// PREF: Hide image placeholders +// PREF: restore zooming behavior [macOS] [FF109+] +// On macOS, Ctrl or Cmd + trackpad or mouse wheel now scrolls the page instead of zooming. +// This avoids accidental zooming and matches Safari's and Chrome's behavior. +// The prefs below restores the previous zooming behavior +//user_pref("mousewheel.with_control.action", 3); +//user_pref("mousewheel.with_meta.action", 3); + +// PREF: hide image placeholders //user_pref("browser.display.show_image_placeholders", false); -// PREF: Wrap long lines of text when using source / debugger +// PREF: wrap long lines of text when using source / debugger //user_pref("view_source.wrap_long_lines", true); //user_pref("devtools.debugger.ui.editor-wrapping", true); @@ -484,45 +502,18 @@ user_pref("cookiebanners.service.mode.privateBrowsing", 2); // PREF: remove underlined characters from various settings //user_pref("ui.key.menuAccessKey", 0); -// PREF: zoom only text on webpage, not other elements -//user_pref("browser.zoom.full", false); - -// PREF: enable :has() CSS relational pseudo-class -// Needed for some extensions, filters, and customizations -// [1] https://developer.mozilla.org/en-US/docs/Web/CSS/:has -// [2] https://caniuse.com/css-has -user_pref("layout.css.has-selector.enabled", true); - -// PREF: disable when dragging a scrollbar, if the mouse moves -// too far from the scrollbar, the scrollbar will snap back to the top [LINUX?] -// default=6 -//user_pref("slider.snapMultiplier", 0); - // PREF: disable websites overriding Firefox's keyboard shortcuts [FF58+] -// 0 (default) or 1=allow, 2=block +// 0=ask (default), 1=allow, 2=block // [SETTING] to add site exceptions: Ctrl+I>Permissions>Override Keyboard Shortcuts ***/ //user_pref("permissions.default.shortcuts", 2); // PREF: JPEG XL image format [NIGHTLY] +// May not affect anything on ESR/Stable channel [2]. // [1] https://cloudinary.com/blog/the-case-for-jpeg-xl +// [2] https://bugzilla.mozilla.org/show_bug.cgi?id=1539075 //user_pref("image.jxl.enabled", true); // PREF: enable CSS moz document rules // Still needed for Stylus? -// [1] https://old.reddit.com/r/FirefoxCSS/comments/8x2q97/reenabling_mozdocument_rules_in_firefox_61/ +// [1] https://reddit.com/r/FirefoxCSS/comments/8x2q97/reenabling_mozdocument_rules_in_firefox_61/ //user_pref("layout.css.moz-document.content.enabled", true); - -// PREF: restore zooming behavior [macOS] [FF109+] -// On macOS, Ctrl or Cmd + trackpad or mouse wheel now scrolls the page instead of zooming. -// This avoids accidental zooming and matches Safari's and Chrome's behavior. -// The prefs below restores the previous zooming behavior -//user_pref("mousewheel.with_control.action", 3); -//user_pref("mousewheel.with_meta.action", 3); - -// PREF: disable efficiency mode [WINDOWS] -// [1] https://bugzilla.mozilla.org/show_bug.cgi?id=1796525 -// [2] https://bugzilla.mozilla.org/show_bug.cgi?id=1800412 -// [3] https://old.reddit.com/r/firefox/comments/107fj69/how_can_i_disable_the_efficiency_mode_on_firefox/ -//user_pref("dom.ipc.processPriorityManager.backgroundUsesEcoQoS", false); - -