Continenten, Landcodes & Telefoonprefixes
Deze builder haalt de landenlijst éénmalig op en maakt daar een volledig statische HTML van (zonder externe API).
Open dit bestand lokaal in je browser, klik op Genereer statische versie, en upload daarna het gedownloade HTML-bestand naar WordPress.
| Continent | Land | ISO (Alpha-2) | Phone prefix(es) |
|---|
\n\n';
}
async function build(){
try{
status.innerHTML = '
';
const payload = await fetchAllCountries();
const data = normalize(payload);
render(data);
const rowsHTML = buildRowsHTML(data);
const staticHTML = buildStaticHTML(rowsHTML, data.length);
status.textContent = 'Gevonden: '+data.length+' landen • Klaar. Download van statische versie start zo…';
const blob = new Blob([staticHTML], {type:'text/html'});
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url; a.download = 'landen-continenten-telefoonprefixes-STatisch.html';
document.body.appendChild(a); a.click(); a.remove(); URL.revokeObjectURL(url);
}catch(err){
console.error(err);
status.innerHTML = 'Mislukt: '+err.message+'';
}
}
buildStaticBtn.addEventListener('click', build);
status.innerHTML = 'Klik op Genereer statische versie om de volledige lijst op te halen en als statische HTML te downloaden.';
})();
