Got my hands to this file and moved $ fun coutside. ...What I was thinking back then?...

This commit is contained in:
Alexander Andreev 2021-09-08 17:21:46 +04:00
parent 17fbfe997f
commit 906968b06c
Signed by: Arav
GPG Key ID: 610DF2574456329F

View File

@ -1,6 +1,6 @@
function updateRadioStatus() {
const $ = id => document.getElementById(id);
function $(id) { return document.getElementById(id); }
function updateRadioStatus() {
fetch("/stats")
.then(r => r.json())
.then(radio => {
@ -18,8 +18,6 @@ function updateRadioStatus() {
}
function updateLastPlayedSong() {
const $ = id => document.getElementById(id);
fetch('/lastsong')
.then(r => r.json())
.then(last_played => {