-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
52 lines (47 loc) · 1.44 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
43
44
45
46
47
48
49
50
51
52
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./index.css">
<title>Informing..</title>
</head>
<body>
<div class="loading-spinner-container">
<div class="loading-spinner">
<div class="bounce1"></div>
<div class="bounce2"></div>
<div class="bounce3"></div>
</div>
<div class="loading-text">Thank You!</div>
<div class="loading-text">Informing organizers...</div>
</div>
<script src="./script.js"></script>
<script>
const currentParams = new URLSearchParams(window.location.search)
let newParams = new URLSearchParams();
for (const [key, value] of currentParams.entries()) {
newParams.set(key, value);
}
if (currentParams.get('name')) {
sendMail()
.then(() => {
if (state === "red") {
window.location.href = "/red.html" + "?" + newParams.toString();
} else if (state === "yellow") {
window.location.href = "/yellow.html" + "?" + newParams.toString()
} else {
window.location.href = "/green.html" + "?" + newParams.toString()
}
})
.catch((err) => {
console.log(err);
window.location.href = "/error.html";
});
} else {
console.log('params = empty');
}
</script>
</body>
</html>