cyp/app/js/status.js
Ondrej Zara 17b5040766 art
2019-03-19 22:56:39 +01:00

18 lines
No EOL
346 B
JavaScript

import * as mpd from "./mpd.js";
const DELAY = 2000;
const DOM = {};
async function tick() {
let data = await mpd.getStatus();
DOM.title.textContent = data["Title"];
// console.log(data);
setTimeout(tick, DELAY);
}
export function init() {
let node = document.querySelector("footer");
DOM.title = node.querySelector(".title");
tick();
}