-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
86 lines (76 loc) · 2.7 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<!DOCTYPE html>
<html>
<!--HEAD-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> PIZZA TOWER JUMPSCARE. </title>
<link rel="stylesheet" href="styles.css">
</head>
<!--BODY-->
<body>
<!--NAVBAR-->
<!-- THE PAGE-->
<div id="overlay" class="overlay">
<div class="blur"></div>
<div class="content">
<h1></h1>
<p></p>
</div>
</div>
<script>
var el = document.getElementById('overlay');
if(el)
{
el.addEventListener('click', function()
{
show_jumpscare();
//el.style.display = 'none';
el.style.opacity = 0.5;
});
}
</script>
<!-- JUMPSCARE -->
<img id="invalid-attempt-img" src="images/Invalid.png" style="display: none;">
<audio id="audio_jumpscare" src="sound/wrong.wav" preload="auto" autoplay style="display:none;"></audio>
<script>
function show_jumpscare() {
// Create an overlay div that covers the entire screen
var overlay = document.createElement('div');
overlay.style.position = 'fixed';
overlay.style.top = 0;
overlay.style.left = 0;
overlay.style.width = '100%';
overlay.style.height = '100%';
overlay.style.backgroundColor = 'rgba(0, 0, 0, 0.8)'; // Black with 80% opacity
// Create an image element and add it to the overlay div
var img = document.createElement('img');
document.getElementById('audio_jumpscare').pause();
document.getElementById('audio_jumpscare').currentTime = 0;
document.getElementById('audio_jumpscare').play();
img.src = 'images/Invalid.png';
img.style.position = 'absolute';
img.style.top = '50%';
img.style.left = '50%';
img.style.backgroundColor = 'transparent';
img.style.transform = 'translate(-50%, -50%) scale(0)'; // Initially scaled down
img.style.transition = 'transform 1s'; // 1 second animation
overlay.appendChild(img);
document.body.appendChild(overlay);
var container = document.querySelector('.blur');
container.classList.add('jump_no-animation');
container = document.querySelector('.overlay')
container.classList.add('jump_no-animation');
// Use setTimeout to make the image scale up and then redirect
setTimeout(function() {
img.style.transform = 'translate(-50%, -50%) scale(4)'; // Scale up to 300%
setTimeout(function() {
var blur = document.getElementById('blur');
if (blur) blur.remove(); // Remove the blur element if it exists
window.location.href = 'https://store.steampowered.com/app/2231450/Pizza_Tower/'; //index.html
}, 285); // Wait before redirecting
}, 100); // Wait before scaling up
}
</script>
</body>
</html>