diff --git a/README.md b/README.md
index c965614..8c6c5a6 100644
--- a/README.md
+++ b/README.md
@@ -61,6 +61,7 @@ Currently listening in these countries . . . that I know of . . .
- Hungary
- South Sudan
- Argentina
+- Brazil
## Features
* 24/7 recording and BirdNET-Lite analysis
diff --git a/scripts/todays_detections.php b/scripts/todays_detections.php
index db87185..558bba5 100644
--- a/scripts/todays_detections.php
+++ b/scripts/todays_detections.php
@@ -280,6 +280,34 @@ if(isset($_GET['ajax_detections']) && $_GET['ajax_detections'] == "true" ) {
die();
}
+if(isset($_GET['today_stats'])) {
+ ?>
+
+
+ | Total |
+ Today |
+ Last Hour |
+ Unique Species Total |
+ Unique Species Today |
+
+
+ |
+
+ |
+
+
+
+
+
@@ -322,28 +350,7 @@ if(isset($_GET['ajax_detections']) && $_GET['ajax_detections'] == "true" ) {
}
Number of Detections
-
-
- | Total |
- Today |
- Last Hour |
- Unique Species Total |
- Unique Species Today |
-
-
- |
-
- |
-
-
-
-
+
Today's Detections —
@@ -440,14 +447,25 @@ function loadDetections(detections_limit, element=undefined) {
}
xhttp.send();
}
+function refreshTodayStats() {
+ const xhttp = new XMLHttpRequest();
+ xhttp.onload = function() {
+ if(this.responseText.length > 0 && !this.responseText.includes("Database is busy")) {
+ document.getElementById("todaystats").innerHTML = this.responseText;
+ }
+ }
+ xhttp.open("GET", "todays_detections.php?today_stats=true", true);
+ xhttp.send();
+}
window.addEventListener("load", function(){
document.getElementById("myTopnav").remove();
loadDetections(undefined);
+ refreshTodayStats();
// refresh the kiosk detection list every minute
setTimeout(function() {
loadDetections(undefined);
- document.getElementById("searchterm").blur();
+ refreshTodayStats();
}, 60000);
loadDetections(40);