mirror of https://github.com/dirtbags/moth.git
Fixed projector so it actually loads new sources
This commit is contained in:
parent
5d778faf96
commit
9817a68a1b
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue