mirror of
https://codeberg.org/librewolf/source.git
synced 2024-12-21 21:23:08 -05:00
Fix and re-enable firefox-view.patch
This commit is contained in:
parent
1b9acfd124
commit
fdc178fdeb
3 changed files with 19 additions and 57 deletions
|
@ -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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#
|
||||
# Author: Malte Jürgens <maltejur@dismail.de>
|
||||
# Description: Add custom LibreWolf pref defaults
|
||||
# Last Updated: 2023-01-18
|
||||
# Last Updated: 2023-10-30
|
||||
# License: MPL 2.0
|
||||
#
|
||||
# The purpose of this patch is to show the defaults of our custom prefs
|
||||
|
@ -11,8 +11,6 @@
|
|||
+++ b/browser/app/profile/firefox.js
|
||||
@@ -21,0 +21,5 @@
|
||||
+
|
||||
+pref("librewolf.firefoxView.hideTabPickup", false);
|
||||
+pref("librewolf.firefoxView.hideColorways", true);
|
||||
+pref("librewolf.uBO.assetsBootstrapLocation", "");
|
||||
+pref("librewolf.aboutMenu.checkVersion", false);
|
||||
+pref("librewolf.hidePasswdmgr", false);
|
||||
|
|
|
@ -1,23 +1,17 @@
|
|||
x# LibreWolf firefox-view.patch
|
||||
# LibreWolf firefox-view.patch
|
||||
#
|
||||
# Author: Malte Jürgens <maltejur@dismail.de>
|
||||
# Description: Hide "Firefox View" by default and make it work with LibreWolf
|
||||
# Last Updated: 2023-03-15
|
||||
# Description: Hide "Firefox View" by default
|
||||
# Last Updated: 2023-10-30
|
||||
# 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.
|
||||
#
|
||||
# Colorways are hidden by default and can be enabled again by setting
|
||||
# `librewolf.firefoxView.hideColorways` to `false`.
|
||||
#
|
||||
# The tab pickup feature is hidden if Firefox Sync is disabled. It can also
|
||||
# be forced to always be disabled by setting `librewolf.firefoxView.hideTabPickup`
|
||||
# to `true`.
|
||||
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
|
||||
@@ -41,16 +41,6 @@
|
||||
@@ -35,16 +35,6 @@
|
||||
<hbox flex="1" align="end" class="toolbar-items">
|
||||
<toolbartabstop/>
|
||||
<hbox id="TabsToolbar-customization-target" flex="1">
|
||||
|
@ -33,8 +27,8 @@ x# LibreWolf firefox-view.patch
|
|||
-
|
||||
<tabs id="tabbrowser-tabs"
|
||||
is="tabbrowser-tabs"
|
||||
flex="1"
|
||||
@@ -707,6 +697,16 @@
|
||||
aria-multiselectable="true"
|
||||
@@ -716,5 +706,15 @@
|
||||
closemenu="none"
|
||||
cui-areatype="toolbar"
|
||||
data-l10n-id="navbar-library"/>
|
||||
|
@ -50,10 +44,10 @@ x# LibreWolf firefox-view.patch
|
|||
+ removable="true"/>
|
||||
</html:template>
|
||||
</toolbox>
|
||||
</box>
|
||||
diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs
|
||||
--- a/browser/components/customizableui/CustomizableUI.sys.mjs
|
||||
+++ b/browser/components/customizableui/CustomizableUI.sys.mjs
|
||||
@@ -289,7 +289,6 @@ var CustomizableUIInternal = {
|
||||
@@ -287,7 +287,6 @@ var CustomizableUIInternal = {
|
||||
{
|
||||
type: CustomizableUI.TYPE_TOOLBAR,
|
||||
defaultPlacements: [
|
||||
|
@ -61,7 +55,7 @@ x# LibreWolf firefox-view.patch
|
|||
"tabbrowser-tabs",
|
||||
"new-tab-button",
|
||||
"alltabs-button",
|
||||
@@ -620,18 +619,6 @@ var CustomizableUIInternal = {
|
||||
@@ -616,18 +615,6 @@ var CustomizableUIInternal = {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -80,9 +74,10 @@ x# LibreWolf firefox-view.patch
|
|||
// Unified Extensions addon button migration, which puts any browser action
|
||||
// buttons in the overflow menu into the addons panel instead.
|
||||
if (currentVersion < 19) {
|
||||
diff --git a/browser/components/firefoxview/firefoxview.html b/browser/components/firefoxview/firefoxview.html
|
||||
--- a/browser/components/firefoxview/firefoxview.html
|
||||
+++ b/browser/components/firefoxview/firefoxview.html
|
||||
@@ -62,6 +62,7 @@
|
||||
@@ -61,6 +61,7 @@
|
||||
is="tab-pickup-container"
|
||||
id="tab-pickup-container"
|
||||
open
|
||||
|
@ -90,46 +85,13 @@ x# LibreWolf firefox-view.patch
|
|||
>
|
||||
<summary class="page-section-header">
|
||||
<span
|
||||
diff --git a/browser/components/firefoxview/firefoxview.mjs b/browser/components/firefoxview/firefoxview.mjs
|
||||
index e30e6c4..d3bd77a 100644
|
||||
--- a/browser/components/firefoxview/firefoxview.mjs
|
||||
+++ b/browser/components/firefoxview/firefoxview.mjs
|
||||
@@ -2,7 +2,28 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
+
|
||||
+function onPrefChange() {
|
||||
+ document.getElementById("tab-pickup-container").hidden =
|
||||
+ Services.prefs.getBoolPref("identity.fxaccounts.enabled") &&
|
||||
+ !Services.prefs.getBoolPref("librewolf.firefoxView.hideTabPickup", false)
|
||||
+ ? false
|
||||
+ : true;
|
||||
+ document.getElementById("colorways").hidden =
|
||||
+ !Services.prefs.getBoolPref("librewolf.firefoxView.hideColorways", true)
|
||||
+ ? false
|
||||
+ : true;
|
||||
+}
|
||||
+
|
||||
+[
|
||||
+ "librewolf.firefoxView.hideTabPickup",
|
||||
+ "librewolf.firefoxView.hideColorways",
|
||||
+ "identity.fxaccounts.enabled",
|
||||
+].forEach((pref) => Services.prefs.addObserver(pref, onPrefChange));
|
||||
+
|
||||
+
|
||||
window.addEventListener("DOMContentLoaded", async () => {
|
||||
+ onPrefChange();
|
||||
Services.telemetry.recordEvent("firefoxview", "entered", "firefoxview", null);
|
||||
if (Cu.isInAutomation) {
|
||||
Services.obs.notifyObservers(null, "firefoxview-entered");
|
||||
diff --git a/browser/components/newtab/lib/OnboardingMessageProvider.jsm b/browser/components/newtab/lib/OnboardingMessageProvider.jsm
|
||||
--- a/browser/components/newtab/lib/OnboardingMessageProvider.jsm
|
||||
+++ b/browser/components/newtab/lib/OnboardingMessageProvider.jsm
|
||||
@@ -92,57 +92,6 @@ const BASE_MESSAGES = () => [
|
||||
},
|
||||
@@ -78,57 +78,6 @@ const BASE_MESSAGES = () => [
|
||||
trigger: { id: "protectionsPanelOpen" },
|
||||
},
|
||||
- {
|
||||
{
|
||||
- id: "CFR_FIREFOX_VIEW",
|
||||
- groups: ["cfr"],
|
||||
- template: "cfr_doorhanger",
|
||||
|
@ -180,6 +142,7 @@ index e30e6c4..d3bd77a 100644
|
|||
- // Avoid breaking existing tests that close tabs for now.
|
||||
- targeting: `!inMr2022Holdback && fxViewButtonAreaType != null && (currentDate|date - profileAgeCreated) / 86400000 >= 2 && tabsClosedCount >= 3 && 'browser.firefox-view.view-count'|preferenceValue == 0 && !'browser.newtabpage.activity-stream.asrouter.providers.cfr'|preferenceIsUserSet`,
|
||||
- },
|
||||
{
|
||||
- {
|
||||
id: "FX_MR_106_UPGRADE",
|
||||
template: "spotlight",
|
||||
targeting: "true",
|
||||
|
|
Loading…
Reference in a new issue