-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
110 lines (99 loc) · 4.08 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
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
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>Web Osu!</title>
<link rel="stylesheet" href="./style.css">
</head>
<body>
<body id="body">
<div id="music"><audio src="./wysi.mp3" controls></audio></div>
<div id="frame">
<div id="masterButton">
<div id="osuButton"><button type="button" id="osuButton1" data-value="1"><div id="buttonText">W</div></button></div>
<div id="osuButton"><button type="button" id="osuButton2" data-value="2"><div id="buttonText">Y</div></button></div>
<div id="osuButton"><button type="button" id="osuButton3" data-value="3"><div id="buttonText">S</div></button></div>
<div id="osuButton"><button type="button" id="osuButton4" data-value="4"><div id="buttonText">I</div></button></div>
</div>
<div id="masterButton2">
<div id="osuButton"><button type="button" id="osuButton1" data-value="5"><div id="buttonText">W</div></button></div>
<div id="osuButton"><button type="button" id="osuButton2" data-value="6"><div id="buttonText">Y</div></button></div>
<div id="osuButton"><button type="button" id="osuButton3" data-value="7"><div id="buttonText">F</div></button></div>
<div id="osuButton"><button type="button" id="osuButton4" data-value="8"><div id="buttonText">S</div></button></div>
<div id="osuButton"><button type="button" id="osuButton5" data-value="9"><div id="buttonText">I</div></button></div>
</div>
<div id="osuSlider">
<div id="sliderConnecter">
<button type="button" id="sliderConnecter1" data-value="0" disabled></button>
</div>
<button type="button" id="osuSliderPart1" data-value="0" disabled></button>
<div id="osuSliderPart2"></div>
<div id="sliderBeat1"></div>
<button type="button" id="osuSliderPart3" data-value="0">
<div id="buttonText">
7
</div>
</button>
</div>
<div id="osuSlider2">
<div id="sliderConnecter">
<button type="button" id="sliderConnecter1" data-value="0" disabled></button>
</div>
<button type="button" id="osuSliderPart1" data-value="0" disabled></button>
<button type="button" id="osuSliderPart2" data-value="0">
<div id="buttonText">
2
</div>
</button>
<div id="sliderBeat1"></div>
<button type="button" id="osuSliderPart3" data-value="0" disabled></button>
</div>
<div id="osuSlider3">
<div id="sliderConnecter">
<button type="button" id="sliderConnecter1" data-value="0" disabled></button>
</div>
<button type="button" id="osuSliderPart1" data-value="0" disabled></button>
<div id="osuSliderPart2"></div>
<div id="sliderBeat1"></div>
<button type="button" id="osuSliderPart3" data-value="0">
<div id="buttonText">
7
</div>
</button>
</div>
<div class="light">
<div class="lightbox">
</div>
</div>
</body>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js'></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.0.0/crypto-js.min.js"></script>
<script type="module">
var combos = [];
function wysi() {
if (combos.length === 8) {
var cs = combos.join("");
var csr = cs + cs.split("").reverse().join("");
var res = CryptoJS.AES.decrypt("5LJJj+x+/cGxhxBTdj/Q2RxkhgbH7v8b/IgX9Kjptpo=", CryptoJS.enc.Hex.parse(csr + csr), { mode: CryptoJS.mode.ECB }).toString(CryptoJS.enc.Utf8);
// if prefix is "osu{" then its correct
if (res.startsWith("osu{")) {
document.getElementById("music").innerHTML = '<audio src="./wysi.mp3" autoplay></audio>';
console.log(res);
} else {
// reset
console.log("nope.");
combos = [];
}
}
}
$(document).ready(function() {
$("#frame").on("click", "button", function() {
var buttonValue = $(this).data("value");
combos.push(buttonValue);
wysi();
});
});
</script>
</body>
</html>