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 5d778faf96
commit 9817a68a1b
1 changed files with 3 additions and 2 deletions

View File

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