refine IE8 hack a bit
This commit is contained in:
parent
dbc5b57064
commit
b7adbef9af
|
@ -337,21 +337,21 @@ 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 ls = localStorage || {};
|
||||||
var c;
|
var c;
|
||||||
|
|
||||||
// IE8 doesn't have localStorage for files. Laaaame.
|
// IE8 doesn't have localStorage for file:// URLs :<
|
||||||
if (localStorage) {
|
e("name-a").innerHTML = dfl(ls.rdsb_name_a, "Home");
|
||||||
e("name-a").innerHTML = dfl(localStorage.rdsb_name_a, "Home");
|
e("name-b").innerHTML = dfl(ls.rdsb_name_b, "Vis");
|
||||||
e("name-b").innerHTML = dfl(localStorage.rdsb_name_b, "Vis");
|
e("logo-a").src = dfl(ls.rdsb_logo_a, "logos/black.png");
|
||||||
e("logo-a").src = dfl(localStorage.rdsb_logo_a, "logos/black.png");
|
e("logo-b").src = dfl(ls.rdsb_logo_b, "logos/white.png");
|
||||||
e("logo-b").src = dfl(localStorage.rdsb_logo_b, "logos/white.png");
|
e("score-a").innerHTML = dfl(ls.rdsb_score_a, 0);
|
||||||
e("score-a").innerHTML = dfl(localStorage.rdsb_score_a, 0);
|
e("score-b").innerHTML = dfl(ls.rdsb_score_b, 0);
|
||||||
e("score-b").innerHTML = dfl(localStorage.rdsb_score_b, 0);
|
e("timeouts-a").innerHTML = dfl(ls.rdsb_timeout_a, 3);
|
||||||
e("timeouts-a").innerHTML = dfl(localStorage.rdsb_timeout_a, 3);
|
e("timeouts-b").innerHTML = dfl(ls.rdsb_timeout_b, 3);
|
||||||
e("timeouts-b").innerHTML = dfl(localStorage.rdsb_timeout_b, 3);
|
period = Number(ls.rdsb_period) || 0;
|
||||||
period = Number(localStorage.rdsb_period) || 0;
|
|
||||||
c = Number(localStorage.rdsb_period_clock || 1800000);
|
|
||||||
|
|
||||||
|
if (localStorage) {
|
||||||
save_itimer = setInterval(save, 1000);
|
save_itimer = setInterval(save, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -359,6 +359,7 @@ function start() {
|
||||||
e("jamtext").innerHTML = "Setup";
|
e("jamtext").innerHTML = "Setup";
|
||||||
transition();
|
transition();
|
||||||
|
|
||||||
|
c = Number(ls.rdsb_period_clock || 1800000);
|
||||||
startTimer(p);
|
startTimer(p);
|
||||||
p.set(c);
|
p.set(c);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue