-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
41 lines (35 loc) · 1.23 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>vsysc</title>
<style>
textarea {
width: 40rem;
height: 10rem;
}
</style>
</head>
<body>
<textarea type="text" id="text1"></textarea><br>
<textarea disabled id="text2"></textarea>
<script src="package/vsysc.js"></script>
<script>
const input = document.getElementById('text1')
const output = document.getElementById("text2")
// when the file input changes do window.vsfdl.fileToVSFDL(file)
setInterval(() => {
window.vsysc.parseToJSON(input.value).then((data) => {
output.value = JSON.stringify(data)
window.vsysc.parse(input.value).then((data) => {
output.value += `\n\n===================================\n\n${JSON.stringify(data)}`
}).catch((err) => {
output.value += `\n\n===================================\n\n${JSON.stringify(err)}`
})
}).catch((err) => reject(err))
}, 10);
</script>
</body>
</html>