diff options
author | Ruben Rodriguez <ruben@gnu.org> | 2017-09-01 16:36:10 -0400 |
---|---|---|
committer | Ruben Rodriguez <ruben@gnu.org> | 2017-09-01 16:36:10 -0400 |
commit | 3e9407561c478a7813568fd4f6e31746b7230bf8 (patch) | |
tree | cbf51cbf0e6158c70521244988f45c8b4b46253c /data/extensions/https-everywhere-eff@eff.org/components | |
parent | e8730f68798f173bd4d1c2f9b7ce02985e3fd771 (diff) |
HTTPS Everywhere updated to 5.2.21
Diffstat (limited to 'data/extensions/https-everywhere-eff@eff.org/components')
-rw-r--r-- | data/extensions/https-everywhere-eff@eff.org/components/ssl-observatory.js | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/data/extensions/https-everywhere-eff@eff.org/components/ssl-observatory.js b/data/extensions/https-everywhere-eff@eff.org/components/ssl-observatory.js index b2629fe..ba8a684 100644 --- a/data/extensions/https-everywhere-eff@eff.org/components/ssl-observatory.js +++ b/data/extensions/https-everywhere-eff@eff.org/components/ssl-observatory.js @@ -128,10 +128,6 @@ function SSLObservatory() { this.log(WARN, "Failed to initialize NSS component:" + e); } - // It is necessary to testProxySettings after the window is loaded, since the - // Tor Browser will not be finished establishing a circuit otherwise - OS.addObserver(this, "browser-delayed-startup-finished", false); - this.log(DBUG, "Loaded observatory component!"); } @@ -400,10 +396,6 @@ SSLObservatory.prototype = { } } } - - if (topic == "browser-delayed-startup-finished") { - this.testProxySettings(); - } }, observatoryActive: function() { @@ -770,7 +762,7 @@ SSLObservatory.prototype = { } }, - testProxySettings: function() { + testProxySettings: function(cb) { /* Plan: * 1. Launch an async XMLHttpRequest to check.tp.o with magic nonce * 3. Filter the nonce in protocolProxyFilter to use proxy settings @@ -808,6 +800,9 @@ SSLObservatory.prototype = { if(req.status == 200) { if(!req.responseXML) { that.log(INFO, "Tor check failed: No XML returned by check service."); + if (cb) { + cb(that.proxy_test_successful); + } return; } @@ -832,6 +827,9 @@ SSLObservatory.prototype = { that.proxy_test_callback(that.proxy_test_successful); that.proxy_test_callback = null; } + if (cb) { + cb(that.proxy_test_successful); + } } }; req.send(null); @@ -845,6 +843,9 @@ SSLObservatory.prototype = { this.proxy_test_callback(this.proxy_test_successful); this.proxy_test_callback = null; } + if (cb) { + cb(this.proxy_test_successful); + } } }, |