Spaces:
Sleeping
Sleeping
Update static/script.js
Browse files- static/script.js +2 -5
static/script.js
CHANGED
@@ -28,16 +28,13 @@ const generateText = async (text) => {
|
|
28 |
|
29 |
function handleFormSubmit(event) {
|
30 |
event.preventDefault();
|
31 |
-
|
32 |
const loader = document.querySelector('#loader');
|
33 |
-
const loadingImage = document.querySelector('#loading-image');
|
34 |
loader.classList.remove('hidden');
|
35 |
-
loader.classList.add('show');
|
36 |
console.log("Form submitted");
|
37 |
const textGenInput = document.getElementById("text-gen-input");
|
38 |
const textGenParagraph = document.querySelector(".text-gen-output");
|
39 |
-
|
40 |
textGenParagraph.textContent = await generateText(textGenInput.value);
|
41 |
-
|
42 |
loader.classList.add('hidden');
|
43 |
}
|
|
|
28 |
|
29 |
function handleFormSubmit(event) {
|
30 |
event.preventDefault();
|
31 |
+
// Afficher l'image de chargement
|
32 |
const loader = document.querySelector('#loader');
|
|
|
33 |
loader.classList.remove('hidden');
|
|
|
34 |
console.log("Form submitted");
|
35 |
const textGenInput = document.getElementById("text-gen-input");
|
36 |
const textGenParagraph = document.querySelector(".text-gen-output");
|
|
|
37 |
textGenParagraph.textContent = await generateText(textGenInput.value);
|
38 |
+
// Masquer l'image de chargement après le traitement
|
39 |
loader.classList.add('hidden');
|
40 |
}
|