forked from MarseyWorld/MarseyWorld
make chat work on back button
parent
113005d2a4
commit
8844bfedfc
|
@ -1,3 +1,10 @@
|
|||
let socket = io()
|
||||
addEventListener("pageshow", () => {
|
||||
socket.disconnect();
|
||||
socket.connect();
|
||||
});
|
||||
|
||||
|
||||
function formatHourMinute(d) {
|
||||
return d.toLocaleTimeString([], {timeStyle: 'short'})
|
||||
}
|
||||
|
@ -7,8 +14,6 @@ for (const e of document.querySelectorAll('[data-time]')) {
|
|||
|
||||
const ua = window.navigator.userAgent
|
||||
|
||||
const socket = io()
|
||||
|
||||
const chat = document.getElementById('chat')
|
||||
const chat_id = document.getElementById('chat_id').value
|
||||
const chatline = document.getElementsByClassName('chat-line')[0]
|
||||
|
|
Loading…
Reference in New Issue