diff --git a/templates/index.html b/templates/index.html index 5b98fa3..ccdb964 100644 --- a/templates/index.html +++ b/templates/index.html @@ -7897,8 +7897,16 @@ const placeholder = output.querySelector('.placeholder'); if (placeholder) placeholder.remove(); - const card = document.createElement('div'); - card.className = 'aircraft-card'; + // Check if card for this ICAO already exists + let card = output.querySelector(`[data-icao="${aircraft.icao}"]`); + const isNew = !card; + + if (isNew) { + card = document.createElement('div'); + card.className = 'aircraft-card'; + card.setAttribute('data-icao', aircraft.icao); + } + card.innerHTML = `