X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=index.html;h=243e1da301e56737691f23f760d5eca84056129b;hb=deaf06bc4559b9c7f00d78d34e23d234d0196a21;hp=c556792845e29f6cb668de5c176320516ba3180c;hpb=ebe06a9b6759bb70c3c64d7c947e620cf9384412;p=zombocom-ai diff --git a/index.html b/index.html index c556792..243e1da 100644 --- a/index.html +++ b/index.html @@ -156,6 +156,14 @@ mute.addEventListener("click", () => { socket.on('reset', () => { images.replaceChildren(); + + /* Since the server is seeing us for the first time, let it + know our name (if we have one). */ + const name = localStorage.getItem('name'); + if (name) { + socket.emit('set-name', name); + return; + } }); socket.on('image', (image) => {