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

Line 155: Line 155:
 
$('#top_title').remove();
 
$('#top_title').remove();
  
const cssreq = new XMLHttpRequest();
+
function reqListener () {
cssreq.open('GET', 'https://static.igem.org/mediawiki/2018/2/22/T--GO_Paris-Saclay--maincss.txt', false);  
+
  var b64_csstext = this.responseText;
 +
  console.log("Received CSS results");
 +
  var css_text = atob(b64_csstext);
 +
  $('head').append("<style>"+css_text+"</style>");
 +
}
 +
 
 +
var oReq = new XMLHttpRequest();
 +
oReq.addEventListener("load", reqListener);
 +
oReq.open("GET", "https://static.igem.org/mediawiki/2018/2/22/T--GO_Paris-Saclay--maincss.txt");
 
console.log("Sending CSS XHR...");
 
console.log("Sending CSS XHR...");
cssreq.send(null);
+
oReq.send();
console.log("Received CSS results");
+
 
var b64_csstext = cssreq.responseText;
+
var css_text = atob(b64_csstext);
+
$('head').append("<style>"+css_text+"</style>");
+
  
 
const req = new XMLHttpRequest();
 
const req = new XMLHttpRequest();
Line 179: Line 184:
 
$('#removeme').remove();
 
$('#removeme').remove();
 
$('#bigmaindiv').insertBefore('#content'); }, 0);
 
$('#bigmaindiv').insertBefore('#content'); }, 0);
</script>
 
  
<script>
 
 
     $( 'document' ).ready(function() {
 
     $( 'document' ).ready(function() {
 
     $('#cssmenu').prepend('<div id="menu-button">Menu</div>');
 
     $('#cssmenu').prepend('<div id="menu-button">Menu</div>');

Revision as of 20:19, 9 October 2018