CharisKomos (Talk | contribs) |
CharisKomos (Talk | contribs) |
||
Line 1: | Line 1: | ||
var master = sessionStorage.getItem('KEY'); | var master = sessionStorage.getItem('KEY'); | ||
var link = sessionStorage.getItem('LINK'); | var link = sessionStorage.getItem('LINK'); | ||
+ | |||
+ | |||
var loc = 'https://2017.igem.org/Team:Greece/' + master; | var loc = 'https://2017.igem.org/Team:Greece/' + master; | ||
Line 8: | 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:24, 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){ var oldlink = link; sessionStorage.setItem('LINK', master); }
} }