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