-
Notifications
You must be signed in to change notification settings - Fork 0
/
websocket-color.html
49 lines (40 loc) · 1.08 KB
/
websocket-color.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>CheerLights Color from Websocket</title>
<style>
html,
body {
height: 100%;
margin: 0;
padding: 0;
background-color: white;
}
#widget {
height: 100%;
width: 100%;
display: block;
text-align: center;
}
#widget span {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 1;
}
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/paho-mqtt/1.0.1/mqttws31.js" type="text/javascript"></script>
</head>
<body>
<script src="websocket-color.js"></script>
<div id="widget">
<a href="https://cheerlights.com/" target="_blank" title="Latest CheerLights Color">
<span></span>
</a>
</div>
</body>
</html>