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:
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) {
|
||||
|
||||
Reference in New Issue
Block a user