aboutsummaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorAdam Spiers <github@adamspiers.org>2016-04-16 18:00:27 +0100
committerAdam Spiers <github@adamspiers.org>2017-04-20 15:18:15 +0100
commit9c7fda43e9e09c720d545d8b7e8d914f00802cb5 (patch)
treeda4da11b52eb35b4477d9209ba20dcf8a1923c8c /plugin
parent933eba8789f9702ff6db76c4310f7b21db14a7b9 (diff)
downloadperl-software-in-gnu-guix-9c7fda43e9e09c720d545d8b7e8d914f00802cb5.tar
perl-software-in-gnu-guix-9c7fda43e9e09c720d545d8b7e8d914f00802cb5.tar.gz
don't show negative signs inside minutes/seconds elements
Diffstat (limited to 'plugin')
-rw-r--r--plugin/notes/notes.html5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugin/notes/notes.html b/plugin/notes/notes.html
index 34f6073..df55e79 100644
--- a/plugin/notes/notes.html
+++ b/plugin/notes/notes.html
@@ -464,11 +464,12 @@
secondsEl = timeEl.querySelector( '.seconds-value' );
function _displayTime( hrEl, minEl, secEl, time) {
- time = Math.round(time / 1000);
+ var sign = Math.sign(time) == -1 ? "-" : "";
+ time = Math.abs(Math.round(time / 1000));
var seconds = time % 60;
var minutes = ( time / 60 ) % 60 ;
var hours = time / ( 60 * 60 ) ;
- hrEl.innerHTML = zeroPadInteger( hours );
+ hrEl.innerHTML = sign + zeroPadInteger( hours );
if (hours == 0) {
hrEl.classList.add( 'mute' );
}