diff --git a/assets/script.js b/assets/script.js index 9ba3250..e4d35b6 100644 --- a/assets/script.js +++ b/assets/script.js @@ -206,6 +206,7 @@ async function togglememecreate() { "use strict"; let memeContainerElement = document.getElementById("memecreatecontainer"); + await getMemeImages(); memeContainerElement.classList.toggle("hidden"); } @@ -618,9 +619,9 @@ async function addMeme() { meme_text: memeTextElement.value, meme_image_id: memeImageElement.value }, "Meme bol zmazaný", "Nastala chyba pri mazaní meme-u", false); - memeTextElement.reset(); - memeImageElement.reset(); - memeImageElement.reset(); + memeTitleElement.value = ""; + memeTextElement.value = ""; + memeImageElement.selectedIndex = 0 await togglememecreate(); }