Difference between revisions of "Team:GO Paris-Saclay"

m
Line 171: Line 171:
  
  
const req = new XMLHttpRequest();
+
function JSreqLoader () {
req.open('GET', 'https://static.igem.org/mediawiki/2018/e/ee/T--GO_Paris-Saclay--mainscript.txt', false);
+
  var b64_text = this.responseText;
console.log("Sending JS XHR...");
+
  console.log("Received JS results");
req.onprogress = function(e) {
+
 
    if (e.lengthComputable) {
+
  var js_text = atob(b64_text);
    console.log(e);
+
        progressBar.max = e.total;
+
        progressBar.value = e.loaded;
+
        display.innerText = Math.floor((e.loaded / e.total) * 100) + '%';
+
    }
+
};
+
req.send(null);
+
console.log("Received JS results");
+
var b64_text = req.responseText;
+
var js_text = atob(b64_text);
+
 
eval(js_text);
 
eval(js_text);
  
Line 207: Line 197:
 
     });
 
     });
 
   });
 
   });
 +
}
 +
 +
 +
const req = new XMLHttpRequest();
 +
req.addEventListener("load", JSreqLoader);
 +
 +
req.open('GET', 'https://static.igem.org/mediawiki/2018/e/ee/T--GO_Paris-Saclay--mainscript.txt', true);
 +
console.log("Sending JS XHR...");
 +
req.onprogress = function(e) {
 +
    if (e.lengthComputable) {
 +
    console.log(e);
 +
        progressBar.max = e.total;
 +
        progressBar.value = e.loaded;
 +
        display.innerText = Math.floor((e.loaded / e.total) * 100) + '%';
 +
    }
 +
};
 +
req.send(null);
 +
 
</script>
 
</script>
 
<script src="https://2018.igem.org/common/MathJax-2.5-latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
 
<script src="https://2018.igem.org/common/MathJax-2.5-latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>

Revision as of 15:32, 10 October 2018