visual6502/index.html

43 lines
1.3 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<head>
<title>Visual 6502 in JavaScript</title>
<!-- we now have separate landing pages for kiosk and expert -->
<!-- sadly this mechanism won't pass on any URL query parameters -->
<!-- so it's here only as a fallback (and is deprecated style) -->
<meta http-equiv="REFRESH" content="3;url=kiosk.html">
<!-- we'll redirect with javascript to the right landing page -->
<!-- allowing pan+zoom to land in the kiosk, otherwise expert -->
<!-- (as it happens, kiosk doesn't presently support pan+zoom) -->
<script type="text/javascript">
function handleOnload() {
2010-10-30 20:07:26 +00:00
var path=location.pathname
// ensure we always have a trailing slash
path=path.replace("index.html","").replace(/\/?$/,"/");
var prefix=location.protocol+"//"+location.host+path;
var suffix=location.search;
2010-10-30 20:07:26 +00:00
// check any query string for advanced commands
var queryParts=suffix.slice(1).split('&');
for(var i=0;i<queryParts.length;i++){
var params=queryParts[i].split("=");
var name=params[0];
2010-10-30 20:07:26 +00:00
if(!(name=="panx" || name=="pany" || name=="zoom" || name=="")) {
window.location.replace(prefix+"expert.html"+suffix);
return;
}
}
window.location.replace(prefix+"kiosk.html"+suffix);
}
</script>
</head>
<body onload="handleOnload();">
<p style="align:center">
Please wait while we redirect you, or <a href="kiosk.html">click here</a>.
</p>
</body>
</html>