-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathloadingMinecraft.html
More file actions
107 lines (100 loc) · 3.83 KB
/
Copy pathloadingMinecraft.html
File metadata and controls
107 lines (100 loc) · 3.83 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
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Loading...</title>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-color: black; /* Background color */
color: #39FF14; /* Neon green text color */
font-family: Arial, sans-serif;
font-size: 2em;
text-align: center;
margin: 0;
overflow: hidden; /* Prevent scrollbars */
}
#message {
white-space: pre-wrap; /* Preserve whitespace and line breaks */
overflow: hidden;
border-right: .15em solid #39FF14; /* Neon green caret */
animation: typing 3.5s steps(30, end), blink-caret .75s step-end infinite;
color: #39FF14; /* Ensure text color is neon green */
font-weight: bold;
}
#choice {
display: none; /* Initially hidden */
color: #39FF14; /* Neon green text color */
font-weight: bold;
}
#choice button {
background-color: #39FF14; /* Neon green background */
color: black;
border: none;
border-radius: 5px;
padding: 10px 20px;
margin: 10px;
font-size: 1em;
cursor: pointer;
}
#choice button:hover {
background-color: #2dff00; /* Slightly lighter green for hover */
}
@keyframes typing {
from { width: 0; }
to { width: 100%; }
}
@keyframes blink-caret {
from, to { border-color: transparent; }
50% { border-color: #39FF14; }
}
</style>
</head>
<body>
<div id="message">Loading...</div>
<div id="choice">
<p>Oh no!<br>R U Sigma???</p>
<button id="yesButton">Yes</button>
<button id="noButton">No</button>
</div>
<script>
function simulateTypingEffect() {
const messageElement = document.getElementById('message');
const choiceElement = document.getElementById('choice');
// Duration of typing animation
const typingDuration = 3500; // in milliseconds
const additionalDelay = 2000; // Additional delay before redirect
// Random chance of showing choice
const showChoice = Math.random() < 0.01; // 1 in 100 chance
// Start typing effect
setTimeout(() => {
if (showChoice) {
messageElement.style.display = 'none'; // Hide the typing effect
choiceElement.style.display = 'block'; // Show the choice
} else {
messageElement.innerHTML = `Launching...`; // Update text to "Launching..."
messageElement.style.borderRight = 'none'; // Hide the caret
// Redirect after the additional delay
setTimeout(() => {
window.location.href = 'https://wolfbyte2024.github.io/194egler';
}, additionalDelay);
}
}, typingDuration);
// Handle Yes button click
document.getElementById('yesButton').addEventListener('click', () => {
window.location.href = 'https://wolfbyte2024.github.io/194egler';
});
// Handle No button click
document.getElementById('noButton').addEventListener('click', () => {
window.location.href = 'index.html';
});
}
// Call the typing simulation function when the page loads
window.addEventListener('load', simulateTypingEffect);
</script>
</body>
</html>