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

Line 10: Line 10:
 
if(document.location.href !== loc){
 
if(document.location.href !== loc){
 
   if(sessionStorage.getItem('LINK') !== master){
 
   if(sessionStorage.getItem('LINK') !== master){
      var oldlink = link;
 
 
       sessionStorage.setItem('LINK', master);
 
       sessionStorage.setItem('LINK', master);
 
   }
 
   }
 
}
 
}
 
}
 
}

Revision as of 21:31, 23 September 2017

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);

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

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

} }