From e8e6a0906702dc7b569ef4f0b2d9486d772ba562 Mon Sep 17 00:00:00 2001 From: Minteck Date: Sun, 31 Oct 2021 11:49:13 +0100 Subject: Initial commit --- js/home.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 js/home.js (limited to 'js/home.js') diff --git a/js/home.js b/js/home.js new file mode 100644 index 0000000..7751ae9 --- /dev/null +++ b/js/home.js @@ -0,0 +1,12 @@ +setInterval(() => { + window.fetch("/app/radio/song.php").then((raw) => { + raw.text().then((text) => { + document.getElementById('radio-now').innerText = text; + }) + }) + window.fetch("/app/radio/next.php").then((raw) => { + raw.text().then((text) => { + document.getElementById('radio-next').innerText = text; + }) + }) +}, 2000) \ No newline at end of file -- cgit