.warn2 { color:#f20; }
.setval { color:#0af; }
.hilite { background-color: #ff0; }
+.special { font-size:50%; color:#088; }
x-bar {
display: block;
}
function s2hms(s) {
- return pad2( Math.floor(s / 3600) ) + ':'
+ var sgn = Math.sign(s);
+ s = Math.abs(s);
+ return ( sgn < 0 ? '-' : '' )
+ + pad2( Math.floor(s / 3600) ) + ':'
+ pad2( Math.floor(s % 3600 / 60) ) + ':'
+ pad2( Math.floor(s % 60 ) );
}
function s2hm(s) {
- return pad2( Math.floor(s / 3600) ) + ':'
+ var sgn = Math.sign(s);
+ s = Math.abs(s);
+ return ( sgn < 0 ? '-' : '' )
+ + pad2( Math.floor(s / 3600) ) + ':'
+ pad2( Math.floor(s % 3600 / 60) );
}
function m2hm(s) {
- return pad2( Math.floor(s / 60) ) + ':'
+ var sgn = Math.sign(s);
+ s = Math.abs(s);
+ return ( sgn < 0 ? '-' : '' )
+ + pad2( Math.floor(s / 60) ) + ':'
+ pad2( Math.floor(s % 60) );
}
//// "speedo" box
// speedometer:
- speed.innerHTML = Math.abs(tele.speed * 3.6).toFixed(0);
- if ( tele.nav_slimit > 0 && tele.speed > tele.nav_slimit * 1.075 )
+ var aspeed = Math.abs( tele.speed );
+ speed.innerHTML = (aspeed * 3.6).toFixed(0);
+ if ( tele.nav_slimit > 0 && aspeed > tele.nav_slimit + 1.9 )
warn( speed, 2 );
- else if ( tele.nav_slimit > 0 && tele.speed > tele.nav_slimit * 1.005 )
+ else if ( tele.nav_slimit > 0 && aspeed > tele.nav_slimit + 0.3 )
warn( speed, 1 );
else
warn( speed, 0 );
tele.job_isvalid
? tele.job_deltime != 4294967295
? m2hm(tele.job_deltime - tele.game_time)
- : '<span style="font-size:50%;color:#088">[external]</span>'
- : '<span style="font-size:50%;color:#088">[none]</span>';
+ : '<span class="special">[external]</span>'
+ : '<span class="special">[none]</span>'
//// pause and error bar status: