valde/templates/spe.html

54 lines
1.1 KiB
HTML
Raw Permalink Normal View History

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