Change color of rotation clock
This commit is contained in:
parent
eaefa14d37
commit
7943678472
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<!-- Presentation Timer 2011 Neale Pickett -->
|
||||
<!-- Placed in the public domain. -->
|
||||
<!-- Time-stamp: "2011-11-11 22:43:12 neale" -->
|
||||
<!-- Time-stamp: "2011-11-12 08:11:20 neale" -->
|
||||
<html>
|
||||
<head>
|
||||
<title>LADD Scoreboard</title>
|
||||
|
|
|
@ -19,6 +19,7 @@ function startTimer(element, precision, duration, callback) {
|
|||
var beginning;
|
||||
var itimer;
|
||||
var precmult = 1;
|
||||
var bg;
|
||||
|
||||
for (var i = 0; i < precision; i += 1) {
|
||||
precmult *= 10;
|
||||
|
@ -37,6 +38,7 @@ function startTimer(element, precision, duration, callback) {
|
|||
element.style.color = "#888";
|
||||
}
|
||||
|
||||
if (! bg) {
|
||||
if (! duration) {
|
||||
element.style.backgroundColor = "#044";
|
||||
} else if (remain <= 20000) {
|
||||
|
@ -44,6 +46,7 @@ function startTimer(element, precision, duration, callback) {
|
|||
} else {
|
||||
element.style.backgroundColor = element.bg;
|
||||
}
|
||||
}
|
||||
|
||||
element.innerHTML = "";
|
||||
if ((duration > 0) && (remain <= 0)) {
|
||||
|
@ -91,7 +94,7 @@ function startTimer(element, precision, duration, callback) {
|
|||
}
|
||||
|
||||
// Unpause if paused
|
||||
this.go = function () {
|
||||
this.go = function (color) {
|
||||
if (itimer) return;
|
||||
|
||||
this.start();
|
||||
|
@ -107,7 +110,12 @@ function startTimer(element, precision, duration, callback) {
|
|||
}
|
||||
|
||||
// Restart with a new time
|
||||
this.reset = function (t) {
|
||||
this.reset = function (t, color) {
|
||||
bg = color;
|
||||
if (color) {
|
||||
element.style.backgroundColor = color;
|
||||
}
|
||||
|
||||
duration = t;
|
||||
this.start();
|
||||
display(duration);
|
||||
|
@ -136,7 +144,7 @@ function transition() {
|
|||
jtext.innerHTML = "Jam";
|
||||
} else if (state == ROTATE) {
|
||||
pt.go();
|
||||
jt.reset(30000);
|
||||
jt.reset(30000, "#060");
|
||||
jtext.innerHTML = "Rotation";
|
||||
} else if (state == TIMEOUT) {
|
||||
pt.pause();
|
||||
|
|
Loading…
Reference in New Issue