-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
74 lines (65 loc) · 2.05 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
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
canvas.emscripten {
display: block;
border: 0px none;
background-color: #333333;
}
textarea.emscripten {
resize: none;
width: 600px;
height: 200px;
display: block;
border: 0px none;
padding: 8px;
background-color: #222222;
color: #ffffff;
margin: 0px;
}
.content {
border: 1px solid #333333;
display: inline-block;
}
</style>
</head>
<body>
<div class="content">
<canvas class="emscripten" id="canvas" width="600" , height="360" oncontextmenu="event.preventDefault()"
tabindex=-1></canvas>
<textarea class="emscripten" id="output" rows="8"></textarea>
</div>
<script type='text/javascript'>
var Module = {
preRun: [],
postRun: [],
print: (function () {
var element = document.getElementById('output');
if (element) element.value = '';
return function (text) {
if (arguments.length > 1) {
text = Array.prototype.slice.call(arguments).join(' ');
}
console.log(text);
if (element) {
element.value += text + "\n";
element.scrollTop = element.scrollHeight;
}
};
})(),
printErr: function (text) {
if (arguments.length > 1) {
text = Array.prototype.slice.call(arguments).join(' ');
}
console.error(text);
},
canvas: (function () {
return document.getElementById('canvas');
})()
};
</script>
<script async type="text/javascript" src="match_idle"></script>
</body>
</html>