0
Fork 0
mirror of https://codeberg.org/librewolf/source.git synced 2024-12-22 21:53:31 -05:00
LibreWolf/patches/ui-patches/firefox-view.patch

75 lines
2.9 KiB
Diff
Raw Normal View History

2023-10-30 14:59:31 -05:00
# LibreWolf firefox-view.patch
2023-01-18 18:07:26 -05:00
#
# Author: Malte Jürgens <maltejur@dismail.de>
2023-10-30 14:59:31 -05:00
# Description: Hide "Firefox View" by default
2024-02-23 16:42:15 -05:00
# Last Updated: 2024-02-23
2023-01-18 18:07:26 -05:00
# 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.
2022-12-14 07:33:59 -05:00
--- a/browser/base/content/navigator-toolbox.inc.xhtml
+++ b/browser/base/content/navigator-toolbox.inc.xhtml
2023-10-30 14:59:31 -05:00
@@ -35,16 +35,6 @@
2022-12-14 07:33:59 -05:00
<hbox flex="1" align="end" class="toolbar-items">
<toolbartabstop/>
<hbox id="TabsToolbar-customization-target" flex="1">
- <toolbarbutton id="firefox-view-button"
- class="toolbarbutton-1 chromeclass-toolbar-additional"
2023-10-27 02:45:04 -05:00
- data-l10n-id="toolbar-button-firefox-view-2"
2022-12-14 07:33:59 -05:00
- role="button"
- aria-pressed="false"
2024-02-23 16:42:15 -05:00
- oncommand="FirefoxViewHandler.openTab();"
- onmousedown="FirefoxViewHandler.openToolbarMouseEvent(event);"
2022-12-14 07:33:59 -05:00
- cui-areatype="toolbar"
- removable="true"/>
-
<tabs id="tabbrowser-tabs"
is="tabbrowser-tabs"
2023-10-30 14:59:31 -05:00
aria-multiselectable="true"
2024-02-23 16:42:15 -05:00
@@ -718,5 +708,15 @@
2022-12-14 07:33:59 -05:00
closemenu="none"
cui-areatype="toolbar"
data-l10n-id="navbar-library"/>
+
+ <toolbarbutton id="firefox-view-button"
+ class="toolbarbutton-1 chromeclass-toolbar-additional"
2023-10-27 02:45:04 -05:00
+ data-l10n-id="toolbar-button-firefox-view-2"
2022-12-14 07:33:59 -05:00
+ role="button"
+ aria-pressed="false"
2024-02-23 16:42:15 -05:00
+ oncommand="FirefoxViewHandler.openTab();"
+ onmousedown="FirefoxViewHandler.openToolbarMouseEvent(event);"
2022-12-14 07:33:59 -05:00
+ cui-areatype="toolbar"
+ removable="true"/>
</html:template>
</toolbox>
2023-07-05 09:24:28 -05:00
--- a/browser/components/customizableui/CustomizableUI.sys.mjs
+++ b/browser/components/customizableui/CustomizableUI.sys.mjs
2023-10-30 14:59:31 -05:00
@@ -287,7 +287,6 @@ var CustomizableUIInternal = {
2022-10-20 17:49:50 -05:00
{
type: CustomizableUI.TYPE_TOOLBAR,
defaultPlacements: [
- "firefox-view-button",
"tabbrowser-tabs",
"new-tab-button",
"alltabs-button",
2023-10-30 14:59:31 -05:00
@@ -616,18 +615,6 @@ var CustomizableUIInternal = {
2022-10-20 17:49:50 -05:00
}
}
2023-03-15 06:10:20 -05:00
2022-10-20 17:49:50 -05:00
- // 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");
- }
- }
2023-03-15 06:10:20 -05:00
-
// Unified Extensions addon button migration, which puts any browser action
// buttons in the overflow menu into the addons panel instead.
if (currentVersion < 19) {