[or-cvs] [torbutton/master] Fix a bug causing us to load torbutton.js twice.

mikeperry at seul.org mikeperry at seul.org
Sat Nov 14 22:31:40 UTC 2009


Author: Mike Perry <mikeperry-git at fscked.org>
Date: Sat, 14 Nov 2009 14:29:58 -0800
Subject: Fix a bug causing us to load torbutton.js twice.
Commit: d2d14e1a4f0eed75e521e083718a89c4cd2239c4

Also fix a possible namespace issue.
---
 src/chrome/content/popup.xul    |    4 +---
 src/chrome/content/torbutton.js |    2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/chrome/content/popup.xul b/src/chrome/content/popup.xul
index 13853f7..03f55f8 100644
--- a/src/chrome/content/popup.xul
+++ b/src/chrome/content/popup.xul
@@ -9,9 +9,7 @@
     <stringbundleset id="torbutton-stringbundleset">
         <stringbundle id="torbutton-bundle" src="chrome://torbutton/locale/torbutton.properties"/>
     </stringbundleset>
-    <script src="chrome://torbutton/content/torbutton.js" type="application/x-javascript"/>
-
-    <popup id="torbutton-context-menu" onpopupshowing="checkProtections();">
+    <popup id="torbutton-context-menu" onpopupshowing="torbutton_check_protections();">
         <menuitem id="torbutton-toggle"
                   label="&torbutton.context_menu.toggle;"
                   accesskey="&torbutton.context_menu.toggle.key;"
diff --git a/src/chrome/content/torbutton.js b/src/chrome/content/torbutton.js
index 976f564..48ec122 100644
--- a/src/chrome/content/torbutton.js
+++ b/src/chrome/content/torbutton.js
@@ -1408,7 +1408,7 @@ function torbutton_close_on_toggle(mode) {
     }
 }
 
-function checkProtections()
+function torbutton_check_protections()
 {
   var pref = m_tb_prefs.getBoolPref("extensions.torbutton.cookie_protections") && ((!m_tb_prefs.getBoolPref("extensions.torbutton.tor_memory_jar") && m_tb_prefs.getBoolPref("extensions.torbutton.tor_enabled")) || (!m_tb_prefs.getBoolPref("extensions.torbutton.nontor_memory_jar") && !m_tb_prefs.getBoolPref("extensions.torbutton.tor_enabled")));
   document.getElementById("torbutton-cookie-protector").disabled = !pref; 
-- 
1.5.6.5



More information about the tor-commits mailing list