Spaces:
Running
Running
Update index.html
Browse files- index.html +16 -16
index.html
CHANGED
@@ -685,25 +685,25 @@
|
|
685 |
if (deleteWorkoutBtn) deleteWorkoutBtn.addEventListener('click', deleteWorkout); else console.error("!deleteWorkoutBtn");
|
686 |
if (satisfactionRange) satisfactionRange.addEventListener('input', () => { if(satisfactionValue) satisfactionValue.textContent = `${satisfactionRange.value}%`; }); else console.error("!satisfactionRange");
|
687 |
console.log("initEventListeners: Fin attachement.");
|
688 |
-
|
689 |
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
|
706 |
-
</script>
|
707 |
</body>
|
708 |
</html>
|
709 |
<html>
|
|
|
685 |
if (deleteWorkoutBtn) deleteWorkoutBtn.addEventListener('click', deleteWorkout); else console.error("!deleteWorkoutBtn");
|
686 |
if (satisfactionRange) satisfactionRange.addEventListener('input', () => { if(satisfactionValue) satisfactionValue.textContent = `${satisfactionRange.value}%`; }); else console.error("!satisfactionRange");
|
687 |
console.log("initEventListeners: Fin attachement.");
|
688 |
+
}
|
689 |
|
690 |
+
// ==================================================
|
691 |
+
// --- FIN DES DÉFINITIONS DE FONCTIONS ---
|
692 |
+
// ==================================================
|
693 |
|
694 |
+
// --- INITIALISATION ---
|
695 |
+
document.addEventListener('DOMContentLoaded', () => {
|
696 |
+
console.log("DOM chargé. Initialisation...");
|
697 |
+
if (typeof firebase !== 'undefined' && firebase.auth) {
|
698 |
+
initAuthListener();
|
699 |
+
} else {
|
700 |
+
console.error("Firebase Auth non prêt ou non chargé ! Vérifiez les scripts Firebase.");
|
701 |
+
alert("Erreur critique : Impossible d'initialiser l'authentification.");
|
702 |
+
}
|
703 |
+
initEventListeners();
|
704 |
+
});
|
705 |
|
706 |
+
</script> //
|
707 |
</body>
|
708 |
</html>
|
709 |
<html>
|