From 39f18176a09e395505d59da28081de7c12a7d086 Mon Sep 17 00:00:00 2001 From: sarahpratt Date: Wed, 31 Jul 2024 15:29:25 -0700 Subject: [PATCH] fix sci notation --- dclm/leaderboard.html | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/dclm/leaderboard.html b/dclm/leaderboard.html index 957c3c3..deff9a8 100644 --- a/dclm/leaderboard.html +++ b/dclm/leaderboard.html @@ -450,7 +450,6 @@

Leaderboard

} function populateTable(data, tableBody) { - const columnIndexForScientificNotation = 4; // Change this to the desired column index data.forEach((rowData, rowIndex) => { const row = document.createElement('tr'); @@ -465,10 +464,7 @@

Leaderboard

const cell = document.createElement('td'); // Format the cell data for the specified column index - if (cellIndex === columnIndexForScientificNotation) { - const number = parseFloat(cellData); - cell.textContent = isNaN(number) ? cellData : number.toExponential(1); - } else if (cellIndex === 6 && cellData && cellData.trim() !== "") { + if (cellIndex === 6 && cellData && cellData.trim() !== "") { const anchor = document.createElement('a'); anchor.href = cellData; anchor.textContent = cellData;