In updateLastPlayedSong ' symbol replaced by ".
This commit is contained in:
parent
696bcb9e89
commit
3120855858
@ -15,18 +15,18 @@ function updateRadioStatus() {
|
||||
}
|
||||
|
||||
function updateLastPlayedSong() {
|
||||
fetch('/lastsong')
|
||||
fetch("/lastsong")
|
||||
.then(r => r.json())
|
||||
.then(last_played => {
|
||||
if ($('last-played').firstChild === null)
|
||||
$('last-played').appendChild(document.createElement("tbody"))
|
||||
else if (last_played.time == $('last-played').firstChild.lastChild.firstChild.innerText)
|
||||
if ($("last-played").firstChild === null)
|
||||
$("last-played").appendChild(document.createElement("tbody"))
|
||||
else if (last_played.time == $("last-played").firstChild.lastChild.firstChild.innerText)
|
||||
return;
|
||||
|
||||
if ($('last-played').firstChild.children.length == 10)
|
||||
$('last-played').firstChild.firstChild.remove();
|
||||
if ($("last-played").firstChild.children.length == 10)
|
||||
$("last-played").firstChild.firstChild.remove();
|
||||
|
||||
let row = $('last-played').insertRow();
|
||||
let row = $("last-played").insertRow();
|
||||
row.insertCell().appendChild(document.createTextNode(last_played.time));
|
||||
row.insertCell().appendChild(document.createTextNode(last_played.listeners == 0 ? "" : last_played.listeners));
|
||||
row.insertCell().appendChild(document.createTextNode(last_played.song));
|
||||
|
Loading…
Reference in New Issue
Block a user