mirror of https://github.com/dirtbags/moth.git
51 lines
951 B
HTML
51 lines
951 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Scoreboard</title>
|
|
<link rel="stylesheet" href="style.css" type="text/css">
|
|
<script src="scoreboard.js" async></script>
|
|
<style>
|
|
body, html {
|
|
width: 100%;
|
|
height: 100%;
|
|
overflow: hidden;
|
|
cursor: none;
|
|
}
|
|
iframe {
|
|
width: 100%;
|
|
height: 100%;
|
|
border: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
</style>
|
|
<script>
|
|
var urls = ["scoreboard.html", "credits.html", "tanks.html"];
|
|
var stack = [];
|
|
var i = 0;
|
|
function reload() {
|
|
// alternate between scoreboard and other things
|
|
if (i%2){
|
|
url = urls[0];
|
|
}
|
|
else {
|
|
if (stack.length === 0){
|
|
stack = urls.slice(1);
|
|
}
|
|
url = stack.pop();
|
|
}
|
|
console.log("loading " + url);
|
|
}
|
|
|
|
function init() {
|
|
setInterval(reload, 60000);
|
|
}
|
|
|
|
window.addEventListener("load", init);
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<iframe id="reloader" src="scoreboard.html"></iframe>
|
|
</body>
|
|
</html>
|