[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [torbutton/master] Revert "Bug 20614: Add links to Tor Browser User Manual"



commit 745c80d997df1f2f5b2351f55cc8fc263228f73b
Author: Georg Koppen <gk@xxxxxxxxxxxxxx>
Date:   Mon Nov 21 18:56:21 2016 +0000

    Revert "Bug 20614: Add links to Tor Browser User Manual"
    
    This reverts commit 8a5dc8c510331714e84feb2b8d4369abf76b8e20.
    
    This is the wrong commit for 20614.
---
 src/chrome/content/aboutTor/aboutTor.xhtml |  9 +-----
 src/chrome/content/menu-overlay.xul        | 11 +------
 src/chrome/content/torbutton.js            | 46 +++++-------------------------
 src/chrome/locale/en/aboutTor.dtd          |  2 --
 src/chrome/locale/en/torbutton.dtd         |  2 --
 src/chrome/skin/aboutTor.css               |  4 ---
 6 files changed, 9 insertions(+), 65 deletions(-)

diff --git a/src/chrome/content/aboutTor/aboutTor.xhtml b/src/chrome/content/aboutTor/aboutTor.xhtml
index c1207ed..2fffb2a 100644
--- a/src/chrome/content/aboutTor/aboutTor.xhtml
+++ b/src/chrome/content/aboutTor/aboutTor.xhtml
@@ -241,14 +241,7 @@ window.addEventListener("pageshow", function() {
     <div class="bubble">
       <h1>&aboutTor.whatnextQuestion.label;</h1>
       <p>&aboutTor.whatnextAnswer.label;</p>
-      <ul>
-        <li class="showForManual">
-          <a href="&aboutTor.torbrowser_user_manual.link;">
-            &aboutTor.torbrowser_user_manual.label;
-          </a>
-        </li>
-        <li><a href="&aboutTor.whatnext.link;">&aboutTor.whatnext.label;</a></li>
-      </ul>
+      <a class="tips" href="&aboutTor.whatnext.link;">&aboutTor.whatnext.label;</a>
     </div>
 
     <div class="bubble">
diff --git a/src/chrome/content/menu-overlay.xul b/src/chrome/content/menu-overlay.xul
index 8067b5c..ceadf85 100644
--- a/src/chrome/content/menu-overlay.xul
+++ b/src/chrome/content/menu-overlay.xul
@@ -1,11 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?> <!-- -*- Mode: HTML -*- -->
 
-<!DOCTYPE overlay SYSTEM "chrome://torbutton/locale/torbutton.dtd">
-
+<!-- Bug 18905: Hide unused help menu items -->
 <overlay id="torbutton-menu-overlay"
          xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";>
   <menupopup id="menu_HelpPopup">
-    <!-- Bug 18905: Hide unused help menu items -->
     <menuitem id="menu_openHelp" removeelement="true"/>
     <menuitem id="menu_openTour" removeelement="true"/>
     <menuitem id="healthReport" removeelement="true"/>
@@ -16,12 +14,5 @@
     <!-- dummy elements to avoid 'getElementById' errors -->
     <box id="menu_HelpPopup_reportPhishingtoolmenu"/>
     <box id="menu_HelpPopup_reportPhishingErrortoolmenu"/>
-    <!-- Add Tor Browser manual link -->
-    <menuitem name="torBrowserUserManual"
-              id="torBrowserUserManual"
-              position="1"
-              label="&torbutton.torbrowser_user_manual.label;"
-              accesskey="&torbutton.torbrowser_user_manual.accesskey;"
-              oncommand="torbutton_open_torbrowser_user_manual()" />
   </menupopup>
 </overlay>
diff --git a/src/chrome/content/torbutton.js b/src/chrome/content/torbutton.js
index 5d494fa..7de599d 100644
--- a/src/chrome/content/torbutton.js
+++ b/src/chrome/content/torbutton.js
@@ -12,7 +12,6 @@ let { Services } = Cu.import("resource://gre/modules/Services.jsm", {});
 let { showDialog } = Cu.import("resource://torbutton/modules/utils.js", {});
 let { unescapeTorString } = Cu.import("resource://torbutton/modules/utils.js", {});
 let SecurityPrefs = Cu.import("resource://torbutton/modules/security-prefs.js", {});
-let { bindPrefAndInit } = Cu.import("resource://torbutton/modules/utils.js", {});
 
 const k_tb_last_browser_version_pref = "extensions.torbutton.lastBrowserVersion";
 const k_tb_browser_update_needed_pref = "extensions.torbutton.updateNeeded";
@@ -201,7 +200,7 @@ var torbutton_tor_check_observer = {
 
         // Update all open about:tor pages. If the user does not have an
         // about:tor page open in the front most window, open one.
-        if (torbutton_update_all_abouttor_pages(undefined, undefined, false) < 1) {
+        if (torbutton_update_all_abouttor_pages(undefined, false) < 1) {
           var wm = Cc["@mozilla.org/appshell/window-mediator;1"]
               .getService(Components.interfaces.nsIWindowMediator);
           var win = wm.getMostRecentWindow("navigator:browser");
@@ -361,7 +360,7 @@ function torbutton_init() {
 
     // Detect toolbar customization and update arrow on about:tor pages.
     window.addEventListener("aftercustomization", function() {
-      torbutton_update_all_abouttor_pages(undefined, undefined, undefined);
+      torbutton_update_all_abouttor_pages(undefined, undefined);
     }, false);
     
     //setting up context menu
@@ -400,8 +399,6 @@ function torbutton_init() {
 
     quantizeBrowserSize(window, 100, 100);
 
-    torbutton_init_user_manual_links();
-
     torbutton_log(3, 'init completed');
 }
 
@@ -568,7 +565,7 @@ function torbutton_notify_if_update_needed() {
     setOrClearAttribute(btn, "tbUpdateNeeded", updateNeeded);
 
     // Update all open about:tor pages.
-    torbutton_update_all_abouttor_pages(updateNeeded, undefined, undefined);
+    torbutton_update_all_abouttor_pages(updateNeeded, undefined);
 
     // Make the "check for update" menu item bold if an update is needed.
     var item = document.getElementById("torbutton-checkForUpdate");
@@ -597,11 +594,9 @@ function torbutton_check_for_update() {
 
 // Pass undefined for a parameter to have this function determine it.
 // Returns a count of open pages that were updated,
-function torbutton_update_all_abouttor_pages(aUpdateNeeded, aShowManual, aTorIsOn) {
+function torbutton_update_all_abouttor_pages(aUpdateNeeded, aTorIsOn) {
   if (aUpdateNeeded === undefined)
     aUpdateNeeded = torbutton_update_is_needed();
-  if (aShowManual === undefined)
-    aShowManual = torbutton_show_torbrowser_manual();
   if (aTorIsOn === undefined)
     aTorIsOn = torbutton_tor_check_ok();
 
@@ -612,7 +607,7 @@ function torbutton_update_all_abouttor_pages(aUpdateNeeded, aShowManual, aTorIsO
     for (var tab = tabs[0]; tab != null; tab = tab.nextSibling) {
       try {
         let doc = tabBrowser.getBrowserForTab(tab).contentDocument;
-        if (torbutton_update_abouttor_doc(doc, aTorIsOn, aShowManual, aUpdateNeeded))
+        if (torbutton_update_abouttor_doc(doc, aTorIsOn, aUpdateNeeded))
           ++count;
       } catch(e) {}
     }
@@ -622,7 +617,7 @@ function torbutton_update_all_abouttor_pages(aUpdateNeeded, aShowManual, aTorIsO
 }
 
 // Returns true if aDoc is an about:tor page.
-function torbutton_update_abouttor_doc(aDoc, aTorOn, aShowManual, aUpdateNeeded) {
+function torbutton_update_abouttor_doc(aDoc, aTorOn, aUpdateNeeded) {
   var isAboutTor = torbutton_is_abouttor_doc(aDoc);
   if (isAboutTor) {
     if (aTorOn)
@@ -630,11 +625,6 @@ function torbutton_update_abouttor_doc(aDoc, aTorOn, aShowManual, aUpdateNeeded)
     else
       aDoc.body.removeAttribute("toron");
 
-    if (aShowManual)
-      aDoc.body.setAttribute("showmanual", "yes");
-    else
-      aDoc.body.removeAttribute("showmanual");
-
     if (aUpdateNeeded)
       aDoc.body.setAttribute("torNeedsUpdate", "yes"); 
     else
@@ -749,9 +739,8 @@ function torbutton_on_abouttor_load(aDoc) {
 
     // Show correct Tor on/off and "update needed" status.
     let torOn = torbutton_tor_check_ok();
-    let showManual = torbutton_show_torbrowser_manual();
     let needsUpdate = torbutton_update_is_needed();
-    torbutton_update_abouttor_doc(aDoc, torOn, showManual, needsUpdate);
+    torbutton_update_abouttor_doc(aDoc, torOn, needsUpdate);
 
     aDoc.defaultView.addEventListener("resize",
                       function() { torbutton_update_abouttor_arrow(aDoc); },
@@ -2448,26 +2437,5 @@ function torbutton_update_noscript_button()
   }, 0);
 }
 
-// Opens the Tor Browser User Manual in a new tab
-function torbutton_open_torbrowser_user_manual() {
-  gBrowser.selectedTab = gBrowser.addTab("https://tb-manual.torproject.org";);
-}
-
-// Returns true if we should show the tor browser manual.
-function torbutton_show_torbrowser_manual() {
-  let locale = torbutton_get_general_useragent_locale();
-  return locale.startsWith("en");
-}
-
-// Makes sure the tem in the Help Menu and the link in about:tor
-// for the Tor Browser User Manual are only visible when
-// torbutton_show_torbrowser_manual() returns true.
-function torbutton_init_user_manual_links() {
-  let menuitem = document.getElementById("torBrowserUserManual");
-  bindPrefAndInit("general.useragent.locale", val => {
-    menuitem.hidden = !torbutton_show_torbrowser_manual();
-    torbutton_update_all_abouttor_pages(undefined, undefined, undefined);
-  });
-}
 
 //vim:set ts=4
diff --git a/src/chrome/locale/en/aboutTor.dtd b/src/chrome/locale/en/aboutTor.dtd
index 9e44fc2..12313c4 100644
--- a/src/chrome/locale/en/aboutTor.dtd
+++ b/src/chrome/locale/en/aboutTor.dtd
@@ -32,8 +32,6 @@
 <!ENTITY aboutTor.whatnextAnswer.label "Tor is NOT all you need to browse anonymously! You may need to change some of your browsing habits to ensure your identity stays safe.">
 <!ENTITY aboutTor.whatnext.label "Tips On Staying Anonymous »">
 <!ENTITY aboutTor.whatnext.link "https://www.torproject.org/download/download.html.en#warning";>
-<!ENTITY aboutTor.torbrowser_user_manual.label "Tor Browser User Manual »">
-<!ENTITY aboutTor.torbrowser_user_manual.link "https://tb-manual.torproject.org";>
 <!ENTITY aboutTor.helpInfo1.label "You Can Help!">
 <!ENTITY aboutTor.helpInfo2.label "There are many ways you can help make the Tor Network faster and stronger:">
 <!ENTITY aboutTor.helpInfo3.label "Run a Tor Relay Node »">
diff --git a/src/chrome/locale/en/torbutton.dtd b/src/chrome/locale/en/torbutton.dtd
index c67ec6e..97a994f 100644
--- a/src/chrome/locale/en/torbutton.dtd
+++ b/src/chrome/locale/en/torbutton.dtd
@@ -59,5 +59,3 @@
 <!ENTITY torbutton.prefs.sec_webfonts_desc "Some fonts and icons may display incorrectly.">
 <!ENTITY torbutton.prefs.sec_webfonts_desc_tooltip "Website-provided font files are blocked.">
 <!ENTITY torbutton.circuit_display.title "Tor circuit for this site">
-<!ENTITY torbutton.torbrowser_user_manual.label "Tor Browser User Manual">
-<!ENTITY torbutton.torbrowser_user_manual.accesskey "M">
diff --git a/src/chrome/skin/aboutTor.css b/src/chrome/skin/aboutTor.css
index 1971f06..0a196dc 100644
--- a/src/chrome/skin/aboutTor.css
+++ b/src/chrome/skin/aboutTor.css
@@ -132,10 +132,6 @@ body[toron] .top h1 {
   color: #600060;
 }
 
-body:not([showmanual]) .showForManual {
-  display: none;
-}
-
 div.hideIfTorIsUpToDate,
 body .top div.hideIfTorIsUpToDate h1 {
   color: black;

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits