Karte: Attribution per style-Injection verstecken (cache-sicher)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
rene 2026-04-12 18:06:23 +02:00
parent a256568c0c
commit 2baba57941

View file

@ -133,10 +133,13 @@ window.Page_poison = (() => {
maxZoom: 19,
}).addTo(_map);
// Attribution-Elemente aus dem DOM entfernen (doppelt sicher)
setTimeout(() => {
document.querySelectorAll('.leaflet-control-attribution').forEach(el => el.remove());
}, 300);
// Attribution komplett unterdrücken — per Style-Injection (cache-sicher)
if (!document.getElementById('leaflet-attribution-hide')) {
const s = document.createElement('style');
s.id = 'leaflet-attribution-hide';
s.textContent = '.leaflet-control-attribution { display: none !important; }';
document.head.appendChild(s);
}
}
// ----------------------------------------------------------