From 2b166cfb3bfb6eebd928564210330596bf1de45f Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Mon, 1 Aug 2022 22:12:55 +0200 Subject: only display the song weight in the playlist --- web/client.html | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'web/client.html') diff --git a/web/client.html b/web/client.html index 2ca1f0d..9998940 100644 --- a/web/client.html +++ b/web/client.html @@ -77,10 +77,9 @@ let votes = new Map(); function formatSong(song) { - let s = song.weight + ' ' if (song.artist) - return s + song.artist + ' - ' + song.title - return s + song.title + return song.artist + ' - ' + song.title + return song.title } function renderPlaylist() { @@ -138,7 +137,7 @@ listItem.appendChild(upvoteBtn); listItem.appendChild(downvoteBtn); - const itemValue = document.createTextNode(formatSong(song)); + const itemValue = document.createTextNode(song.weight + ' ' + formatSong(song)); listItem.appendChild(itemValue); playlist.appendChild(listItem); } -- cgit v1.2.3