mirror of
https://github.com/bckelley/spotify-player.git
synced 2026-08-24 03:24:12 -05:00
init commit - calling this project finished as of now, may revisit if in the future spotify lifts the premium requirement.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
function showError(msg) {
|
||||
document.getElementById('data').innerText = msg;
|
||||
}
|
||||
function updateTrackInfo(track) {
|
||||
if (!track) {
|
||||
document.getElementById('track-info').innerText = 'Nothing playing or no active device.';
|
||||
return;
|
||||
}
|
||||
if (track.item) {
|
||||
document.getElementById('track-info').innerText =
|
||||
`Now Playing: ${track.item.name} by ${track.item.artists.map(a => a.name).join(", ")}`;
|
||||
} else {
|
||||
document.getElementById('track-info').innerText = 'Nothing playing.';
|
||||
}
|
||||
}
|
||||
function showControls() {
|
||||
document.getElementById('controls').style.display = '';
|
||||
document.getElementById('login-btn').style.display = 'none';
|
||||
}
|
||||
Reference in New Issue
Block a user