Updated double load

This commit is contained in:
2024-05-03 18:17:25 -05:00
parent 5e23c6baf9
commit 66670bd21e

View File

@@ -38,7 +38,7 @@
$(document).ready(function() { $(document).ready(function() {
// Function to fetch the radar station alarms // Function to fetch the radar station alarms
function fetchAlarms(stationId, elementId) { function fetchAlarms(stationId, elementId) {
var apiUrl = "https://api.weather.gov/radar/stations/" + stationId + "/alarms"; var apiUrl = "https://api.weather.gov/radar/stations/KMBX/alarms";
var alarmsElement = $("#" + elementId); var alarmsElement = $("#" + elementId);
$.getJSON(apiUrl, function(data) { $.getJSON(apiUrl, function(data) {
@@ -77,10 +77,11 @@
}); });
} }
// Call the fetchAlarms function initially and then every minute // Call the fetchAlarms function initially and then every minute
fetchAlarms("KBIS", "alarms-container"); fetchAlarms("KMBX", "alarms-container");
setInterval(function() { setInterval(function() {
fetchAlarms("KBIS", "alarms-container"); fetchAlarms("KMBX", "alarms-container");
}, 60000); // 60000 milliseconds = 1 minute }, 60000); // 60000 milliseconds = 1 minute
}); });
</script> </script>