-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
42 lines (42 loc) · 1.36 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
<!DOCTYPE html>
<html>
<script>var Module;</script>
<script src="js/mdpad.js" ></script>
<script src="image/image.wasm.js"></script>
<script>
mdpad = {index: 1}
setTimeout(function() {
x = document.getElementById("myOshi")
if (x.innerHTML === "") {
x.innerHTML = "<bold>Unsupported browser.</bold> Chrome v119 or Firefox v120 or better should work."
}
}, 500)
async function mdpad_init() {
const fetchPromise = fetch('image/image.wasm');
const { instance } = await WebAssembly.instantiateStreaming(fetchPromise, jsexports);
wasm = instance.exports;
}
function mdpad_update() {
wasm.update()
}
</script>
<body>
<!DOCTYPE html>
<h1 id="WitchViewer.jl">
WitchViewer.jl
</h1>
<div>
<div class=" columns is-vcentered">
<div class=" column">
<form>
<div class=" field has-addons">
<p class=" control"><a class=" button is-static">Index</a></p>
<p class=" control"><input class=" input" type="number" mdpad="index" step="1" value="1", min="1", max="43"></input></p>
</div>
</form>
</div>
</div>
<button onclick="wasm.random_select()">Random</button>
<div id="myOshi"></div>
</body>
</html>