/*
WynnBuilder
WynnCrafter
WynnAtlas
WynnCustom
WynnGPS
*/ let header_icon_map = new Map([ ["index",["builder","WynnBuilder"]], ["crafter",["crafter","WynnCrafter"]], ["items",["searcher","WynnAtlas"]], ["customizer",["custom","WynnCustom"]], ["map",["compass","WynnGPS"]], ["wynnfo/index",["book","Wynnfo"]] ]); function setHeaders() { let headerleft = document.getElementById("headerleft"); let headerright = document.getElementById("headerright"); for (const [name,data] of header_icon_map) { let a_elem = document.createElement("a"); let img = document.createElement("img"); let div = document.createElement("div"); a_elem.classList.add("nomarginp"); a_elem.classList.add("iconlink"); a_elem.classList.add("tooltip"); a_elem.href = "../" + name + ".html"; img.classList.add("left"); img.classList.add("linkoptions"); img.classList.add("headericon"); img.src = "/media/icons/new/" + data[0] + ".png"; div.classList.add("tooltiptext"); div.classList.add("header-tooltip"); div.classList.add("center"); div.textContent = data[1]; a_elem.appendChild(img); a_elem.appendChild(div); headerleft.appendChild(a_elem); } let toggle_icon_button = document.createElement("button"); toggle_icon_button.classList.add("button"); toggle_icon_button.id = "toggle-icon-button"; toggle_icon_button.onclick = function() {toggleIcons()}; toggle_icon_button.textContent = "Use Old Icons"; headerright.appendChild(toggle_icon_button); console.log("Set Header"); } setHeaders();