From e369c0bf43b302972f6f6b84dea8f7ed7858fa33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Malte=20J=C3=BCrgens?= Date: Sat, 4 Nov 2023 13:52:28 +0100 Subject: [PATCH] Fix and enable `firefox-view.patch` again --- assets/patches.txt | 1 + patches/ui-patches/firefox-view.patch | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/assets/patches.txt b/assets/patches.txt index 0ebadad..8c1c751 100644 --- a/assets/patches.txt +++ b/assets/patches.txt @@ -16,6 +16,7 @@ patches/remove_addons.patch patches/sed-patches/allow-searchengines-non-esr.patch patches/sed-patches/disable-pocket.patch patches/sed-patches/stop-undesired-requests.patch +patches/ui-patches/firefox-view.patch patches/ui-patches/handlers.patch patches/ui-patches/hide-default-browser.patch patches/ui-patches/lw-logo-devtools.patch diff --git a/patches/ui-patches/firefox-view.patch b/patches/ui-patches/firefox-view.patch index 1b68d84..f1871f2 100644 --- a/patches/ui-patches/firefox-view.patch +++ b/patches/ui-patches/firefox-view.patch @@ -2,12 +2,31 @@ # # Author: Malte Jürgens # Description: Hide "Firefox View" by default -# Last Updated: 2023-10-30 +# 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. +diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js +--- a/browser/base/content/browser.js ++++ b/browser/base/content/browser.js +@@ -9929,10 +9929,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) { diff --git a/browser/base/content/navigator-toolbox.inc.xhtml b/browser/base/content/navigator-toolbox.inc.xhtml --- a/browser/base/content/navigator-toolbox.inc.xhtml +++ b/browser/base/content/navigator-toolbox.inc.xhtml