feat: Add 'Test All METARs' button to decode all loaded METARs

Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
2026-02-14 14:47:24 -07:00
parent f0d494ba57
commit e5c3b6c83a
+12
View File
@@ -32,10 +32,12 @@
<div id="metar-display"></div>
<button id="new-metar-btn">New METAR</button>
<button id="test-all-btn">Test All METARs</button>
</div>
<script>
const metarDisplay = document.getElementById('metar-display');
const newMetarBtn = document.getElementById('new-metar-btn');
const testAllBtn = document.getElementById('test-all-btn');
const metars = [];
function parseMetar(metarString) {
@@ -137,6 +139,16 @@
});
newMetarBtn.addEventListener('click', displayNewMetar);
function testAllMetars() {
console.log(`--- Starting test of ${metars.length} METARs ---`);
metars.forEach(metarString => {
parseMetar(metarString);
});
console.log(`--- Test finished ---`);
}
testAllBtn.addEventListener('click', testAllMetars);
</script>
</body>
</html>