-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
70 lines (63 loc) · 1.88 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Loading...</title>
<style>
body {
background-color: #000;
color: #fff;
margin: 0;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
.spinner {
width: 50px;
height: 50px;
margin: auto;
background-color: #fff;
border-radius: 100%;
animation: spin 1.0s infinite ease-in-out;
border: 5px solid #333;
}
@keyframes spin {
0% { transform: scale(0); }
100% { transform: scale(1.0); opacity: 0; }
}
@media (max-width: 600px) {
.spinner {
width: 30px;
height: 30px;
}
}
</style>
<script>
document.addEventListener("DOMContentLoaded", function () {
const latestInscriptionIdRequest = new XMLHttpRequest();
latestInscriptionIdRequest.open("GET", "/r/sat/1953639996528111/at/-1", true);
latestInscriptionIdRequest.onload = function () {
if (latestInscriptionIdRequest.status === 200) {
const contentInscriptionId = JSON.parse(latestInscriptionIdRequest.responseText).id;
const contentRequest = new XMLHttpRequest();
contentRequest.open("GET", `/content/${contentInscriptionId}`, true);
contentRequest.onload = function () {
if (contentRequest.status === 200) {
document.open();
document.write(contentRequest.responseText);
document.close();
}
};
contentRequest.send();
}
};
latestInscriptionIdRequest.send();
});
</script>
</head>
<body>
<div class="spinner"></div>
</body>
</html>