-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
50 lines (46 loc) · 1.14 KB
/
index.html
File metadata and controls
50 lines (46 loc) · 1.14 KB
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="canonical" href="https://dexen.github.io/adagger/a%E2%80%A0.html"/>
<link rel="shortcut icon" href="https://dexen.github.io/adagger/favicon.ico"/>
<title>a†, adagger - method and tool for promoting creativity, particularly in software development</title>
<style>
html, body {
height: 100%;
margin: 0;
padding: 0;
border: 0;
}
h1#the-text {
margin: 0;
text-align: center;
line-height: 100vh;
}
</style>
</head>
<body>
<script>
(function() {
var RenderText = function(str)
{
document.getElementById('the-text').textContent = str;
document.getElementById('the-text').style.visibility = 'visible';
};
var RqListener = function()
{
var a = this.responseText.split('\n');
if (a[a.length-1] === '')
a.pop();
var array = new Uint32Array(1);
self.crypto.getRandomValues(array);
var rand = array[0]%a.length;
RenderText(a[rand]);
};
var Rq = new XMLHttpRequest();
Rq.addEventListener('load', RqListener);
Rq.open('GET', 'db.txt', true);
Rq.send();
})();
</script>
<h1 id="the-text" style="visibility: hidden;">Mystery?</h1>