-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathindex_skel.html
43 lines (42 loc) · 1.14 KB
/
index_skel.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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Specify Web Portal</title>
<meta name="robots" content="noindex" />
<style>
body {
font-size: 100%;
font-family: sans-serif;
}
#collections span {
font-size: 66%;
margin-left: 2em;
}
#collections span::before {
content: "last update: "
}
</style>
</head>
<body>
<h2>The following collections are available:</h2>
<ul id="collections">
<li>Nothing here</li>
</ul>
<script type="text/javascript">
document.querySelectorAll('#collections li').forEach(function(li) {
var a = li.querySelector('a');
if (a == null) return;
var xhr = new XMLHttpRequest();
xhr.open('GET', a.getAttribute('href') + '/load-timestamp.txt');
xhr.onload = function() {
if (xhr.status === 200) {
var update = document.createElement('span');
update.textContent = xhr.responseText;
li.append(update);
}
};
xhr.send();
});
</script>
</body>
</html>