RadouxArthur (Talk | contribs) |
|||
(10 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
<style> | <style> | ||
body { | body { | ||
− | + | width: 1200px; | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
background-color: rgb(217,217,217); | background-color: rgb(217,217,217); | ||
margin: auto; | margin: auto; | ||
font-family: 'Roboto', Helvetica, SansSerif; | font-family: 'Roboto', Helvetica, SansSerif; | ||
+ | padding: 0; | ||
+ | color: black; | ||
+ | background-color:rgb(217,217,217); | ||
+ | word-wrap: break-word; | ||
} | } | ||
Line 155: | Line 155: | ||
$('#top_title').remove(); | $('#top_title').remove(); | ||
var progressBar = document.getElementById("progress"); | var progressBar = document.getElementById("progress"); | ||
− | var display = document.getElementById(" | + | var display = document.getElementById("progdisplay"); |
function reqListener () { | function reqListener () { | ||
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 193: | Line 184: | ||
$('#removeme').remove(); | $('#removeme').remove(); | ||
$('#bigmaindiv').insertBefore('#content'); }, 0); | $('#bigmaindiv').insertBefore('#content'); }, 0); | ||
− | + | setTimeout(function(){ | |
− | + | ||
$('#cssmenu').prepend('<div id="menu-button">Menu</div>'); | $('#cssmenu').prepend('<div id="menu-button">Menu</div>'); | ||
$('#cssmenu #menu-button').on('click', function(){ | $('#cssmenu #menu-button').on('click', function(){ | ||
Line 205: | Line 195: | ||
} | } | ||
}); | }); | ||
− | + | },1000); | |
+ | } | ||
+ | |||
+ | |||
+ | 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) { | ||
+ | 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> |
Latest revision as of 22:07, 13 October 2018
Loading, please wait