da37cecb59
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
53 lines
1.6 KiB
HTML
53 lines
1.6 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<title>Spectrogram Viewer</title>
|
|
<meta name="viewport" content="width=device-width">
|
|
<style>
|
|
html, body {
|
|
margin: 0;
|
|
padding: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
overflow: hidden;
|
|
background-color: #1e1e1e;
|
|
}
|
|
canvas.emscripten {
|
|
width: 100vw;
|
|
height: 100vh;
|
|
display: block;
|
|
border: 0px none;
|
|
outline: none;
|
|
background-color: #1e1e1e;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()" tabindex="-1"></canvas>
|
|
<p id="output" />
|
|
<script>
|
|
var Module = {
|
|
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;
|
|
}
|
|
};
|
|
})(),
|
|
canvas: (function() {
|
|
var canvas = document.getElementById('canvas');
|
|
return canvas;
|
|
})()
|
|
};
|
|
</script>
|
|
{{{ SCRIPT }}}
|
|
</body>
|
|
</html>
|