... |
... |
@@ -3,8 +3,8 @@ |
3
|
3
|
// Show a prompt that a user's system will no longer be supported.
|
4
|
4
|
window.addEventListener("load", () => {
|
5
|
5
|
let labelId;
|
6
|
|
- // Expire date is 2024-10-01 (1st October 2024).
|
7
|
|
- const isExpired = Date.now() > Date.UTC(2024, 9, 1);
|
|
6
|
+ // Firefox moved ESR 115 EOL to 1st April 2025.
|
|
7
|
+ const isExpired = Date.now() > Date.UTC(2025, 3, 1);
|
8
|
8
|
|
9
|
9
|
if (
|
10
|
10
|
AppConstants.platform === "macosx" &&
|
... |
... |
@@ -15,14 +15,14 @@ window.addEventListener("load", () => { |
15
|
15
|
) {
|
16
|
16
|
labelId = isExpired
|
17
|
17
|
? "dropped-support-notification-macos-version-less-than-10-15-expired"
|
18
|
|
- : "dropped-support-notification-macos-version-less-than-10-15";
|
|
18
|
+ : "dropped-support-notification-macos-version-less-than-10-15-extended-13-5";
|
19
|
19
|
} else if (
|
20
|
20
|
AppConstants.platform === "win" &&
|
21
|
21
|
Services.vc.compare(Services.sysinfo.getProperty("version"), "10.0") < 0
|
22
|
22
|
) {
|
23
|
23
|
labelId = isExpired
|
24
|
24
|
? "dropped-support-notification-win-os-version-less-than-10-expired"
|
25
|
|
- : "dropped-support-notification-win-os-version-less-than-10";
|
|
25
|
+ : "dropped-support-notification-win-os-version-less-than-10-extended-13-5";
|
26
|
26
|
}
|
27
|
27
|
|
28
|
28
|
const dismissedPref =
|
... |
... |
@@ -44,19 +44,63 @@ window.addEventListener("load", () => { |
44
|
44
|
return;
|
45
|
45
|
}
|
46
|
46
|
|
47
|
|
- const buttons = isExpired
|
48
|
|
- ? undefined
|
49
|
|
- : [
|
50
|
|
- {
|
51
|
|
- "l10n-id": "dropped-support-notification-dismiss-button",
|
52
|
|
- callback: () => {
|
53
|
|
- Services.prefs.setStringPref(
|
54
|
|
- dismissedPref,
|
55
|
|
- AppConstants.BASE_BROWSER_VERSION
|
56
|
|
- );
|
57
|
|
- },
|
58
|
|
- },
|
59
|
|
- ];
|
|
47
|
+ // Locales that have support pages.
|
|
48
|
+ // Note, these correspond to their app locale names.
|
|
49
|
+ const supportLocales = [
|
|
50
|
+ "en-US",
|
|
51
|
+ "ar",
|
|
52
|
+ "de",
|
|
53
|
+ "es-ES",
|
|
54
|
+ "fa",
|
|
55
|
+ "fr",
|
|
56
|
+ "id",
|
|
57
|
+ "it",
|
|
58
|
+ "ko",
|
|
59
|
+ "pt-BR",
|
|
60
|
+ "ro",
|
|
61
|
+ "ru",
|
|
62
|
+ "sw",
|
|
63
|
+ "tr",
|
|
64
|
+ "uk",
|
|
65
|
+ "vi",
|
|
66
|
+ "zh-CN",
|
|
67
|
+ "zh-TW",
|
|
68
|
+ ];
|
|
69
|
+ // Find the first locale that matches.
|
|
70
|
+ let locale = Services.locale.appLocalesAsBCP47.find(l => {
|
|
71
|
+ return supportLocales.includes(l);
|
|
72
|
+ });
|
|
73
|
+ if (locale === "es-ES") {
|
|
74
|
+ // Support page uses "es". All other locales use the same code in Tor
|
|
75
|
+ // Browser as the support page.
|
|
76
|
+ locale = "es";
|
|
77
|
+ } else if (locale === "en-US") {
|
|
78
|
+ // This is the default.
|
|
79
|
+ locale = undefined;
|
|
80
|
+ }
|
|
81
|
+
|
|
82
|
+ const link = `https://support.torproject.org/${
|
|
83
|
+ locale ? `${locale}/` : ""
|
|
84
|
+ }tbb/tor-browser-and-legacy-os/`;
|
|
85
|
+
|
|
86
|
+ const buttons = [
|
|
87
|
+ {
|
|
88
|
+ "l10n-id": "notification-learnmore-default-label",
|
|
89
|
+ link,
|
|
90
|
+ },
|
|
91
|
+ ];
|
|
92
|
+
|
|
93
|
+ if (!isExpired) {
|
|
94
|
+ buttons.push({
|
|
95
|
+ "l10n-id": "dropped-support-notification-dismiss-button",
|
|
96
|
+ callback: () => {
|
|
97
|
+ Services.prefs.setStringPref(
|
|
98
|
+ dismissedPref,
|
|
99
|
+ AppConstants.BASE_BROWSER_VERSION
|
|
100
|
+ );
|
|
101
|
+ },
|
|
102
|
+ });
|
|
103
|
+ }
|
60
|
104
|
|
61
|
105
|
gNotificationBox.appendNotification(
|
62
|
106
|
"dropped-support-notification",
|