Remove momentjs

MomentJS was only used in a single javascript function,
to do Seconds → (Minutes, Seconds). This commit
replaces this with a hand-rolled version, and removes
MomentJS.

Signed-off-by: jvoisin <julien.voisin@dustri.org>
This commit is contained in:
jvoisin
2019-03-20 21:55:39 +01:00
parent 143a220719
commit f501bfd5e1
4 changed files with 4 additions and 520 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -68,13 +68,10 @@ function updateJavaJukeboxPlayerControlBar(song){
}
function songTimeAsString(timeInSeconds) {
var m = moment.duration(timeInSeconds, 'seconds');
var seconds = m.seconds();
var secondsAsString = seconds;
if (seconds < 10) {
secondsAsString = "0" + seconds;
}
return m.minutes() + ":" + secondsAsString;
var minutes = Math.floor(timeInSeconds / 60);
var seconds = seconds - minutes * 60;
return minutes + ":" + ("00" + seconds).slice(-2);
}
function newSongPlaying(song) {