-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin.html
More file actions
52 lines (46 loc) · 1.17 KB
/
Copy pathadmin.html
File metadata and controls
52 lines (46 loc) · 1.17 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin page</title>
<style>
html, body {
height: 100%;
margin: 0;
}
body {
background-image: url("scare.png");
background-size: cover;
background-position: center;
background-repeat: no-repeat;
background-attachment: fixed;
}
</style>
</head>
<body>
<audio id="bgMusic" loop autoplay>
<source src="scare.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
<script>
const music = document.getElementById("bgMusic");
// Try to force play
function playAudio() {
music.volume = 0.65;
music.play().catch(err => {
console.warn("Autoplay failed:", err);
});
}
// Immediately attempt to play
playAudio();
// Try repeatedly (aggressive)
let attempts = 0;
const interval = setInterval(() => {
attempts++;
playAudio();
if (attempts > 10) clearInterval(interval);
}, 1000);
</script>
</body>
</html>