[tbb-commits] [tor-browser/tor-browser-78.11.0esr-10.5-1] fixup! Bug 27476: Implement about:torconnect captive portal within Tor Browser

sysrqb at torproject.org sysrqb at torproject.org
Thu Jun 24 16:44:25 UTC 2021


commit b0faf995b30bbff00da3499b544d5431ff7016a3
Author: Richard Pospesel <richard at torproject.org>
Date:   Thu Jun 24 16:53:00 2021 +0200

    fixup! Bug 27476: Implement about:torconnect captive portal within Tor Browser
---
 .../components/torconnect/content/aboutTorConnect.js |  2 +-
 browser/components/torpreferences/content/torPane.js | 20 ++++++++++++--------
 .../components/torpreferences/content/torPane.xhtml  |  9 ++++++++-
 browser/modules/TorStrings.jsm                       |  2 +-
 4 files changed, 22 insertions(+), 11 deletions(-)

diff --git a/browser/components/torconnect/content/aboutTorConnect.js b/browser/components/torconnect/content/aboutTorConnect.js
index 5fb5b2924b94..657427767629 100644
--- a/browser/components/torconnect/content/aboutTorConnect.js
+++ b/browser/components/torconnect/content/aboutTorConnect.js
@@ -98,7 +98,7 @@ class AboutTorConnect {
   setInitialUI() {
     this.setTitle(this.torStrings.torConnect.torConnect);
     this.elemProgressDesc.textContent =
-      this.torStrings.settings.quickstartDescription;
+      this.torStrings.settings.torPreferencesDescription;
     this.showElem(this.elemConnectButton);
     this.showElem(this.elemAdvancedButton);
     this.hideElem(this.elemCopyLogLink);
diff --git a/browser/components/torpreferences/content/torPane.js b/browser/components/torpreferences/content/torPane.js
index d63b31c4c6f6..01609ddda090 100644
--- a/browser/components/torpreferences/content/torPane.js
+++ b/browser/components/torpreferences/content/torPane.js
@@ -75,11 +75,12 @@ const gTorPane = (function() {
     },
     torPreferences: {
       header: "h1#torPreferences-header",
+      description: "span#torPreferences-description",
+      learnMore: "label#torPreferences-learnMore",
     },
     quickstart: {
       header: "h2#torPreferences-quickstart-header",
       description: "span#torPreferences-quickstart-description",
-      learnMore: "label#torPreferences-quickstart-learnMore",
       enableQuickstartCheckbox: "checkbox#torPreferences-quickstart-toggle",
     },
     bridges: {
@@ -220,15 +221,11 @@ const gTorPane = (function() {
       // Heading
       prefpane.querySelector(selectors.torPreferences.header).innerText =
         TorStrings.settings.torPreferencesHeading;
-
-      // Quickstart
-      prefpane.querySelector(selectors.quickstart.header).innerText =
-        TorStrings.settings.quickstartHeading;
-      prefpane.querySelector(selectors.quickstart.description).textContent =
-        TorStrings.settings.quickstartDescription;
+      prefpane.querySelector(selectors.torPreferences.description).textContent =
+        TorStrings.settings.torPreferencesDescription;
       {
         let learnMore = prefpane.querySelector(
-          selectors.quickstart.learnMore
+          selectors.torPreferences.learnMore
         );
         learnMore.setAttribute("value", TorStrings.settings.learnMore);
         learnMore.setAttribute(
@@ -236,6 +233,13 @@ const gTorPane = (function() {
           TorStrings.settings.learnMoreTorBrowserURL
         );
       }
+
+      // Quickstart
+      prefpane.querySelector(selectors.quickstart.header).innerText =
+        TorStrings.settings.quickstartHeading;
+      prefpane.querySelector(selectors.quickstart.description).textContent =
+        TorStrings.settings.quickstartDescription;
+
       this._enableQuickstartCheckbox = prefpane.querySelector(
         selectors.quickstart.enableQuickstartCheckbox
       );
diff --git a/browser/components/torpreferences/content/torPane.xhtml b/browser/components/torpreferences/content/torPane.xhtml
index 996325e08bf7..7c8071f2cf10 100644
--- a/browser/components/torpreferences/content/torPane.xhtml
+++ b/browser/components/torpreferences/content/torPane.xhtml
@@ -33,6 +33,14 @@
   <html:h1 id="torPreferences-header"/>
 </hbox>
 
+<groupbox data-category="paneTor"
+          hidden="true">
+  <description flex="1">
+    <html:span id="torPreferences-description" class="tail-with-learn-more"/>
+    <label id="torPreferences-learnMore" class="learnMore text-link" is="text-link"/>
+  </description>
+</groupbox>
+
 <!-- Quickstart -->
 <groupbox id="torPreferences-quickstart-group"
           data-category="paneTor"
@@ -40,7 +48,6 @@
   <html:h2 id="torPreferences-quickstart-header"/>
   <description flex="1">
     <html:span id="torPreferences-quickstart-description"/>
-    <label id="torPreferences-quickstart-learnMore" class="learnMore text-link" is="text-link"/>
   </description>
   <checkbox id="torPreferences-quickstart-toggle"/>
 </groupbox>
diff --git a/browser/modules/TorStrings.jsm b/browser/modules/TorStrings.jsm
index e7597bbfa74f..c086d0fe3117 100644
--- a/browser/modules/TorStrings.jsm
+++ b/browser/modules/TorStrings.jsm
@@ -258,7 +258,7 @@ var TorStrings = {
       ),
       learnMore: getString("torPreferences.learnMore", "Learn More"),
       quickstartHeading: getString("torPreferences.quickstart", "Quickstart"),
-      quickstartDescription: getString("torPreferences.quickstartDescription", "Tor Browser routes your traffic over the Tor Network, run by thousands of volunteers around the world. Quickstart allows Tor Browser to connect automatically."),
+      quickstartDescription: getString("torPreferences.quickstartDescription", "Quickstart allows Tor Browser to connect automatically."),
       quickstartCheckbox : getString("torPreferences.quickstartCheckbox", "Always connect automatically"),
       bridgesHeading: getString("torPreferences.bridges", "Bridges"),
       bridgesDescription: getString(





More information about the tbb-commits mailing list