54 lines
1.1 KiB
HTML
54 lines
1.1 KiB
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Admin</title>
|
|
<style>
|
|
html, body {
|
|
padding : 0;
|
|
margin : 0;
|
|
width : 100%;
|
|
height : 100%;
|
|
}
|
|
|
|
body {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex-direction: column;
|
|
|
|
background : #222;
|
|
}
|
|
|
|
button {
|
|
font-size : 2em;
|
|
padding : 1em;
|
|
margin : 1em;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<button id="action">Action</button>
|
|
<button id="noise">Noise</button>
|
|
<button id="stop">Stop</button>
|
|
<script src="static/js/lib/socket.io.js"></script>
|
|
<script>
|
|
const socket = io();
|
|
|
|
document.getElementById('action').addEventListener('click', () => {
|
|
socket.emit('action')
|
|
})
|
|
|
|
document.getElementById('noise').addEventListener('click', () => {
|
|
socket.emit('noise')
|
|
})
|
|
|
|
document.getElementById('stop').addEventListener('click', () => {
|
|
socket.emit('stop')
|
|
})
|
|
</script>
|
|
</body>
|
|
</html>
|
|
|