Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
ydarissep authored Aug 13, 2024
1 parent 40831bb commit 97b61bf
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,11 +346,11 @@ itemsInput.addEventListener('input', e => {
filterItemsTableInput(value, ["description", "name"])
}, doneTypingInterval)
})
speciesPanelInputSpecies.addEventListener("input", e => {
speciesPanelInputSpecies.addEventListener("input", async e => {
const value = e.target.value
if(speciesIngameNameArray.includes(value)){
const species = `SPECIES_${value.replaceAll(" ", "_").toUpperCase()}`
createSpeciesPanel(species)
await createSpeciesPanel(species)
speciesPanelInputSpecies.blur()
speciesPanelInputSpecies.value = ""
}
Expand Down
4 changes: 2 additions & 2 deletions src/locations/displayLocations.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ function appendSpeciesEl(location, method, speciesKey, methodTable){

row.append(rarity)

row.addEventListener("click", () => {
createSpeciesPanel(speciesKey)
row.addEventListener("click", async () => {
await createSpeciesPanel(speciesKey)
document.getElementById("speciesPanelMainContainer").scrollIntoView(true)
})

Expand Down
4 changes: 2 additions & 2 deletions src/scripts/displayTrainers.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ function createTrainerSpeciesTbody(trainerObj){
const speciesSprite = document.createElement("img"); speciesSprite.className = `sprite${returnTargetSpeciesSprite(speciesName)}`; speciesSprite.src = getSpeciesSpriteSrc(speciesName)
speciesSpriteContainer.append(speciesSprite)
trainerSpeciesContainer.append(speciesSpriteContainer)
speciesSpriteContainer.addEventListener("click", () => {
createSpeciesPanel(trainerSpeciesObj["name"])
speciesSpriteContainer.addEventListener("click", async () => {
await createSpeciesPanel(trainerSpeciesObj["name"])
document.getElementById("speciesPanelMainContainer").scrollIntoView(true)
})

Expand Down
4 changes: 2 additions & 2 deletions src/species/displaySpecies.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,12 @@ function appendSpeciesToTable(speciesName){
row.append(createBaseStatsContainer(statInfo[0], statInfo[1], species[speciesName]))
})

row.addEventListener("click", () => {
row.addEventListener("click", async () => {
if(panelSpecies == speciesName){
speciesPanel("show")
}
else{
createSpeciesPanel(speciesName)
await createSpeciesPanel(speciesName)
document.getElementById("speciesPanelMainContainer").scrollIntoView(true)
}
})
Expand Down
8 changes: 4 additions & 4 deletions src/speciesPanelUtility.js
Original file line number Diff line number Diff line change
Expand Up @@ -486,8 +486,8 @@ function createClickableImgAndName(speciesName, evoConditions = false, showName
container.append(sprite)
container.append(name)

container.addEventListener("click", () => {
createSpeciesPanel(speciesName)
container.addEventListener("click", async () => {
await createSpeciesPanel(speciesName)
})

return container
Expand Down Expand Up @@ -668,7 +668,7 @@ function displaySpeciesPanelHistory(){

let lockTimer = 0
let clickTimer = 0
function historyHandler(event, preventDefault = true){
async function historyHandler(event, preventDefault = true){
if(preventDefault){
event.preventDefault()
}
Expand All @@ -687,7 +687,7 @@ function displaySpeciesPanelHistory(){
spriteContainer.classList.remove("clicked")
clearTimeout(lockTimer)
if(spriteContainer.classList.contains("emulateClick") && panelSpecies != speciesName){
createSpeciesPanel(speciesName)
await createSpeciesPanel(speciesName)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/tableUtility.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
async function displaySetup(){
async function displaySetup(){
footerP("")

if(Object.keys(strategies).length === 0){
Expand Down
2 changes: 1 addition & 1 deletion src/utility.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ async function refreshURLParams(){
async function displayParams(urlParams){
if(urlParams.get("species")){
scrollToSpecies = urlParams.get("species")
createSpeciesPanel(scrollToSpecies)
await createSpeciesPanel(scrollToSpecies)
}
else{
speciesPanel("hide")
Expand Down

0 comments on commit 97b61bf

Please sign in to comment.