diff --git a/src/scripts/index.ts b/src/scripts/index.ts index 393b95a..965389d 100644 --- a/src/scripts/index.ts +++ b/src/scripts/index.ts @@ -8,7 +8,7 @@ async function fetchCarbon() : Promise { window.onload = async function() { try { - document.getElementById('carbon').innerHTML = "your visit to this website produced " + Math.round(await fetchCarbon() * 1000) + " mL of carbon dioxide!"; + document.getElementById('carbon').innerHTML = "your visit to this website produced " + Math.round(await fetchCarbon() * 100000) / 100 + " mL of carbon dioxide!"; } catch (error) { document.getElementById('carbon').innerHTML = "unable to load carbon usage!"; console.log(error);