Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • tpo/applications/mullvad-browser
  • pierov/mullvad-browser
  • ma1/privacy-browser
  • morgan/mullvad-browser
  • boklm/privacy-browser
  • henry/mullvad-browser
  • NoisyCoil/mullvad-browser
  • jwilde/mullvad-browser
  • dan/mullvad-browser
  • brizental/mullvad-browser
  • securitybrahh/mullvad-browser
  • clairehurst/mullvad-browser
12 results
Show changes
Commits on Source (4)
......@@ -123,6 +123,7 @@
Services.scriptloader.loadSubScript("chrome://browser/content/search/autocomplete-popup.js", this);
Services.scriptloader.loadSubScript("chrome://browser/content/search/searchbar.js", this);
Services.scriptloader.loadSubScript("chrome://browser/content/languageNotification.js", this);
Services.scriptloader.loadSubScript("chrome://browser/content/droppedSupportNotification.js", this);
window.onload = gBrowserInit.onLoad.bind(gBrowserInit);
window.onunload = gBrowserInit.onUnload.bind(gBrowserInit);
......
"use strict";
// Show a prompt that a user's system will no longer be supported.
window.addEventListener("load", () => {
let labelId;
// Expire date is 2024-10-01 (1st October 2024).
const isExpired = Date.now() > Date.UTC(2024, 9, 1);
if (
AppConstants.platform === "macosx" &&
Services.vc.compare(
Services.sysinfo.getProperty("version"),
"19.0" // MacOS 10.15 begins with Darwin 19.0
) < 0
) {
labelId = isExpired
? "dropped-support-notification-macos-version-less-than-10-15-expired"
: "dropped-support-notification-macos-version-less-than-10-15";
} else if (
AppConstants.platform === "win" &&
Services.vc.compare(Services.sysinfo.getProperty("version"), "10.0") < 0
) {
labelId = isExpired
? "dropped-support-notification-win-os-version-less-than-10-expired"
: "dropped-support-notification-win-os-version-less-than-10";
}
const dismissedPref =
"browser.dropped_support_notification_v14.dismiss_version";
if (!labelId) {
// Avoid setting any preferences for supported versions, and clean up any
// old values if the user ported their profile.
Services.prefs.clearUserPref(dismissedPref);
return;
}
if (
!isExpired &&
Services.prefs.getStringPref(dismissedPref, "") ===
AppConstants.BASE_BROWSER_VERSION
) {
// Already dismissed since the last update.
return;
}
const buttons = isExpired
? undefined
: [
{
"l10n-id": "dropped-support-notification-dismiss-button",
callback: () => {
Services.prefs.setStringPref(
dismissedPref,
AppConstants.BASE_BROWSER_VERSION
);
},
},
];
gNotificationBox.appendNotification(
"dropped-support-notification",
{
label: { "l10n-id": labelId },
priority: gNotificationBox.PRIORITY_WARNING_HIGH,
},
buttons
);
});
......@@ -2,7 +2,7 @@
// Show a prompt to suggest to the user that they can change the UI language.
// Show it only the first time, and then do not show it anymore
window.addEventListener("load", async () => {
window.addEventListener("load", () => {
const PREF_NAME = "intl.language_notification.shown";
if (Services.prefs.getBoolPref(PREF_NAME, false)) {
......@@ -35,12 +35,12 @@ window.addEventListener("load", async () => {
Services.locale.requestedLocales,
Services.locale.availableLocales
).length;
const label = await document.l10n.formatValue(
matchingSystem
const label = {
"l10n-id": matchingSystem
? "language-notification-label-system"
: "language-notification-label",
{ language }
);
"l10n-args": { language },
};
const buttons = [
{
......
......@@ -105,4 +105,5 @@ browser.jar:
content/browser/spotlight.js (content/spotlight.js)
* content/browser/default-bookmarks.html (content/default-bookmarks.html)
content/browser/droppedSupportNotification.js (content/droppedSupportNotification.js)
content/browser/languageNotification.js (content/languageNotification.js)
......@@ -843,7 +843,7 @@ public final class GeckoRuntimeSettings extends RuntimeSettings {
}
}
}
String acceptLanguages = locale != null ? locale.toString().replace('_', '-') : "en-US";
String acceptLanguages = locale != null ? locale.toLanguageTag().replace('_', '-') : "en-US";
if (acceptLanguages.equals("en-US")) {
// For consistency with spoof English.
acceptLanguages += ", en";
......
......@@ -166,3 +166,21 @@ security-level-summary-custom = Your custom browser preferences have resulted in
# Button to undo custom changes to the security level and place the user in one of the standard security levels.
# Shown in the security level panel and settings.
security-level-restore-defaults-button = Restore defaults
## Notification for dropped operating system support.
# "{ -brand-short-name }" will be replaced with the localized name of the browser, e.g. "Tor Browser".
# "14.0" refers to the browser versions number: Tor Browser 14.0.
# "macOS" is a brand name, and 10.15 is the macOS version number.
dropped-support-notification-macos-version-less-than-10-15 = The next major version of { -brand-short-name } (14.0) will no longer support this version of macOS. Please upgrade to macOS 10.15 or later by October 1st 2024 to continue receiving important security updates.
# "{ -brand-short-name }" will be replaced with the localized name of the browser, e.g. "Tor Browser".
# "macOS" is a brand name, and 10.15 is the macOS version number.
dropped-support-notification-macos-version-less-than-10-15-expired = { -brand-short-name } no longer supports this version of macOS. Please upgrade to macOS 10.15 or later to continue receiving important security updates.
# "{ -brand-short-name }" will be replaced with the localized name of the browser, e.g. "Tor Browser".
# "14.0" refers to the browser versions number: Tor Browser 14.0.
# "Windows" is a brand name, and "Windows 10" is the version.
dropped-support-notification-win-os-version-less-than-10 = The next major version of { -brand-short-name } (14.0) will no longer support this version of Windows. Please upgrade to Windows 10 or later by October 1st 2024 to continue receiving important security updates.
# "{ -brand-short-name }" will be replaced with the localized name of the browser, e.g. "Tor Browser".
# "Windows" is a brand name, and "Windows 10" is the version.
dropped-support-notification-win-os-version-less-than-10-expired = { -brand-short-name } no longer supports this version of Windows. Please upgrade to Windows 10 or later to continue receiving important security updates.
dropped-support-notification-dismiss-button = Got it