blob: 814f6e769c459c0ac3a64a58eb53a843951221ef (
plain)
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>
<head>
<title>HsMouse Monitor</title>
<meta charset="utf-8"/>
</head>
<body>
<img id="cam_view" />
</body>
<script>
updateImg = () => {
fetch("cam.png")
.then(response => response.blob())
.then(function(myBlob){
URL.revokeObjectURL(cam_view.src)
cam_view.src = URL.createObjectURL(myBlob)
updateImg()
})
}
updateImg()
</script>
<style>
body, html {
background-color: #002b36;
color: #586e75;
font-family: monospace;
height: 100%;
margin: 0;
position: relative;
}
#cam_view {
left: 50%;
margin: auto;
max-height: calc(100% - 20px);
max-width: calc(100% - 20px);
outline: 2px solid #586e75;
position: absolute;
top: 10px;
transform: translate(-50%, 0);
}
</style>
</html>
|