From: Jan Michel Date: Wed, 19 Oct 2016 16:13:45 +0000 (+0200) Subject: update with better display X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=8737812cd4f69ee8356f1563ba91f572e67f183b;p=labtools.git update with better display --- diff --git a/timer/index.htm b/timer/index.htm index 194a07a..3c067cc 100644 --- a/timer/index.htm +++ b/timer/index.htm @@ -30,8 +30,15 @@ function update() { timer = timer-10; + min = Math.floor(timer/60); + if(timer<0) { + min = Math.ceil(timer/60); + if(timer>-60) + min = '-'+min; + } + sec = ((timer%60)?(Math.abs(timer%60)):'00'); document.getElementById('tim').innerHTML = Math.ceil(timer/60); - document.getElementById('timsmall').innerHTML = Math.floor(timer/60)+':'+((timer%60)?(timer%60):'00'); + document.getElementById('timsmall').innerHTML = min+':'+sec; if(timer<= 0) document.getElementById('tim').className='shutup'; diff --git a/timer/style.css b/timer/style.css index 22d4056..48be83f 100644 --- a/timer/style.css +++ b/timer/style.css @@ -8,10 +8,15 @@ body { } -#set { +#setting { position:absolute; left:5px; top:5px; +height:20px; +} + +input { +height:20px; }