-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
58 lines (47 loc) · 1.34 KB
/
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
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
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>SpeedX</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<audio id="loading" src="music/music.mp3" autoplay="true" hidden="true" loop="true"></audio>
<div class="background">
<div class='body'>
<div class="img-center">
<img src="img/logo.png" width="500">
</div>
</div>
<div class='longfazers'>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
</div>
<script>
var play = false;
var vid = document.getElementById("loading");
vid.volume = 0.1;
window.addEventListener('keyup', function(e)
{
if (e.which == 69){
vid.volume = Math.min(vid.volume + 0.1,1);
} else if(e.which == 65){
vid.volume = Math.max(vid.volume - 0.1,0);
};
});
var audio = document.querySelector('audio');
if (audio) {
window.addEventListener('keydown', function (event) {
var key = event.which || event.keyCode;
if (key === 32) { // spacebar
event.preventDefault();
audio.paused ? audio.play() : audio.pause();
}
});
}
</script>
</body>
</html>