Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added imgs/Davy-Jones'-Locker.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
1 change: 0 additions & 1 deletion js/getRandomRoute.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ async function getRandomRoute() {
newUrl.searchParams.set("id", newRouteName);

window.location.href = newUrl.href;

}
25 changes: 25 additions & 0 deletions js/initialSortTable.js → js/initAllRoutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,32 @@ function setupZoneFilter() {
});
}

function fillTable() {
const STORAGE_KEY = "allRoutes";
const content = JSON.parse(sessionStorage.getItem(STORAGE_KEY));

const elem = document.querySelector(".table.sortable tbody")

Object.entries(content).forEach(([id, route]) => {
const newRow = elem.insertRow();
const cellKey = newRow.insertCell();

const url = new URL("route.html", window.location.href);
url.searchParams.set("id", id)

const link = document.createElement("a");
link.href = url
link.textContent = route.route_name;

cellKey.appendChild(link);

const cellValue = newRow.insertCell();
cellValue.textContent = route.route_location;
})
}

function initAllRoutesPage() {
fillTable();
initialSortTable();
setupZoneFilter();
}
3 changes: 0 additions & 3 deletions js/templateFill.js
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
Loading