More dumb IE8 workarounds

This commit is contained in:
Neale Pickett 2012-03-19 00:25:41 -05:00
parent 373cf9b8a5
commit dbc5b57064
1 changed files with 17 additions and 12 deletions

View File

@ -337,28 +337,33 @@ function save() {
function start() { function start() {
var p = document.getElementById("period"); var p = document.getElementById("period");
var j = document.getElementById("jam"); var j = document.getElementById("jam");
var c;
e("name-a").innerHTML = dfl(localStorage.rdsb_name_a, "Home"); // IE8 doesn't have localStorage for files. Laaaame.
e("name-b").innerHTML = dfl(localStorage.rdsb_name_b, "Vis"); if (localStorage) {
e("logo-a").src = dfl(localStorage.rdsb_logo_a, "logos/black.png"); e("name-a").innerHTML = dfl(localStorage.rdsb_name_a, "Home");
e("logo-b").src = dfl(localStorage.rdsb_logo_b, "logos/white.png"); e("name-b").innerHTML = dfl(localStorage.rdsb_name_b, "Vis");
e("score-a").innerHTML = dfl(localStorage.rdsb_score_a, 0); e("logo-a").src = dfl(localStorage.rdsb_logo_a, "logos/black.png");
e("score-b").innerHTML = dfl(localStorage.rdsb_score_b, 0); e("logo-b").src = dfl(localStorage.rdsb_logo_b, "logos/white.png");
e("timeouts-a").innerHTML = dfl(localStorage.rdsb_timeout_a, 3); e("score-a").innerHTML = dfl(localStorage.rdsb_score_a, 0);
e("timeouts-b").innerHTML = dfl(localStorage.rdsb_timeout_b, 3); e("score-b").innerHTML = dfl(localStorage.rdsb_score_b, 0);
period = Number(localStorage.rdsb_period) || 0; e("timeouts-a").innerHTML = dfl(localStorage.rdsb_timeout_a, 3);
e("timeouts-b").innerHTML = dfl(localStorage.rdsb_timeout_b, 3);
period = Number(localStorage.rdsb_period) || 0;
c = Number(localStorage.rdsb_period_clock || 1800000);
save_itimer = setInterval(save, 1000);
}
e("periodtext").innerHTML = periodtext[period]; e("periodtext").innerHTML = periodtext[period];
e("jamtext").innerHTML = "Setup"; e("jamtext").innerHTML = "Setup";
transition(); transition();
c = Number(localStorage.rdsb_period_clock || 1800000);
startTimer(p); startTimer(p);
p.set(c); p.set(c);
startTimer(j, true); startTimer(j, true);
j.set(120000); j.set(120000);
save_itimer = setInterval(save, 1000);
} }
window.onload = start; window.onload = start;