aboutsummaryrefslogtreecommitdiff
path: root/src/parts
diff options
context:
space:
mode:
Diffstat (limited to 'src/parts')
-rw-r--r--src/parts/end.html7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/parts/end.html b/src/parts/end.html
index 204188c..fb5a632 100644
--- a/src/parts/end.html
+++ b/src/parts/end.html
@@ -33,13 +33,16 @@
prevColumnSorted = th;
}
- // Event listeners and initial sort
+ // Event listener
document.querySelectorAll('th').forEach(th => th.addEventListener('click', () => {
document.querySelectorAll('.current-sort').forEach(el => el.classList.remove('current-sort'));
th.classList.add('current-sort');
doSort(th);
}));
-
+
+ // Sort by the default column on page load
+ doSort(prevColumnSorted);
+
// Column and row highlighting on hover
const table = document.querySelector('table');
const allCells = table.querySelectorAll('td, th');