Fixed projector so it actually loads new sources

This commit is contained in:
The Great & Powerful James Wernicke 2015-06-04 06:06:35 -06:00
parent 68723b25c9
commit c1dc1d7633
1 changed files with 3 additions and 2 deletions

View File

@ -22,6 +22,7 @@
<script>
var urls = ["scoreboard.html", "credits.html", "tanks.html"];
var stack = [];
var secs = 1000;
var i = 0;
function reload() {
// alternate between scoreboard and other things
@ -34,11 +35,11 @@ function reload() {
}
url = stack.pop();
}
console.log("loading " + url);
document.getElementById("reloader").src = url;
}
function init() {
setInterval(reload, 60000);
setInterval(reload, 60*secs);
}
window.addEventListener("load", init);