Skip to content
Snippets Groups Projects
Verified Commit a27693af authored by henry's avatar henry Committed by Pier Angelo Vendrame
Browse files

Bug 43125: Extend the 13.5 EOL expiry date for tor-browser.

parent e3256232
Branches
Tags tor-browser-115.22.0esr-13.5-1-build1
1 merge request!1453TB 43587: Rebased legacy onto 115.22.0esr
......@@ -3,8 +3,8 @@
// 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);
// Firefox moved ESR 115 EOL to 16th September 2025.
const isExpired = Date.now() > Date.UTC(2025, 8, 16);
if (
AppConstants.platform === "macosx" &&
......@@ -15,14 +15,14 @@ window.addEventListener("load", () => {
) {
labelId = isExpired
? "dropped-support-notification-macos-version-less-than-10-15-expired"
: "dropped-support-notification-macos-version-less-than-10-15";
: "dropped-support-notification-macos-version-less-than-10-15-extended-13-5";
} 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";
: "dropped-support-notification-win-os-version-less-than-10-extended-13-5";
}
const dismissedPref =
......@@ -44,10 +44,54 @@ window.addEventListener("load", () => {
return;
}
const buttons = isExpired
? undefined
: [
// Locales that have support pages.
// Note, these correspond to their app locale names.
const supportLocales = [
"en-US",
"ar",
"de",
"es-ES",
"fa",
"fr",
"id",
"it",
"ko",
"pt-BR",
"ro",
"ru",
"sw",
"tr",
"uk",
"vi",
"zh-CN",
"zh-TW",
];
// Find the first locale that matches.
let locale = Services.locale.appLocalesAsBCP47.find(l => {
return supportLocales.includes(l);
});
if (locale === "es-ES") {
// Support page uses "es". All other locales use the same code in Tor
// Browser as the support page.
locale = "es";
} else if (locale === "en-US") {
// This is the default.
locale = undefined;
}
const link = `https://support.torproject.org/${
locale ? `${locale}/` : ""
}tbb/tor-browser-and-legacy-os/`;
const buttons = [
{
"l10n-id": "notification-learnmore-default-label",
link,
},
];
if (!isExpired) {
buttons.push({
"l10n-id": "dropped-support-notification-dismiss-button",
callback: () => {
Services.prefs.setStringPref(
......@@ -55,8 +99,8 @@ window.addEventListener("load", () => {
AppConstants.BASE_BROWSER_VERSION
);
},
},
];
});
}
gNotificationBox.appendNotification(
"dropped-support-notification",
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment