From dfa773794037550c8c8d0e53fd58b7c808eb2b02 Mon Sep 17 00:00:00 2001 From: fxbrit Date: Mon, 21 Mar 2022 21:38:36 +0100 Subject: [PATCH 1/3] fix session restiore UI, remap many links --- patches/ui-patches/hide-default-browser.patch | 6 +- patches/ui-patches/pref-naming.patch | 13 +- patches/ui-patches/remap_links.patch | 112 ++++++++++++++++++ 3 files changed, 128 insertions(+), 3 deletions(-) create mode 100644 patches/ui-patches/remap_links.patch diff --git a/patches/ui-patches/hide-default-browser.patch b/patches/ui-patches/hide-default-browser.patch index 4923780..76d530a 100644 --- a/patches/ui-patches/hide-default-browser.patch +++ b/patches/ui-patches/hide-default-browser.patch @@ -2,7 +2,11 @@ diff --git a/browser/components/preferences/main.inc.xhtml b/browser/components/ index 855ee64..617911a 100644 --- a/browser/components/preferences/main.inc.xhtml +++ b/browser/components/preferences/main.inc.xhtml -@@ -32,7 +32,7 @@ +@@ -29,6 +29,7 @@ + + ++ #ifdef HAVE_SHELL_SERVICE diff --git a/patches/ui-patches/pref-naming.patch b/patches/ui-patches/pref-naming.patch index fa6eb80..07a08ef 100644 --- a/patches/ui-patches/pref-naming.patch +++ b/patches/ui-patches/pref-naming.patch @@ -1,11 +1,20 @@ --- a/browser/locales/en-US/browser/preferences/preferences.ftl +++ b/browser/locales/en-US/browser/preferences/preferences.ftl +@@ -128,6 +128,8 @@ + + startup-header = Startup + ++session-restore-learn-more = What if it does not work? ++ + always-check-default = + .label = Always check if { -brand-short-name } is your default browser + .accesskey = y @@ -140,7 +140,7 @@ .accesskey = D startup-restore-windows-and-tabs = - .label = Open previous windows and tabs -+ .label = Open previous windows and tabs. (requires enabling browsing history) ++ .label = Open previous windows and tabs. What if it does not work? .accesskey = s startup-restore-warn-on-quit = @@ -20,7 +29,7 @@ update-application-description = Keep { -brand-short-name } up to date for the best performance, stability, and security. --update-application-version = Version { $version } What’s new +-update-application-version = Version { $version } +update-application-version = Version { $version } Visit the repositories update-history = diff --git a/patches/ui-patches/remap_links.patch b/patches/ui-patches/remap_links.patch new file mode 100644 index 0000000..a1c3966 --- /dev/null +++ b/patches/ui-patches/remap_links.patch @@ -0,0 +1,112 @@ +--- a/browser/components/preferences/main.js ++++ b/browser/components/preferences/main.js +@@ -311,6 +311,14 @@ + "performance"; + performanceSettingsLink.setAttribute("href", performanceSettingsUrl); + ++ let sessionRestoreLink = document.getElementById( ++ "sessionRestoreLearnMore" ++ ); ++ let sessionRestoreUrl = ++ Services.urlFormatter.formatURLPref("app.support.baseURL") + ++ "why-is-session-restore-not-working"; ++ sessionRestoreLink.setAttribute("href", sessionRestoreUrl); ++ + this.updateDefaultPerformanceSettingsPref(); + + let defaultPerformancePref = Preferences.get( +@@ -542,7 +550,7 @@ + + let drmInfoURL = + Services.urlFormatter.formatURLPref("app.support.baseURL") + +- "drm-content"; ++ "how-do-i-enable-drm"; + document + .getElementById("playDRMContentLink") + .setAttribute("href", drmInfoURL); +@@ -869,7 +877,8 @@ + + const link = document.getElementById("browserContainersLearnMore"); + link.href = +- Services.urlFormatter.formatURLPref("app.support.baseURL") + "containers"; ++ Services.urlFormatter.formatURLPref("app.support.baseURL") + ++ "why-isnt-first-party-isolate-enabled-by-default"; + + document.getElementById("browserContainersbox").hidden = false; + this.readBrowserContainersCheckbox(); +--- a/browser/components/preferences/privacy.js ++++ b/browser/components/preferences/privacy.js +@@ -282,7 +282,7 @@ + let links = document.querySelectorAll(".contentBlockWarningLink"); + let contentBlockingWarningUrl = + Services.urlFormatter.formatURLPref("app.support.baseURL") + +- "turn-off-etp-desktop"; ++ "what-is-mozilla-tracking-protection"; + for (let link of links) { + link.setAttribute("href", contentBlockingWarningUrl); + } +@@ -477,7 +477,7 @@ + let link = document.getElementById("httpsOnlyLearnMore"); + let httpsOnlyURL = + Services.urlFormatter.formatURLPref("app.support.baseURL") + +- "https-only-prefs"; ++ "does-librewolf-use-https-only-mode"; + link.setAttribute("href", httpsOnlyURL); + + // Set radio-value based on the pref value +@@ -643,7 +643,7 @@ + ); + const breachAlertsLearnMoreUrl = + Services.urlFormatter.formatURLPref("app.support.baseURL") + +- "lockwise-alerts"; ++ "why-is-the-built-in-password-manager-disabled"; + breachAlertsLearnMoreLink.setAttribute("href", breachAlertsLearnMoreUrl); + + this._initSafeBrowsing(); +@@ -750,7 +750,7 @@ + ); + let url = + Services.urlFormatter.formatURLPref("app.support.baseURL") + +- "storage-permissions"; ++ "how-do-i-stay-logged-into-specific-websites"; + document.getElementById("siteDataLearnMoreLink").setAttribute("href", url); + + let notificationInfoURL = +@@ -923,7 +923,7 @@ + let link = document.getElementById("contentBlockingLearnMore"); + let contentBlockingUrl = + Services.urlFormatter.formatURLPref("app.support.baseURL") + +- "enhanced-tracking-protection"; ++ "what-is-mozilla-tracking-protection"; + link.setAttribute("href", contentBlockingUrl); + + // Toggles the text "Cross-site and social media trackers" based on the +@@ -2268,7 +2268,7 @@ + let learnMoreLink = document.getElementById("primaryPasswordLearnMoreLink"); + let learnMoreURL = + Services.urlFormatter.formatURLPref("app.support.baseURL") + +- "primary-password-stored-logins"; ++ "why-is-the-built-in-password-manager-disabled"; + learnMoreLink.setAttribute("href", learnMoreURL); + }, + +@@ -2466,7 +2466,7 @@ + let learnMoreLink = document.getElementById("enableSafeBrowsingLearnMore"); + let phishingUrl = + Services.urlFormatter.formatURLPref("app.support.baseURL") + +- "phishing-malware"; ++ "why-do-you-disable-google-safe-browsing"; + learnMoreLink.setAttribute("href", phishingUrl); + + enableSafeBrowsing.addEventListener("command", function() { +--- a/toolkit/mozapps/extensions/content/aboutaddons.js ++++ b/toolkit/mozapps/extensions/content/aboutaddons.js +@@ -1997,7 +1997,7 @@ + icon: "chrome://global/skin/icons/help.svg", + createLinkElement: () => { + let link = document.createElement("a", { is: "support-link" }); +- link.setAttribute("support-page", "addons-help"); ++ link.setAttribute("support-page", "do-you-recommend-using-any-extensions"); + link.id = "help-button"; + return link; + }, \ No newline at end of file From 215d03069c604643e49bc8becfee985e355c6488 Mon Sep 17 00:00:00 2001 From: fxbrit Date: Mon, 21 Mar 2022 21:45:31 +0100 Subject: [PATCH 2/3] fix typo --- patches/ui-patches/pref-naming.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/ui-patches/pref-naming.patch b/patches/ui-patches/pref-naming.patch index 07a08ef..ba02579 100644 --- a/patches/ui-patches/pref-naming.patch +++ b/patches/ui-patches/pref-naming.patch @@ -29,7 +29,7 @@ update-application-description = Keep { -brand-short-name } up to date for the best performance, stability, and security. --update-application-version = Version { $version } +-update-application-version = Version { $version } What’s new +update-application-version = Version { $version } Visit the repositories update-history = From c0e369633fcc7fd3189d92eb054d94865ebb1812 Mon Sep 17 00:00:00 2001 From: fxbrit Date: Mon, 21 Mar 2022 21:50:09 +0100 Subject: [PATCH 3/3] rename patch and add it to patches.txt --- assets/patches.txt | 1 + patches/ui-patches/{remap_links.patch => remap-links.patch} | 0 2 files changed, 1 insertion(+) rename patches/ui-patches/{remap_links.patch => remap-links.patch} (100%) diff --git a/assets/patches.txt b/assets/patches.txt index 3eb6c18..8e4ea13 100644 --- a/assets/patches.txt +++ b/assets/patches.txt @@ -14,6 +14,7 @@ patches/sed-patches/stop-undesired-requests.patch patches/ui-patches/hide-default-browser.patch patches/ui-patches/pref-naming.patch patches/ui-patches/privacy-preferences.patch +patches/ui-patches/remap-links.patch patches/ui-patches/remove-branding-urlbar.patch patches/ui-patches/remove-cfrprefs.patch patches/ui-patches/remove-organization-policy-banner.patch diff --git a/patches/ui-patches/remap_links.patch b/patches/ui-patches/remap-links.patch similarity index 100% rename from patches/ui-patches/remap_links.patch rename to patches/ui-patches/remap-links.patch