-
Notifications
You must be signed in to change notification settings - Fork 1
/
plinko.html
231 lines (214 loc) · 20 KB
/
plinko.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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
<!DOCTYPE html>
<html>
<head>
<title>Horse Plinko Cyber Challenge</title>
<style type="text/css">
html {
overflow: hidden;
background: black;
color: white;
font-family: "Roboto", sans-serif;
cursor: cell!important;
--timeout: 20s;
}
* {
margin: 0;
box-sizing: border-box;
border: none;
}
red {
color: #ff0000;
font-weight: bolder;
}
/*iframe.cal {
position: fixed
width: calc(20vw + 30px);
height: 75vh;
filter: grayscale(100%) invert() hue-rotate() brightness(2) contrast(1.5);
transform: translate(calc(100vw - 150% + 60px), calc(50% - 90px)) scale(2);
z-index: 1;
}*/
iframe.vid {
position: fixed;
width: 100vw;
height: 80vh;
z-index: 99999;
}
.else {
position: fixed;
width: 100vw;
height: 20vh;
transform: translate(0, 80vh);
padding: 10px;
}
.center {
width: 100%;
margin: 10px auto;
text-align: center;
position: relative;
}
.center > div {
position: absolute;
top: 0;
left: 0;
right: 0;
}
#secondary {
font-size: 52px;
animation-name: el2_transition;
animation-duration: var(--timeout);
animation-iteration-count: infinite;
top: 50%;
transform: translateY(-50%);
}
#logo {
animation-name: el1_transition;
animation-duration: var(--timeout);
animation-iteration-count: infinite;
height: 95px;
}
marquee, p {
margin: 10px 0;
font-size: 32px;
}
p {
text-align: center;
margin: auto;
}
p#time {
font-size: 24px;
opacity: 0.5;
margin-top: 5px;
}
span {
color: #d2990b;
}
space {
margin: 0 20px;
color: #d2990b;
font-weight: bold;
}
space:after {
content: "🎠";
}
@keyframes el1_transition {
0% {opacity: 0;}
5% {opacity: 0;}
45% {opacity: 0;}
50% {opacity: 1;}
95% {opacity: 1;}
100% {opacity: 0;}
}
@keyframes el2_transition {
0% {opacity: 1;}
5% {opacity: 1;}
45% {opacity: 1;}
50% {opacity: 0;}
95% {opacity: 0;}
100% {opacity: 1;}
}
</style>
</head>
<body>
<!-- Calendar -->
<!-- <iframe class="cal" src="https://calendar.google.com/calendar/u/0/embed?src=calendar@hackucf.org&ctz=America/New_York&wkst=1&mode=AGENDA"></iframe> -->
<!-- Grid -->
<iframe class="vid" src="http://192.168.150.191/s/scorestack/app/dashboards#/view/scorestack-scoreboard?embed=true&_g=(filters%3A!()%2CrefreshInterval%3A(pause%3A!f%2Cvalue%3A30000)%2Ctime%3A(from%3Anow-7d%2Fd%2Cto%3Anow))&hide-filter-bar=true" height="600" width="800"></iframe>
<div class="else">
<div class="center">
<div id="secondary">
<txt id="secText"></txt>
</div>
<svg id="logo" viewBox="0 0 795 202" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M79.1883 84.1335L79.1975 84.1763L79.2095 84.144C79.2146 84.1301 79.217 84.1229 79.217 84.1229L79.1883 84.1335ZM80.2031 90.7854L80.2549 90.8801C82.7117 90.1198 85.3938 88.9067 88.3584 87.0458C92.5032 84.444 98.1744 80.4224 104.187 76.1588L104.187 76.1586C107.431 73.8586 110.773 71.4883 114.029 69.2324C120.175 64.9743 125.461 63.5112 129.766 63.981C133.99 58.9351 134.214 52.6488 126.589 51.9928C119.167 51.3606 112.762 39.3169 112.762 39.3169C115.595 43.5 119.893 44.2631 124.189 45.026C127.049 45.534 129.909 46.0418 132.336 47.5589C138.411 51.3602 140.094 56.4329 137.383 62.7624C136.9 63.8914 136.075 64.8852 135.046 65.7563C139.603 68.5294 142.277 74.0971 142.767 80.3493C142.336 81.1028 141.873 81.8072 141.381 82.4751C143.915 83.996 146.867 86.1872 149.285 89.148C149.972 90.1533 150.737 90.2685 151.53 89.7735C151.838 89.5815 153.713 88.1471 155.968 86.4214C159.494 83.7229 163.951 80.3122 164.808 79.8255C166.001 79.146 171.03 79.7304 174.205 81.2129L173.131 87.8522C172.517 87.5167 172.025 87.177 171.9 86.9109C171.84 86.7813 171.918 86.4931 172.083 86.1141C171.166 85.5505 166.839 82.9263 166.235 83.1776C166.052 83.2537 165.02 84.3031 163.558 85.7892L163.558 85.7898L163.558 85.7899C159.613 89.8002 152.541 96.9895 150.596 96.8141C149.131 96.6821 145.168 95.9619 141.484 94.5608C141.454 94.6982 141.434 94.7711 141.434 94.7711C141.434 94.7711 146.362 100.528 150.413 105.883C153.689 104.013 167.332 99.2845 169.89 98.9445C170.278 98.8932 170.773 98.917 171.329 98.9921L170.649 103.193C170.267 103.1 169.915 103.048 169.614 103.056C168.511 103.084 164.044 105.592 159.442 108.176L159.442 108.176C155.588 110.339 151.64 112.556 149.491 113.416C147.646 114.154 146.277 112.934 144.733 111.391C141.721 108.386 135.374 102.299 133.657 100.652L133.654 100.649L133.638 100.634L133.624 100.62L133.624 100.62L133.623 100.619L133.618 100.615C133.363 100.37 133.221 100.234 133.221 100.233C129.211 102.303 124.772 103.301 120.523 103.319C120.495 103.362 120.466 103.404 120.438 103.447C119.479 104.704 118.644 105.829 117.903 106.843C113.805 111.835 108.477 116.365 103.879 119.494L103.872 119.497C105.118 121.187 106.261 122.889 107.052 124.377C107.91 125.99 111.163 135.793 110.052 139.649C109.606 141.198 107.016 147.725 107.016 147.725L106.992 147.714L107.013 147.726C107.013 147.726 105.615 154.435 103.589 153.86C101.626 153.303 99.334 150.05 99.5679 149.214C99.8821 148.099 100.825 145.477 101.462 145.128C101.56 145.074 101.76 145.099 102.028 145.179C102.694 144.496 107.253 139.724 106.74 137.57C105.399 131.954 101.912 127.19 98.7235 123.806C100.048 128.205 101.328 134.422 100.3 135.482C98.1087 137.751 89.8049 143.361 84.9956 143.781C81.502 144.087 77.8214 143.948 77.8214 143.948L77.8219 143.947C77.6537 143.941 70.9798 143.686 71.1969 141.619C71.4122 139.588 74.2283 136.776 75.0904 136.865C76.2411 136.982 78.9823 137.462 79.4373 138.031C79.5373 138.156 79.5155 138.512 79.4206 138.991C79.9373 139.165 83.7119 140.396 85.4728 139.794C90.5498 138.053 95.4017 134.076 95.7087 133.15C96.1061 131.954 89.3489 125.627 84.5752 121.348C83.8692 121.091 83.233 120.826 82.6853 120.571L82.672 120.602C81.1659 119.3 79.7825 117.553 78.6381 115.209C78.6381 115.209 77.5078 114.902 75.8051 114.378C65.17 112.052 58.8716 107.513 55.3182 102.851C55.3146 102.851 55.3109 102.851 55.3073 102.851C55.2969 102.833 55.2865 102.814 55.2761 102.795C55.1062 102.571 54.9427 102.346 54.7853 102.122C54.3731 101.533 54.0892 100.9 53.9206 100.245C53.6056 99.623 53.3025 98.9994 53.0198 98.3845C50.5456 93.0029 48.5722 85.7613 48.5722 85.7613C47.1812 87.5502 43.7565 88.3385 40.5583 87.8852C37.8797 88.9213 36.9108 89.6565 35.401 90.8022L35.4009 90.8023C34.7716 91.2798 34.0483 91.8287 33.068 92.5003C30.5233 94.2429 26.4308 89.9223 28.2549 87.0577C28.8182 86.172 30.4209 84.394 32.0306 82.6083L32.0306 82.6083C32.9528 81.5853 33.8772 80.5598 34.6098 79.698C35.3792 78.7931 36.0105 77.9056 36.6266 77.0394C38.5574 74.3252 40.3389 71.8208 45.752 69.6469C45.8087 68.1756 45.3956 66.5201 44.1065 64.7459C43.7159 64.2083 43.523 63.8717 43.4876 63.6965C43.4298 63.4312 43.7271 63.5282 44.2223 63.8461C44.8971 64.3001 45.5481 64.7885 46.1728 65.3093L46.9416 65.9367C47.8126 66.663 48.6911 67.4245 49.3676 68.0186C49.4983 67.8587 49.6784 67.7201 49.9105 67.6223C52.8163 66.3718 56.068 66.1772 59.1023 67.0721C59.2768 67.1226 59.4628 67.2186 59.6483 67.3145L59.6484 67.3145C59.7334 67.3584 59.8183 67.4022 59.902 67.4416C60.8945 67.804 61.8491 68.2627 62.7521 68.8111C65.8449 70.728 67.7104 72.9794 69.2284 75.2623C71.1683 76.8968 73.4968 78.2202 76.9332 78.8077C76.9332 78.8077 75.1915 80.3115 72.4145 80.3075C74.1704 82.8939 76.3297 85.2159 80.3807 86.7609L80.3666 86.7864C79.9262 87.0256 75.1276 89.4461 70.3526 84.1058C71.1102 86.5915 72.4072 88.5534 73.5389 89.9124C73.8583 89.9382 74.1763 89.9626 74.4921 89.9868C76.558 90.1453 78.5318 90.2967 80.2031 90.7854ZM47.1872 77.9593C46.9956 79.1691 45.8596 79.9944 44.6499 79.8029C43.4401 79.6113 42.6148 78.4753 42.8063 77.2655C42.9979 76.0558 44.1339 75.2304 45.3437 75.422C46.5534 75.6136 47.3788 76.7496 47.1872 77.9593ZM77.2281 117.648L77.227 117.658L77.2785 117.669L77.2281 117.648Z" fill="#F9F9F9"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M90.9773 201.952L94.9845 199.918C102.813 195.945 110.477 191.641 117.786 186.775C137.577 173.597 152.914 157.417 163.511 136.003C175.281 112.223 179.591 85.141 180.258 58.6155C180.319 58.003 180.351 57.3816 180.351 56.7529C180.351 56.3783 180.339 56.0063 180.317 55.6372C180.373 51.9453 180.361 48.2671 180.29 44.6129L180.151 37.3657L173.144 35.4795C146.547 28.315 119.097 18.3675 95.845 3.38831L90.5866 0L85.3393 3.40672C61.5567 18.8486 36.1872 29.2885 8.50827 35.3711L1.34286 36.9466L0.935141 44.2615C-1.45361 87.1802 5.77729 130.974 35.1506 164.134C49.368 180.184 67.1607 191.876 86.8372 200.2L90.9773 201.952ZM148.929 43.6892C128.965 37.212 108.813 28.8153 90.6233 17.5266C72.5744 28.9167 53.6532 37.6378 33.6391 43.9278C36.8553 47.2449 38.835 51.7677 38.835 56.7529C38.835 66.9295 30.5852 75.1792 20.4087 75.1792C18.812 75.1792 17.2628 74.9761 15.7854 74.5944C17.9266 104.612 26.7307 132.397 46.185 154.36C54.0485 163.237 63.2401 170.695 73.475 176.908C72.9954 175.266 72.7383 173.529 72.7383 171.733C72.7383 161.556 80.988 153.307 91.1646 153.307C101.341 153.307 109.591 161.556 109.591 171.733C109.591 172.735 109.511 173.718 109.357 174.677C109.443 174.62 109.53 174.562 109.616 174.505L109.616 174.505C127.567 162.552 141.007 148.242 150.299 129.465L150.3 129.464C158.464 112.97 162.75 94.3373 164.552 74.9933C163.694 75.1158 162.816 75.1792 161.924 75.1792C151.748 75.1792 143.498 66.9295 143.498 56.7529C143.498 51.6471 145.575 47.0264 148.929 43.6892ZM109.591 56.7529C109.591 66.9295 101.341 75.1792 91.1646 75.1792C80.988 75.1792 72.7383 66.9295 72.7383 56.7529C72.7383 46.5764 80.988 38.3267 91.1646 38.3267C101.341 38.3267 109.591 46.5764 109.591 56.7529ZM149.392 126.036C149.392 136.212 141.142 144.462 130.965 144.462C120.789 144.462 112.539 136.212 112.539 126.036C112.539 115.859 120.789 107.61 130.965 107.61C141.142 107.61 149.392 115.859 149.392 126.036ZM68.3156 126.036C68.3156 136.212 60.0659 144.462 49.8894 144.462C39.7128 144.462 31.4631 136.212 31.4631 126.036C31.4631 115.859 39.7128 107.61 49.8894 107.61C60.0659 107.61 68.3156 115.859 68.3156 126.036Z" fill="#D2990B"/>
<path d="M255.006 42.9985V62.6705H233.745V42.9985H220.807V94.9779H233.745V74.2467H255.006V94.9779H267.944V42.9985H255.006ZM303.579 95.8858C318.787 95.8858 331.574 83.553 331.574 68.9504C331.574 54.3477 318.787 42.0906 303.579 42.0906C288.447 42.0906 275.66 54.3477 275.66 68.9504C275.66 83.553 288.447 95.8858 303.579 95.8858ZM303.579 84.1583C295.635 84.1583 288.901 77.1975 288.901 68.9504C288.901 60.7789 295.635 53.8181 303.579 53.8181C311.523 53.8181 318.257 60.7789 318.257 68.9504C318.257 77.1975 311.523 84.1583 303.579 84.1583ZM384.573 94.9779L372.013 77.1218C378.747 74.398 383.06 68.4207 383.06 60.8546C383.06 50.3377 374.737 42.9985 363.312 42.9985H339.176V94.9779H352.114V78.7107H358.47L369.894 94.9779H384.573ZM352.114 54.8017H362.101C366.565 54.8017 369.743 57.2229 369.743 60.8546C369.743 64.4863 366.565 66.9075 362.101 66.9075H352.114V54.8017ZM411.544 95.8858C424.407 95.8858 432.351 89.379 432.351 78.9377C432.351 69.1774 424.861 65.8483 413.209 63.3514C405.491 61.6869 402.995 60.6276 402.995 57.4498C402.995 54.8773 405.34 52.9102 409.501 52.9102C414.344 52.9102 419.564 54.8017 424.331 58.4334L430.914 49.2027C425.39 44.5874 418.581 42.0906 409.88 42.0906C398.001 42.0906 389.981 48.7488 389.981 58.7361C389.981 69.1774 398.228 72.2038 409.35 74.7006C416.916 76.5165 419.337 77.1975 419.337 80.2996C419.337 83.0991 416.841 85.0663 411.998 85.0663C405.643 85.0663 399.968 82.6451 394.899 78.4837L387.635 87.1848C393.915 92.8594 402.314 95.8858 411.544 95.8858ZM480.523 54.5747V42.9985H439.59V94.9779H480.523V83.4017H452.528V74.2467H477.95V62.6705H452.528V54.5747H480.523ZM509.414 94.9779H522.352V78.7107H533.55C544.975 78.7107 553.298 71.3715 553.298 60.8546C553.298 50.3377 544.975 42.9985 533.55 42.9985H509.414V94.9779ZM522.352 66.9075V54.8017H532.34C536.804 54.8017 539.981 57.2229 539.981 60.8546C539.981 64.4863 536.804 66.9075 532.34 66.9075H522.352ZM572.443 83.4017V42.9985H559.581V94.9779H597.487V83.4017H572.443ZM604.513 94.9779H617.452V42.9985H604.513V94.9779ZM627.493 94.9779H640.431V64.2594L663.054 94.9779H675.992V42.9985H663.054V73.717L640.431 42.9985H627.493V94.9779ZM686.084 94.9779H699.022V80.8292L704.999 74.398L719.602 94.9779H735.188L713.928 65.0916L733.675 42.9985H718.316L699.022 65.1673V42.9985H686.084V94.9779ZM763.754 95.8858C778.962 95.8858 791.749 83.553 791.749 68.9504C791.749 54.3477 778.962 42.0906 763.754 42.0906C748.622 42.0906 735.835 54.3477 735.835 68.9504C735.835 83.553 748.622 95.8858 763.754 95.8858ZM763.754 84.1583C755.81 84.1583 749.076 77.1975 749.076 68.9504C749.076 60.7789 755.81 53.8181 763.754 53.8181C771.699 53.8181 778.432 60.7789 778.432 68.9504C778.432 77.1975 771.699 84.1583 763.754 84.1583ZM239.312 153.67C244.961 153.67 250.149 151.249 253.896 147.444L249.804 143.524C247.152 146.406 243.405 148.309 239.312 148.309C231.414 148.309 224.727 141.391 224.727 133.147C224.727 124.962 231.414 118.044 239.312 118.044C243.405 118.044 247.152 119.946 249.804 122.829L253.896 118.909C250.149 115.046 244.961 112.683 239.312 112.683C228.186 112.683 218.732 122.022 218.732 133.147C218.732 144.273 228.186 153.67 239.312 153.67ZM273.183 152.978H279.179V137.471L294.916 113.375H288.172L276.181 131.937L264.363 113.375H257.33L273.183 137.471V152.978ZM301.875 152.978H321.417C328.508 152.978 333.581 148.539 333.581 142.198C333.581 137.817 330.929 134.243 326.317 131.994C329.891 129.977 331.966 127.383 331.966 123.232C331.966 117.467 327.297 113.375 320.668 113.375H301.875V152.978ZM307.697 129.862V118.505H319.226C323.204 118.505 326.029 120.926 326.029 124.212C326.029 127.498 323.204 129.862 319.226 129.862H307.697ZM307.697 147.847V134.819H320.091C324.53 134.819 327.643 137.529 327.643 141.333C327.643 145.138 324.53 147.847 320.091 147.847H307.697ZM371.136 118.793V113.375H342.024V152.978H371.136V147.559H347.904V135.511H368.888V130.092H347.904V118.793H371.136ZM410.961 126.287C410.961 118.736 404.619 113.375 396.261 113.375H379.601V152.978H385.423V139.2H394.531L404.216 152.978H410.903L400.815 138.624C406.81 137.067 410.961 132.398 410.961 126.287ZM385.423 118.793H395.454C401.161 118.793 405.023 121.618 405.023 126.287C405.023 130.957 401.161 133.782 395.454 133.782H385.423V118.793ZM455.424 153.67C461.074 153.67 466.262 151.249 470.009 147.444L465.916 143.524C463.264 146.406 459.517 148.309 455.424 148.309C447.527 148.309 440.84 141.391 440.84 133.147C440.84 124.962 447.527 118.044 455.424 118.044C459.517 118.044 463.264 119.946 465.916 122.829L470.009 118.909C466.262 115.046 461.074 112.683 455.424 112.683C444.298 112.683 434.844 122.022 434.844 133.147C434.844 144.273 444.298 153.67 455.424 153.67ZM504.457 113.375V130.092H482.839V113.375H477.017V152.978H482.839V135.511H504.457V152.978H510.279V113.375H504.457ZM551.241 152.978H557.697L540.692 113.375H534.235L517.229 152.978H523.686L527.145 144.907H547.782L551.241 152.978ZM529.393 139.661L537.463 120.869L545.534 139.661H529.393ZM570.028 147.559V113.375H564.148V152.978H591.012V147.559H570.028ZM603.664 147.559V113.375H597.784V152.978H624.647V147.559H603.664ZM661.05 118.793V113.375H631.938V152.978H661.05V147.559H637.818V135.511H658.802V130.092H637.818V118.793H661.05ZM670.206 152.978H676.029V122.944L698.799 152.978H704.621V113.375H698.799V143.409L676.029 113.375H670.206V152.978ZM733.415 136.722H744.022V145.023C741.313 147.098 737.566 148.309 734.222 148.309C726.267 148.309 719.58 141.391 719.58 133.147C719.58 124.962 726.267 118.044 734.222 118.044C738.315 118.044 742.985 119.889 745.694 122.829L749.787 118.909C746.04 115.046 739.814 112.683 734.222 112.683C723.096 112.683 713.585 122.022 713.585 133.147C713.585 144.273 723.096 153.67 734.222 153.67C739.814 153.67 746.04 151.249 749.787 147.444V131.649H733.415V136.722ZM788.303 118.793V113.375H759.191V152.978H788.303V147.559H765.071V135.511H786.055V130.092H765.071V118.793H788.303Z" fill="white"/>
</svg>
</svg>
</div>
<div onclick="refreshMarquee()" id="marquee">
</div>
<p id="time">
</p>
</div>
<script type="text/javascript">
function refreshMarquee() {
// Marquee board
fetch("https://cdn.hackucf.org/plinko.txt")
.then(data => {
return data.text();
})
.then(text => {
const messages = text.split("\n");
let output = `<p>Welcome to the <span>LMCO CyberLab!</span></p>`
if (messages.length > 1) {
// Marquee constructor
output = `<marquee behavior="scroll">`
let spacer = `<space></space>`
for (let i = 0; i < messages.length; i++) {
if (messages[i].replaceAll(" ", "") != "")
output += messages[i] + spacer;
}
// Clear last spacer
output = output.substring(0, output.length - spacer.length);
output += `</marquee>`
} else if (messages.length == 1) {
// Static text constructor
output = `<p>${messages[0]}</p>`;
}
if (document.getElementById("marquee").innerHTML != output)
// intentional xss.
document.getElementById("marquee").innerHTML = output;
})
// Next event counter
let now = new Date();
let currentHour = now.getHours();
let currentMinute = now.getMinutes();
let eventTxt = "???";
if (currentHour >= 17) {
if (currentHour === 17 && currentMinute < 15) {
eventTxt = "Closing Ceremony @ 5:30 pm";
} else {
eventTxt = "Environment Closes @ 5:15 pm";
}
} else if (currentHour >= 13) {
eventTxt = "Environment Closes @ 5:15 pm";
} else if (currentHour >= 12) {
eventTxt = "Lunch Break Ends @ 1:00 pm";
} else if (currentHour >= 10) {
if (currentHour === 10 && currentMinute < 15) {
eventTxt = "Competition Starts @ 10:15 am"
} else {
eventTxt = "Lunch Break @ 12:00 pm";
}
} else {
eventTxt = "Opening Ceremony @ 10:00 am"
}
let textToRender = "<span><b>Next Event:</b></span> " + eventTxt;
document.getElementById("secText").innerHTML = textToRender;
}
// Every 15 minutes
// setInterval(_=> {
// // Update calendar
// document.querySelector(".cal").src = document.querySelector(".cal").src;
// }, 900000);
// Every minute
setInterval(_=> {
// Update marquee
refreshMarquee();
}, 60000);
// As frequent as possible
setInterval(_=> {
now = new Date(Date.now());
document.getElementById("time").innerText = now.toLocaleString("en-us", {"dateStyle": "full", "timeStyle": "medium", "calendar": "iso8601"});
}, 250)
// change lofi girl (if requested)
const url = new URL(window.location.href);
if (url.searchParams.get("view")) {
document.querySelector(".vid").src = url.searchParams.get("view");
}
// init marquee
refreshMarquee();
</script>
</body>
</html>