-
Notifications
You must be signed in to change notification settings - Fork 56
Expand file tree
/
Copy pathindex.html
More file actions
62 lines (56 loc) · 1.81 KB
/
index.html
File metadata and controls
62 lines (56 loc) · 1.81 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
51
52
53
54
55
56
57
58
59
60
61
62
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>STFU</title>
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='0.9em' font-size='90'>🤫</text></svg>">
<style>
body {
margin: 0;
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: #000;
font-family: monospace;
color: #fff;
cursor: pointer;
}
.emoji {
font-size: 80px;
margin-bottom: 20px;
}
.text {
font-size: 48px;
font-weight: bold;
margin-bottom: 30px;
}
.hint {
font-size: 16px;
color: #666;
}
</style>
</head>
<body>
<div class="emoji">🤫</div>
<div class="text">STFU</div>
<div class="hint">tap to shut them up</div>
<script>
document.body.addEventListener('click', async () => {
const audioContext = new AudioContext();
const mediaStream = await navigator.mediaDevices.getUserMedia({ audio: true });
const source = audioContext.createMediaStreamSource(mediaStream);
const delayNode = audioContext.createDelay(5);
const gainNode = audioContext.createGain();
delayNode.delayTime.value = 2;
gainNode.gain.value = 0.8;
source.connect(delayNode);
delayNode.connect(gainNode);
gainNode.connect(audioContext.destination);
document.querySelector('.hint').style.display = 'none';
}, { once: true });
</script>
</body>
</html>