-
Notifications
You must be signed in to change notification settings - Fork 0
/
twitch.html
56 lines (46 loc) · 1.19 KB
/
twitch.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
<html>
<head><title>Emre's Chat</title>
<style>
body { background: #f0f0f0; font-size: 2em; font-family: Courier New; font-style: italic; }
</style>
</head>
<body>
Meet Emre<br/>
<div style="display: flex; flex-flow: row;">
<iframe
id="chat_embed"
src="https://www.twitch.tv/embed/gsoutz/chat?parent=eguneys.github.io"
height="500"
width="350">
</iframe>
<div id="#sub"></div>
</div>
<div id='#sub2'></div>
<div id='#sub3'></div>
<script>
function rnd(min, max) {
return Math.floor(min + (Math.random() * (max - min)))
}
function image(id) {
let app = document.getElementById(id)
let new_image = new Image()
new_image.width = rnd(80, 180)
new_image.src = 'favicon.ico'
new_image.style = `transform: rotate(${rnd(0, 360)}deg);`
app.appendChild(new_image)
}
function image_n(id, n) {
for (let i = 0; i < n; i++) {
image(id)
}
}
/* Nvidia Dice rolls */
/* https://clips.twitch.tv/TenuousEndearingSalsifyDoubleRainbow-hAxKrsXWLp27vfS7 */
window.addEventListener('load', () => {
image_n('#sub', 18)
image_n('#sub2', 18)
image_n('#sub3', 10)
})
</script>
</body>
</html>