diff --git a/js/initialSortTable.js b/js/initialSortTable.js index 6c27ffe..5d95b0d 100644 --- a/js/initialSortTable.js +++ b/js/initialSortTable.js @@ -8,29 +8,29 @@ function initialSortTable() { } -function setupZoneFilter() { +function setupLocationFilter() { const table = document.querySelector('table.sortable'); - const zoneFilter = document.getElementById('zone-filter'); + const locationFilter = document.getElementById('location-filter'); - if (!table || !zoneFilter) + if (!table || !locationFilter) return; const rows = Array.from(table.tBodies[0].rows); - const zones = [...new Set(rows.map(row => row.cells[1].textContent.trim()))].sort((a, b) => a.localeCompare(b)); + const locations = [...new Set(rows.map(row => row.cells[1].textContent.trim()))].sort((a, b) => a.localeCompare(b)); - zones.forEach(zone => { + locations.forEach(location => { const option = document.createElement('option'); - option.value = zone; - option.textContent = zone; - zoneFilter.appendChild(option); + option.value = location; + option.textContent = location; + locationFilter.appendChild(option); }); - zoneFilter.addEventListener('change', function() { - const selectedZone = this.value; + locationFilter.addEventListener('change', function() { + const selectedLocation = this.value; rows.forEach(row => { - const routeZone = row.cells[1].textContent.trim(); - const shouldShowRow = selectedZone === '' || routeZone === selectedZone; + const routeLocation = row.cells[1].textContent.trim(); + const shouldShowRow = selectedLocation === '' || routeLocation === selectedLocation; row.style.display = shouldShowRow ? '' : 'none'; }); }); @@ -38,5 +38,5 @@ function setupZoneFilter() { function initAllRoutesPage() { initialSortTable(); - setupZoneFilter(); + setupLocationFilter(); } \ No newline at end of file diff --git a/js/templateFill.js b/js/templateFill.js index 2ebdd23..64c497f 100644 --- a/js/templateFill.js +++ b/js/templateFill.js @@ -1,12 +1,9 @@ async function templateFill() { const urlParams = new URLSearchParams(window.location.search); const routeID = urlParams.get("id"); - console.log(routeID) - const content = JSON.parse(sessionStorage.getItem("allRoutes")); const route = content[routeID]; -console.log(route) let buffs = ""; if (route.buffs['Burst'] === true) { diff --git a/pages/all-routes.html b/pages/all-routes.html index 788a42f..b7d9c70 100644 --- a/pages/all-routes.html +++ b/pages/all-routes.html @@ -50,9 +50,9 @@
- - +