Cleanup js
This commit is contained in:
parent
1ecaf78293
commit
c9fb684d0a
1 changed files with 1 additions and 2 deletions
|
@ -11,8 +11,7 @@ const weatherSunset = document.getElementById("weatherSunset");
|
|||
socket.onmessage = (event) => {
|
||||
const parsed = JSON.parse(event.data);
|
||||
if (parsed.ws_type === WsType.Weather) {
|
||||
const weather = parsed.message;
|
||||
weatherIcon.setAttribute("xlink:href", "#" + weather.weather[0].icon);
|
||||
weatherIcon.setAttribute("xlink:href", "#" + parsed.message.weather[0].icon);
|
||||
weatherTemp.innerHTML = parsed.message.main.temp + " " + parsed.message.units;
|
||||
weatherDescription.innerHTML = parsed.message.weather[0].description;
|
||||
weatherHumidity.innerHTML = parsed.message.main.humidity + "%";
|
||||
|
|
Loading…
Add table
Reference in a new issue