mirror of
https://github.com/sanderfoobar/ircradio.git
synced 2024-11-25 21:39:26 +01:00
Modify base.html websocket script to update elements on index.html. Modify index.html to show previous two tracks.
This commit is contained in:
parent
781aebc6ad
commit
25b46feac7
@ -46,6 +46,8 @@
|
||||
// console.log(event.data);
|
||||
json = JSON.parse(event.data);
|
||||
np = json.now_playing;
|
||||
document.querySelector("#prev_two").innerText = document.querySelector("#prev_one").innerText;
|
||||
document.querySelector("#prev_one").innerText = document.querySelector("#now_playing").innerText;
|
||||
document.querySelector("#now_playing").innerText = np;
|
||||
// console.log(np);
|
||||
return false;
|
||||
|
@ -13,8 +13,13 @@
|
||||
<hr>
|
||||
<audio controls src="/{{ settings.icecast2_mount }}">Your browser does not support the<code>audio</code> element.</audio>
|
||||
<p> </p>
|
||||
<h5>Now playing: </h5>
|
||||
<div id="now_playing">Nothing here yet</div>
|
||||
|
||||
<h3>Now playing: </h3>
|
||||
<div id="now_playing" style="padding-top:6px; margin-bottom:1.75rem;">Nothing here yet</div>
|
||||
|
||||
<h5>Previous: </h5>
|
||||
<div id="prev_one" style="font-size:12px;">Nothing here yet</div>
|
||||
<div id="prev_two" style="font-size:12px;"></div>
|
||||
<hr>
|
||||
|
||||
<h4>Command list:</h4>
|
||||
|
Loading…
Reference in New Issue
Block a user