diff --git a/package-lock.json b/package-lock.json index bab5f8d..c297696 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "maimaidxnet", + "name": "aquaimagegrabber", "version": "1.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "maimaidxnet", + "name": "aquaimagegrabber", "version": "1.0.0", "license": "ISC", "dependencies": { diff --git a/public/javascript/user.js b/public/javascript/user.js index 6394b94..cd97a93 100644 --- a/public/javascript/user.js +++ b/public/javascript/user.js @@ -91,6 +91,16 @@ async function getReleventInformation(musicData, id) { return songMatch; } +async function getReleventInformationMap(mapData, mapid) { + let mapMatch = undefined; + for(map of mapData) { + if (map.mapInfomation.colorId.id == mapid) { + mapMatch = map + } else continue + + } + return mapMatch +} // Ban Check lmao @@ -299,14 +309,15 @@ async function userAreaStatusFormatter(div) { let areaWrapper = document.createElement('div'); // create the Wrapper Div for (let i = UserAreaData.length - 1; i >= 0; i--) { const area = UserAreaData[i]; // get the area - const mapInfo = await getReleventInformation(mapMetadata, area.map_id); // get the relevent Map Information + const mapInfo = await getReleventInformationMap(mapMetadata, area.map_id); // get the relevent Map Information console.log(mapInfo) + if(!mapInfo) continue // continue if mapInfo cant be found for a map const areaGrid = document.createElement('div'); // create the Grid for the area inforrmation to go areaGrid.classList.add('areaGrid'); // add the appropriate class /* Area Title */ let areaTitle = document.createElement('div'); areaTitle.classList.add('areaTitle'); - areaTitle.innerHTML = `