# LibreWolf firefox-view.patch # # Author: Malte Jürgens # Description: Hide "Firefox View" by default # Last Updated: 2023-11-04 # License: MPL 2.0 # # This patch removes the Firefox View from the toolbar by default. Users can # enable it again by using the "Customize Toolbar" mode and dragging it back to # the titlebar. --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -9940,10 +9940,11 @@ var FirefoxViewHandler = { !this._enabled ); document.getElementById("menu_openFirefoxView").hidden = !this._enabled; - document.getElementById("firefox-view-button").style.listStyleImage = - NimbusFeatures.firefoxViewNext.getVariable("newIcon") - ? "" - : 'url("chrome://branding/content/about-logo.png")'; + if (this.button) + this.button.style.listStyleImage = + NimbusFeatures.firefoxViewNext.getVariable("newIcon") + ? "" + : 'url("chrome://branding/content/about-logo.png")'; }, onWidgetRemoved(aWidgetId) { if (aWidgetId == this.BUTTON_ID && this.tab) { --- a/browser/base/content/navigator-toolbox.inc.xhtml +++ b/browser/base/content/navigator-toolbox.inc.xhtml @@ -35,16 +35,6 @@ - - + + --- a/browser/components/customizableui/CustomizableUI.sys.mjs +++ b/browser/components/customizableui/CustomizableUI.sys.mjs @@ -287,7 +287,6 @@ var CustomizableUIInternal = { { type: CustomizableUI.TYPE_TOOLBAR, defaultPlacements: [ - "firefox-view-button", "tabbrowser-tabs", "new-tab-button", "alltabs-button", @@ -616,18 +615,6 @@ var CustomizableUIInternal = { } } - // Add firefox-view if not present - if (currentVersion < 18) { - let tabstripPlacements = - gSavedState.placements[CustomizableUI.AREA_TABSTRIP]; - if ( - tabstripPlacements && - !tabstripPlacements.includes("firefox-view-button") - ) { - tabstripPlacements.unshift("firefox-view-button"); - } - } - // Unified Extensions addon button migration, which puts any browser action // buttons in the overflow menu into the addons panel instead. if (currentVersion < 19) { --- a/browser/components/firefoxview/firefoxview.html +++ b/browser/components/firefoxview/firefoxview.html @@ -61,6 +61,7 @@ is="tab-pickup-container" id="tab-pickup-container" open + hidden >