-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathindex.html
82 lines (73 loc) · 1.55 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>One-Time Invite Link</title>
<meta name="viewport" content="width=device-width,inital-scale=1">
<style>
html,body{
height:100%;
width:100%;
font-family:sans-serif;
margin:0;
padding:0;
}
body{
background:#23272A;
display:flex;
justify-content:center;
align-items:center;
color:#fff;
}
.container{
background:#2C2F33;
border-radius:15px;
width:80%;
max-width:650px;
height:50%;
max-height:400px;
padding:15px 10px;
text-align:center;
display:flex;
flex-direction:column;
justify-content:center;
align-items:center;
}
#btn{
background:#7289DA;
border:0;
border-radius:15px;
color:white;
padding:5px;
font-size:20px;
font-weight:700;
width:50%;
}
#loading{
font-size:15px;
display:none;
}
</style>
</head>
<body>
<main class="container">
<h2 id="title">Please click the button for get one-time invite link</h1>
<button id="btn">Click</button>
<p id="loading" >Generating a link ...</p>
</main>
<script>
var btn = document.getElementById("btn");
btn.addEventListener("click",() => {
document.querySelector("#loading").style.display = "block";
btn.style.display = "none";
const xhttp = new XMLHttpRequest();
xhttp.onload = function() {
window.location= this.responseText
}
xhttp.open("POST", "/");
xhttp.setRequestHeader("get-link","true");
xhttp.send();
});
</script>
</body>
</html>