henry pushed to branch tor-browser-150.0a1-16.0-2 at The Tor Project / Applications / Tor Browser
Commits:
-
9862e418
by Henry Wilkes at 2026-04-23T10:12:04+01:00
-
21a8e3a0
by Henry Wilkes at 2026-04-23T10:14:09+01:00
4 changed files:
- browser/base/content/browser-main.js
- + browser/base/content/droppedSupportNotification.js
- browser/base/jar.mn
- toolkit/locales/en-US/toolkit/global/tor-browser.ftl
Changes:
| ... | ... | @@ -31,6 +31,7 @@ |
| 31 | 31 | Services.scriptloader.loadSubScript("chrome://browser/content/places/places-menupopup.js", this);
|
| 32 | 32 | Services.scriptloader.loadSubScript("chrome://browser/content/search/autocomplete-popup.js", this);
|
| 33 | 33 | Services.scriptloader.loadSubScript("chrome://browser/content/search/searchbar.js", this);
|
| 34 | + Services.scriptloader.loadSubScript("chrome://browser/content/droppedSupportNotification.js", this);
|
|
| 34 | 35 | Services.scriptloader.loadSubScript("chrome://browser/content/languageNotification.js", this);
|
| 35 | 36 | if (AIWindow.isOpeningAIWindow(window)) {
|
| 36 | 37 | ChromeUtils.importESModule("chrome://browser/content/urlbar/SmartbarInput.mjs", { global: "current" });
|
| 1 | +"use strict";
|
|
| 2 | + |
|
| 3 | +// Show a prompt that a user's system will no longer be supported.
|
|
| 4 | +window.addEventListener("load", () => {
|
|
| 5 | + let labelId;
|
|
| 6 | + |
|
| 7 | + if (
|
|
| 8 | + AppConstants.platform === "linux" &&
|
|
| 9 | + Services.appinfo.XPCOMABI === "x86-gcc3"
|
|
| 10 | + ) {
|
|
| 11 | + labelId = "dropped-support-notification-linux-32-bit";
|
|
| 12 | + // TODO: switch to the expired label for the final version 15 release.
|
|
| 13 | + // labelId = "dropped-support-notification-linux-32-bit-expired";
|
|
| 14 | + }
|
|
| 15 | + |
|
| 16 | + const dismissedPref =
|
|
| 17 | + "browser.dropped_support_notification_v16.dismiss_version";
|
|
| 18 | + |
|
| 19 | + if (!labelId) {
|
|
| 20 | + // Avoid setting any preferences for supported versions, and clean up any
|
|
| 21 | + // old values if the user ported their profile.
|
|
| 22 | + Services.prefs.clearUserPref(dismissedPref);
|
|
| 23 | + return;
|
|
| 24 | + }
|
|
| 25 | + |
|
| 26 | + if (
|
|
| 27 | + Services.prefs.getStringPref(dismissedPref, "") ===
|
|
| 28 | + AppConstants.BASE_BROWSER_VERSION
|
|
| 29 | + ) {
|
|
| 30 | + // Already dismissed since the last update.
|
|
| 31 | + return;
|
|
| 32 | + }
|
|
| 33 | + |
|
| 34 | + let locale = Services.locale.appLocaleAsBCP47;
|
|
| 35 | + if (locale === "ja-JP-macos") {
|
|
| 36 | + // Convert quirk-locale to the locale used for tor project.
|
|
| 37 | + locale = "ja";
|
|
| 38 | + }
|
|
| 39 | + // NOTE: The support page only covers a subset of locales. But they should
|
|
| 40 | + // redirect to the default en-US page if the locale is not supported.
|
|
| 41 | + // Locales that have support pages.
|
|
| 42 | + // NOTE: /es-ES/ will redirect to /es/.
|
|
| 43 | + const link = `https://support.torproject.org/${locale}/tor-browser/security/legacy-os/`;
|
|
| 44 | + |
|
| 45 | + const buttons = [
|
|
| 46 | + {
|
|
| 47 | + "l10n-id": "notification-learnmore-default-label",
|
|
| 48 | + link,
|
|
| 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 | + ];
|
|
| 60 | + |
|
| 61 | + gNotificationBox.appendNotification(
|
|
| 62 | + "dropped-support-notification",
|
|
| 63 | + {
|
|
| 64 | + label: { "l10n-id": labelId },
|
|
| 65 | + priority: gNotificationBox.PRIORITY_WARNING_HIGH,
|
|
| 66 | + },
|
|
| 67 | + buttons
|
|
| 68 | + );
|
|
| 69 | +}); |
| ... | ... | @@ -106,4 +106,5 @@ browser.jar: |
| 106 | 106 | content/browser/spotlight.js (content/spotlight.js)
|
| 107 | 107 | * content/browser/default-bookmarks.html (content/default-bookmarks.html)
|
| 108 | 108 | |
| 109 | + content/browser/droppedSupportNotification.js (content/droppedSupportNotification.js)
|
|
| 109 | 110 | content/browser/languageNotification.js (content/languageNotification.js) |
| ... | ... | @@ -728,6 +728,19 @@ onion-site-saved-keys-dialog-remove-all-button = Remove all |
| 728 | 728 | onion-site-saved-keys-dialog-fetch-keys-error-message = Unable to retrieve keys from Tor
|
| 729 | 729 | onion-site-saved-keys-dialog-remove-keys-error-message = Unable to remove key
|
| 730 | 730 | |
| 731 | +## Notification for dropped support for 32-bit Linux.
|
|
| 732 | + |
|
| 733 | +# Shown before support has ended.
|
|
| 734 | +# "{ -brand-product-name }" will be replaced with the localized name of the browser, e.g. "Tor Browser".
|
|
| 735 | +# "16.0" refers to the browser versions number: Tor Browser 16.0.
|
|
| 736 | +# "32-bit" and "64-bit" refer to CPU types: en.wikipedia.org/wiki/32-bit_computing .
|
|
| 737 | +dropped-support-notification-linux-32-bit = The next major version of { -brand-product-name } (16.0) will no longer support 32-bit Linux. Please install { -brand-product-name } on a 64-bit Linux operating system to continue receiving important security updates.
|
|
| 738 | +# Shown after support has ended.
|
|
| 739 | +# "{ -brand-product-name }" will be replaced with the localized name of the browser, e.g. "Tor Browser".
|
|
| 740 | +# "32-bit" and "64-bit" refer to CPU types: en.wikipedia.org/wiki/32-bit_computing .
|
|
| 741 | +dropped-support-notification-linux-32-bit-expired = { -brand-product-name } no longer supports 32-bit Linux. Please install { -brand-product-name } on a 64-bit Linux operating system to continue receiving important security updates.
|
|
| 742 | +dropped-support-notification-dismiss-button = Got it
|
|
| 743 | + |
|
| 731 | 744 | ## Year end campaign.
|
| 732 | 745 | |
| 733 | 746 | yec-donate-button = Donate now
|