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 468247c712
commit 2d8e224480
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);