Skip to content

A live bird collage card for your Home Assistant dashboard.

Fixing bugs I created when I was fixing bugs

ehpersonal38d94a734c1b66
diff --git a/scripts/overview.php b/scripts/overview.php
index f05ceead..a5a3bdca 100644
--- a/scripts/overview.php
+++ b/scripts/overview.php
@@ -199,7 +199,7 @@ body::-webkit-scrollbar {
}
function setModalText(iter, title, text, authorlink, photolink) {
- document.getElementById('modalHeading').innerHTML = "Photo: \""+decodeURIComponent(title).replace("+"," ")+"\" Attribution";
+ document.getElementById('modalHeading').innerHTML = "Photo: \""+decodeURIComponent(title.replace("+"," "))+"\" Attribution";
document.getElementById('modalText').innerHTML = "<div><img style='border-radius:5px' src='"+photolink+"'></div><br><div>Image link: <a target='_blank' href="+text+">"+text+"</a><br>Author link: <a target='_blank' href="+authorlink+">"+authorlink+"</a></div>";
showDialog();
}
diff --git a/scripts/todays_detections.php b/scripts/todays_detections.php
index 9c2a920a..bacd06f0 100644
--- a/scripts/todays_detections.php
+++ b/scripts/todays_detections.php
@@ -180,7 +180,7 @@ if(isset($_GET['ajax_detections']) && $_GET['ajax_detections'] == "true" ) {
}
function setModalText(iter, title, text, authorlink, photolink) {
- document.getElementById('modalHeading').innerHTML = "Photo: \""+decodeURIComponent(title).replace("+"," ")+"\" Attribution";
+ document.getElementById('modalHeading').innerHTML = "Photo: \""+decodeURIComponent(title.replace("+"," "))+"\" Attribution";
document.getElementById('modalText').innerHTML = "<div><img style='border-radius:5px' src='"+photolink+"'></div><br><div>Image link: <a target='_blank' href="+text+">"+text+"</a><br>Author link: <a target='_blank' href="+authorlink+">"+authorlink+"</a></div>";
showDialog();
}