From c0e4ca9be28c5e84a30a17a84d0dc4a3a1d67d1f Mon Sep 17 00:00:00 2001
From: danieldegroot2 <67521919+danieldegroot2@users.noreply.github.com>
Date: Thu, 23 Oct 2025 18:08:41 +0200
Subject: [PATCH 1/2] Update sondehub.js - Use preferred tile.openstreetmap.org
URL
See https://github.com/openstreetmap/operations/issues/737
---
js/sondehub.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/js/sondehub.js b/js/sondehub.js
index d29944f..1296cc4 100644
--- a/js/sondehub.js
+++ b/js/sondehub.js
@@ -570,7 +570,7 @@ function makeQuad(x, y, zoom) {
// map type list
-var osm = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
+var osm = L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 19,
attribution: '© OpenStreetMap contributors'
});
From d9ef24ecdc075cc8bb12701f8b8cb7a2187d2ea6 Mon Sep 17 00:00:00 2001
From: xssfox
Date: Wed, 24 Dec 2025 16:15:37 +1100
Subject: [PATCH 2/2] Add banner
---
css/layout.css | 16 ++++++++++++++++
index.template.html | 1 +
js/app.js | 14 ++++++++++++++
3 files changed, 31 insertions(+)
diff --git a/css/layout.css b/css/layout.css
index 2b915f2..8ebfd8f 100644
--- a/css/layout.css
+++ b/css/layout.css
@@ -179,4 +179,20 @@ header h1{
padding: 10px;
border-width: 1px;
display: none;
+}
+
+#banner {
+ display: none
+}
+@media only screen and (min-width: 768px){
+ #banner {
+ line-height: 1.1;
+ font-size: small;
+ display: block;
+ margin-left: 300px;
+ text-align: center;
+ overflow-y: auto;
+ font-weight: bold;
+ height: 100%;
+ }
}
\ No newline at end of file
diff --git a/index.template.html b/index.template.html
index 8d3f3b0..964bc91 100644
--- a/index.template.html
+++ b/index.template.html
@@ -84,6 +84,7 @@
no
location
+
diff --git a/js/app.js b/js/app.js
index 8a2454f..2731e23 100644
--- a/js/app.js
+++ b/js/app.js
@@ -1126,6 +1126,19 @@ function update_site(){
window.location.reload(true)
}
+function check_banner(){
+ const bannerRequest = new Request("https://api.v2.sondehub.org/banner");
+ fetch(bannerRequest)
+ .then(function(response){ return response.json()})
+ .then(function(response){
+ if (response['banner']) {
+ document.getElementsByTagName("header")[0].style.backgroundColor = "#ff6259"
+ document.getElementsByTagName("header")[0].style.borderColor = "#eb3d34"
+ document.getElementById("banner").innerText = response['banner']
+ }
+ })
+}
+
function update_countdown(){
var date = new Date(0);
time_remaining = (reload_end_time - new Date().getTime())/1000
@@ -1135,6 +1148,7 @@ function update_countdown(){
}
check_version()
+check_banner()
update_check = setInterval(check_version, 15 * 60 * 1000)
load_hash();
startAjax();