This commit is contained in:
Quentin ANIERE 2022-04-14 15:58:36 +02:00
commit f2da68ec60
2 changed files with 3 additions and 2 deletions

View File

@ -53,7 +53,7 @@
<ul id="messages">
<li><b>Rappel:</b> Tous les messages doivent parler de Denis !</li>
</ul>
<input id="message-input" type="text" placeholder="Écrivez votre message sur Denis ici...">
<input id="message-input" type="text" placeholder="Écrivez votre message sur Denis ici..." autofocus>
<img id="send" src="./images/send.png">
<img id="close" src="./images/cross.png">
</div>

View File

@ -29,7 +29,7 @@ document.addEventListener("DOMContentLoaded", () => {
});
socket.on("new-message", (data) => {
if(data.author != username) {
document.getElementById("ringtone").play();
}
@ -70,6 +70,7 @@ const swiper = new Swiper('.swiper', {
document.getElementById("chat-button").addEventListener("click", () => {
document.getElementById("chat").style.display = "block";
document.getElementById("message-input").focus();
});
document.getElementById("close").addEventListener("click", () => {