-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
85 lines (76 loc) · 2.53 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>whitep4nth3r.live</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta
name="description"
content="Watch whitep4nth3r live on Twitch without needing to go to twitch.tv. We were so preoccupied with whether we could, that we didn't stop to think if we should."
/>
<link rel="stylesheet" href="./style.css" />
<link
href="data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQEAYAAABPYyMiAAAABmJLR0T///////8JWPfcAAAACXBIWXMAAABIAAAASABGyWs+AAAAF0lEQVRIx2NgGAWjYBSMglEwCkbBSAcACBAAAeaR9cIAAAAASUVORK5CYII="
rel="icon"
type="image/x-icon"
/>
</head>
<body>
<main class="main">
<div id="pointless" class="nonsense">
Welcome to my website! You are visitor number
<span id="random"></span>
</div>
<div class="stream__titleContainer">
<h1 class="stream__title">
whitep4nth3r
<span aria-label="hand pointing down emoji">👇</span>
</h1>
</div>
<section class="stream">
<div id="twitch-embed"></div>
</section>
</main>
<footer class="footer">
<p class="footer__text">
© whitep4nth3r.live | ALL RIGHTS RESERVED (whatever that means)
</p>
<a
href="https://whitep4nth3r.com/blog/why-ship-silly-side-projects/"
target="_blank"
class="footer__link"
>
Why did I make this?
</a>
</footer>
<script src="https://embed.twitch.tv/embed/v1.js"></script>
<script type="text/javascript">
function getRandomInt(min, max) {
return Math.round(Math.random() * (max - min) + min);
}
function getRandomEntry(array) {
return array[getRandomInt(0, array.length - 1)];
}
const randomEl = document.getElementById("random");
const randMult = getRandomEntry([10, 100, 1000, 10000, 100000]);
const rand1 = Math.random();
const rand2 = Math.random();
const combined = Math.round(rand1 * rand2 * randMult, 0);
randomEl.textContent = `${combined}!!!`;
const theme =
window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches
? "dark"
: "light";
new Twitch.Embed("twitch-embed", {
width: "100%",
height: "100%",
channel: "whitep4nth3r",
allowfullscreen: true,
layout: "video",
autoplay: true,
muted: true,
theme,
});
</script>
</body>
</html>