Difference between revisions of "Template:Greece/master script"

Line 1: Line 1:
 +
$( document ).ready(function(){
 +
 
var master = sessionStorage.getItem('KEY');
 
var master = sessionStorage.getItem('KEY');
 
var link = sessionStorage.getItem('LINK');
 
var link = sessionStorage.getItem('LINK');
Line 15: Line 17:
 
}
 
}
 
}
 
}
 +
 +
});

Revision as of 10:43, 27 September 2017

$( document ).ready(function(){

var master = sessionStorage.getItem('KEY'); var link = sessionStorage.getItem('LINK');


var loc = 'https://2017.igem.org/Team:Greece/' + master;

if(link != null){ history.replaceState(null, null, link); document.title = link.toUpperCase();

if(document.location.href !== loc){

  if(sessionStorage.getItem('LINK') !== master){
      sessionStorage.setItem('LINK', master);
  }

} }

});