aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/gnunet.js9
1 files changed, 3 insertions, 6 deletions
diff --git a/scripts/gnunet.js b/scripts/gnunet.js
index 099b5fb..884285f 100644
--- a/scripts/gnunet.js
+++ b/scripts/gnunet.js
@@ -5,15 +5,12 @@ function check_reclaim() {
5 5
6 xmlHttp.onreadystatechange = function() { 6 xmlHttp.onreadystatechange = function() {
7 if (xmlHttp.readyState == XMLHttpRequest.DONE) { 7 if (xmlHttp.readyState == XMLHttpRequest.DONE) {
8 var resp = xmlHttp.responseText; 8 var resp = xmlHttp.status;
9 9
10 var re = new RegExp('^\\[[a-zA-Z0-9"{}: ,]*\\]$'); 10 if (200 != resp) {
11 var OK = re.test(resp);
12
13 if (!OK) {
14 var reclaim_alive = false; 11 var reclaim_alive = false;
15 chrome.storage.local.set({reclaim_alive}, function() {}); 12 chrome.storage.local.set({reclaim_alive}, function() {});
16 console.log("reclaim down"); 13 console.log("reclaim down (ret=" + resp + ")");
17 } else { 14 } else {
18 var reclaim_alive = true; 15 var reclaim_alive = true;
19 chrome.storage.local.set({reclaim_alive}, function() {}); 16 chrome.storage.local.set({reclaim_alive}, function() {});