commit 294629b7c59dba26a882636adadc231efc8f29e3 Author: Mike Perry mikeperry-git@fscked.org Date: Fri Apr 15 02:43:16 2011 -0700
Bug 2838: Make Cookie Protections always available.
Also fix a bug referencing an old component name. It seems to work now. --- src/chrome/content/torbutton.js | 9 ++++++++- src/chrome/content/torcookie.js | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/chrome/content/torbutton.js b/src/chrome/content/torbutton.js index 5d0a564..676c311 100644 --- a/src/chrome/content/torbutton.js +++ b/src/chrome/content/torbutton.js @@ -1705,7 +1705,14 @@ function torbutton_close_on_toggle(mode) {
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"))); + var pref = m_tb_prefs.getBoolPref("extensions.torbutton.cookie_protections"); + // XXX: This should always be visible if the user enabled it. It does seem to have + // other bugs though. + /* && ((!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; }
diff --git a/src/chrome/content/torcookie.js b/src/chrome/content/torcookie.js index dcb420b..b57a263 100644 --- a/src/chrome/content/torcookie.js +++ b/src/chrome/content/torcookie.js @@ -53,7 +53,7 @@ function initDialog() { cookiesTree = document.getElementById("cookiesTree"); prefs =Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefBranch); - selector = Components.classes["@stanford.edu/cookie-jar-selector;1"] + selector = Components.classes["@torproject.org/cookie-jar-selector;1"] .getService(Components.interfaces.nsISupports) .wrappedJSObject; var tor_enabled = prefs.getBoolPref("extensions.torbutton.tor_enabled"); @@ -403,4 +403,4 @@ function DeleteAllFromTree document.getElementById(unprotButton).disabled = true; document.getElementById(protButton).disabled = true; } -} \ No newline at end of file +}