Files
html-tools/metar.html
T
2026-02-14 14:29:04 -07:00

38 lines
1.0 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>METAR Practice</title>
<style>
</style>
</head>
<body>
<div id="app">
<h1>METAR Practice</h1>
</div>
<script>
const metars = [];
fetch('metars.txt')
.then(response => response.text())
.then(data => {
const lines = data.split('\n');
lines.forEach(line => {
if (line.includes('METAR')) {
const metarString = line.substring(line.indexOf('METAR') + 6).replace('=', '').trim();
if (metarString) {
metars.push(metarString);
}
}
});
console.log(`Loaded ${metars.length} METARs.`);
})
.catch(error => console.error('Error fetching or parsing metars.txt:', error));
</script>
</body>
</html>