-
Notifications
You must be signed in to change notification settings - Fork 0
/
pg2.html
138 lines (120 loc) · 4.79 KB
/
pg2.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<!DOCTYPE html>
<html>
<head>
<title>The game of Jesus vs Satan</title>
<link href="spinny.css" type="text/css" rel="stylesheet"/>
<script>
function getFortune() {
// create a list of random fortunes
const fortunes = [
"A pleasant surprise is waiting for you.",
"Adventure awaits you around the next corner.",
"Your hard work will pay off today.",
"You will find a hidden treasure today.",
"Your creativity will shine bright today."
];
// select a random value from the `fortunes` array
const randomIndex = Math.floor(Math.random() * fortunes.length);
// post an alert that displays the random fortune
alert(fortunes[randomIndex]);
}
// Function to change the background color
function cbc() {
const colors = ['#ff9999', '#99ff99', '#9999ff', '#ffff99'];
const randomColor = colors[Math.floor(Math.random() * colors.length)];
document.body.style.backgroundColor = randomColor;
}
// Function to display a welcome message
function dwm() {
const name = prompt("What's your name?");
if (name) {
alert(`Welcome to my homepage, ${name}!`);
}
}
function playBackgroundMusic() {
var audio = new Audio('VineBoom.mp3');
audio.loop = true;
audio.play();
}
function typeEffect(element, text, speed = 50) {
// create a counter to iterate over the characters in `text`
let i = 0;
// create a function that executes every `speed` microseconds
const timer = setInterval(() => {
// while the counter is less than the length of the `text` string
if (i < text.length) {
// update the contents of the HTML `element` by adding the next character in the `text` string to it
element.innerHTML += text.charAt(i);
i++;
} else {
// when finished, stop the loop
clearInterval(timer);
}
}, speed);
}
// Add event listeners when the page loads
window.onload = function() {
dwm();
cbc();
playBackgroundMusic();
// get the target HTML element
const element = document.getElementById('typing-text');
// execute the typeEffect function with the element and a message
typeEffect(element, "Welcome to my awesome website!");
}
</script>
</head>
<body>
<div><button onclick="cbc()" class="card">Change Background Color</button></div>
<div><button onclick="getFortune()">Get Your Fortune</button></div>
<div><p id="typing-text"></p></div>
<p>Hi? Satan is losing.</p>
<a href="index.html"><p>click to go back</p></a>
<UL>
<li>Jesus tea1m</Li>
<ul>
<li>Jesus</li>
<li>Mario</li>
</ul>
<li> Satans Team</li>
<ul>
<li>Satan</li>
<li>Wario</li>
</ul>
</UL>
<div class="Sponsor">
<h2>Ospuze</h2>
<p>The best drink to ever have been made.</p>
</div>
<div class="Sponsor">
<h2>Holtow</h2>
<p>Securing you even when the sun goes out.</p>
</div>
<br />
<p class="jjk">The <span class="highlight">Finals</span> has taken gaming by storm.</p>
<p>Players <span style="color: rgb(230, 20, 20);">are hating</span> season 4 <span style="font-weight: bold;">for varius</span> differnt reasons.</p>
<table>
<tr>
<th>Nuh</th>
<th>Uh</th>
</tr>
<tr>
<td>Yuh</td>
<td>Huh</td>
</tr>
</table>
<form>
<label for="name">Sponsor?</label>
<input type="text" id="name" name="name">
<input type="submit" value="Send Message">
</form>
<h1>Welcome to Holtow</h1>
<h2>Welcome to Ospuze</h2>
<h3>Welcome to Fortnite</h3>
<h4>Who is Go-jo?</h4>
<h5>Erm what the sigma</h5>
<h6>This was our jujutsu kaisen</h6>
Please find a seat<br />
Enjoy the game.
</body>
<html>