Commit bc8f182f authored by intrigeri's avatar intrigeri
Browse files

Add a extensions.torbutton.test_enabled boolean pref.

Defaults to true. When disabled, no attempt is made to test if Tor is enabled.
parent bf2ee7ed
......@@ -1912,7 +1912,8 @@ function torbutton_do_tor_check()
{
let checkSvc = Cc["@torproject.org/torbutton-torCheckService;1"]
.getService(Ci.nsISupports).wrappedJSObject;
if (checkSvc.kCheckNotInitiated != checkSvc.statusOfTorCheck)
if (checkSvc.kCheckNotInitiated != checkSvc.statusOfTorCheck ||
!m.tb_prefs.getBoolPref("extensions.torbutton.test_enabled"))
return; // Only do the check once.
// If we have a tor control port and transparent torification is off,
......
......@@ -25,6 +25,7 @@ pref("extensions.torbutton.socks_host","");
pref("extensions.torbutton.socks_port",0);
pref("extensions.torbutton.socks_version",5);
pref("extensions.torbutton.locked_mode",true);
pref("extensions.torbutton.test_enabled",true);
pref("extensions.torbutton.test_url","https://check.torproject.org/?TorButton=true");
pref("extensions.torbutton.test_url_interactive", "https://check.torproject.org/?lang=__LANG__");
pref("extensions.torbutton.local_tor_check",true);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment