forked from doqe/purgatory-page
first commit
This commit is contained in:
53
maintenance.html
Normal file
53
maintenance.html
Normal file
@ -0,0 +1,53 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Purgatory</title>
|
||||
<link rel="stylesheet" href="styles.css" />
|
||||
</head>
|
||||
<body>
|
||||
<link rel="icon" href="icon.gif" type="image/gif" />
|
||||
|
||||
<audio loop autoplay loop id="bg-audio" volume="0">
|
||||
<source src="old_doll.wav" type="audio/wav" />
|
||||
Your browser does not support the audio element.
|
||||
</audio>
|
||||
<video autoplay muted loop playsinline id="bg-video">
|
||||
<source src="bg.mp4" type="video/mp4" />
|
||||
no video tag ):
|
||||
</video>
|
||||
<div id="video-overlay"></div>
|
||||
<div id="content">
|
||||
<h1>Purgatory</h1>
|
||||
<p>This website is under construction, check back later!</p>
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
let userInteracted = false;
|
||||
const audio = document.getElementById("bg-audio");
|
||||
|
||||
audio.volume = 0.1
|
||||
|
||||
function markInteraction() {
|
||||
userInteracted = true;
|
||||
audio.play()
|
||||
window.removeEventListener("click", markInteraction);
|
||||
window.removeEventListener("keydown", markInteraction);
|
||||
window.removeEventListener("touchstart", markInteraction);
|
||||
}
|
||||
|
||||
window.addEventListener("click", markInteraction);
|
||||
window.addEventListener("keydown", markInteraction);
|
||||
window.addEventListener("touchstart", markInteraction);
|
||||
|
||||
if (userInteracted) {
|
||||
audio.play();
|
||||
} else {
|
||||
window.addEventListener(
|
||||
"click",
|
||||
() => {
|
||||
audio.play();
|
||||
},
|
||||
{ once: true }
|
||||
);
|
||||
}
|
||||
</script>
|
||||
</html>
|
Reference in New Issue
Block a user