This repository has been archived by the owner on Nov 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdui.html
117 lines (100 loc) · 3.39 KB
/
dui.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
html, body {
overflow: hidden;
width: 100%;
height: 100%;
padding: 0;
margin: 0;
}
#youtube-controller, #twitch-controller, #frame-controller, #idle {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
}
#idle {
background-color: black;
background-repeat: no-repeat;
background-size: cover;
background-position: 50% 50%;
z-index: 1;
}
#youtube-controller, #twitch-controller, #frame-controller {
z-index: 3;
background: black;
}
#spinner {
position: absolute;
top: 0;
left: 0;
color: white;
text-align: center;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
background: rgba(29, 29, 29, 0.70);
z-index: 2;
display: none;
}
#spin:before {
content: '';
box-sizing: border-box;
position: absolute;
top: 50%;
left: 50%;
width: 5vw;
height: 5vw;
margin-top: -1vw;
margin-left: -1vw;
border-radius: 50%;
border: 0.1vw solid #ccc;
border-top-color: #000;
animation: spinner .6s linear infinite;
}
@keyframes spinner {
to {
transform: rotate(360deg);
}
}
</style>
<link rel="shortcut icon" href="favicon.png" />
<title>Critical Scripts</title>
</head>
<body>
<div id="idle"></div>
<div id="spinner">
<div id="spin"></div>
</div>
<script>
YT = undefined
Twitch = undefined
</script>
<script src="https://www.youtube.com/iframe_api"></script>
<script src="https://player.twitch.tv/js/embed/v1.js"></script>
<script>
const urlParams = new URLSearchParams(window.location.search)
const debug = urlParams.get('debug')
const version = urlParams.get('v')
const loadScript = src => {
const script = document.createElement('script')
script.src = `${src}?v=${version}&c=${debug ? new Date().getTime() : 'on'}`
script.type = 'text/javascript'
script.async = false
document.getElementsByTagName('body')[0].appendChild(script)
}
loadScript('javascript/controllers/dummy.js')
loadScript('javascript/controllers/youtube.js')
loadScript('javascript/controllers/twitch.js')
loadScript('javascript/controllers/frame.js')
loadScript('javascript/script.js')
</script>
</body>
</html>