-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
42 lines (40 loc) · 1.5 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0" />
<title>Makaiapp</title>
<script
defer
src="https://live-chat-server.up.railway.app/socket.io/socket.io.js"></script>
</head>
<body>
<main
id="root"
aria-haspopup="dialog"></main>
<script>
// If sessionStorage saves makaiapp-session, Limit session time to 15 mins
// it lacks to program reset on count down if user is active.
const FIFTEEN_MINUTES_IN_MILISECONDS = 1_000 * 60 * 15
const ONE_MINUTE_IN_MILISECONDS = 1_000 * 60
if (sessionStorage.getItem('makaiapp_session')) {
setTimeout(() => {
sessionStorage.clear()
window.location.href = '/'
}, FIFTEEN_MINUTES_IN_MILISECONDS)
console.log(
'Your session will expire in',
FIFTEEN_MINUTES_IN_MILISECONDS / ONE_MINUTE_IN_MILISECONDS,
'minutes'
)
}
const devENV = window.location.href
.substring(0, 8)
.includes('http://')
const API_URL = 'https://fake-wpp-db-production.up.railway.app/'
const root = document.querySelector('#root')
</script>
</body>
</html>