forked from hasharray/jsperf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
404.html
44 lines (37 loc) · 917 Bytes
/
404.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
---
---
<article>
<h1>Not Found</h1>
<p>
Oops, that page is not here.
</p>
</article>
<template>
<article>
<h1>Please Wait</h1>
<p>Your benchmark is being processed and will be available soon.</p>
</article>
<script type="text/javascript">
setTimeout(function check() {
var xhr = new XMLHttpRequest();
xhr.open('GET', location.href);
xhr.onload = function() {
if (xhr.status == 200) {
return location.reload();
}
setTimeout(check, 2500);
};
xhr.send();
}, 1000);
</script>
</template>
<script type="text/javascript">
var slug = location.pathname.slice(1);
var submission = localStorage.getItem(slug);
if (submission) {
document.querySelector('main').replaceChild(
document.importNode(document.querySelector('template').content, true),
document.querySelector('article')
);
}
</script>