-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvanilla.html
More file actions
45 lines (36 loc) · 1.4 KB
/
vanilla.html
File metadata and controls
45 lines (36 loc) · 1.4 KB
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
<!-- http://motherfuckingwebsite.com/ -->
<html>
<head>
<meta charset="utf-8">
<title>muTS demo</title>
<script src="VanillaJS/muTS.js"></script>
<script>
document.addEventListener ("DOMContentLoaded", () => {
// Hook up events once everyting has loaded
let FileInputElement = document.getElementById ("fileInput");
document.getElementById ("parseFile").addEventListener ("click", () => {
if (FileInputElement.files.length < 1) {
console.log ("No file was selected");
return;
}
let reader = new FileReader();
reader.onload = () => {
console.log ("Result:", new Mu (new Uint8Array (reader.result)));
}
reader.readAsArrayBuffer (FileInputElement.files[0]);
});
});
</script>
</head>
<body>
<h3>muTS demo powered by VanillaJS</h3>
<br>
<a href="index.html">Go to AMDModules version</a>
<hr>
<input accept=".mu" type="file" id="fileInput">
<br>
<button id="parseFile">Parse MU file. Open console to view the result (Probably F12 unless you use Opera)</button>
<br>
<input type="checkbox" onchange="muTSlog = this.checked;">Enable verbose logging (Toggles global muTSlog variable)
</body>
</html>