aboutsummaryrefslogtreecommitdiffstats
path: root/static/block_weather.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/block_weather.js')
-rw-r--r--static/block_weather.js14
1 files changed, 0 insertions, 14 deletions
diff --git a/static/block_weather.js b/static/block_weather.js
deleted file mode 100644
index 4ae6d2d..0000000
--- a/static/block_weather.js
+++ /dev/null
@@ -1,14 +0,0 @@
-export function updateWeather() {
- const city = document.getElementById("city").value;
- fetch(`/weather?city=${encodeURIComponent(city)}`)
- .then(res => res.json())
- .then(data => {
- if (!data) {
- document.getElementById("weather-summary").innerText = `Error, "${city}" city not found`;
- return
- }
- document.getElementById("weather-summary").innerText = data.summary;
- document.getElementById("weather-icon").src = data.icon_url;
- });
-}
-