m |
|||
Line 171: | Line 171: | ||
− | + | function JSreqLoader () { | |
− | + | var b64_text = this.responseText; | |
− | + | console.log("Received JS results"); | |
− | + | ||
− | + | var js_text = atob(b64_text); | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | console.log("Received JS results"); | + | |
− | + | ||
− | 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
Loading, please wait