forked from MarkHjorth/nedry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
31 lines (28 loc) · 821 Bytes
/
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
<!DOCTYPE html>
<meta charset="UTF-8">
<head>
<title>Ah Ah Ah, you didn't say the magic word!</title>
</head>
<html>
<body>
<div class="container" onclick="playSound()">
<div class="nedry">
<img class="nedry-body" src="resources/body.png">
<img class="nedry-head" src="resources/head.png">
<img class="nedry-hand" src="resources/hand.png">
</div>
<audio id="player" autoplay loop>
<source src="resources/ahahah.mp3" type="audio/mp3">
</audio>
</div>
</body>
<link rel="stylesheet" href="resources/style.css">
<script>
const sound = document.getElementById('player');
function playSound() {
document.getElementById("player").play();
}
// Call playSound immediately when the script runs
playSound();
</script>
</html>