This repository has been archived by the owner on Dec 12, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathoptions.html
115 lines (104 loc) · 3.12 KB
/
options.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!-- This is an options page for configuring MQTT2Chrome -->
<html>
<head>
<title>MQTT2Chrome Extension Options</title>
<style>
body {
font-family: arial, helvetica, sans-serif;
}
.banner {
width: 100%;
float: left;
}
.banner_left {
padding: 8px;
float: left;
}
.banner_right {
padding: 8px;
}
.ctrl_label {
width: 300px;
float: left;
}
.ctrl_wrap {
margin: 18px 8px;
}
.ctrl {
width: 200px;
}
#defaults {
margin-left: 24px;
}
</style>
</head>
<body>
<div class="banner">
<div class="banner_left">
<img src="icon.png" alt="">
</div>
<div class="banner_right">
<h1>MQTT2Chrome Options</h1>
</div>
<p>The extension connects to a MQTT broker (that has websockets enabled), subscribes to a topic and displays any received messages as Chrome notifications.</p>
</div>
<div>
<div class="ctrl_label">
<label>MQTT Broker:</label>
</div>
<div class="ctrl_wrap">
<input id="broker" class="ctrl" type="text" size="40" style="text-align:right">
</div>
<div class="ctrl_label">
<label>Port:</label>
</div>
<div class="ctrl_wrap">
<input id="port" class="ctrl" type="text" size="10" style="text-align:right">
</div>
<div class="ctrl_label">
<label>Broker Username: (leave blank for none)</label>
</div>
<div class="ctrl_wrap">
<input id="username" class="ctrl" type="text" size="10" style="text-align:right">
</div>
<div class="ctrl_label">
<label>Broker Password: (leave blank for none)</label>
</div>
<div class="ctrl_wrap">
<input id="password" class="ctrl" type="text" size="10" style="text-align:right">
</div>
<div class="ctrl_label">
<label>Reconnect Timeout (s):</label>
</div>
<div class="ctrl_wrap">
<input id="reconnectTimeout" class="ctrl" type="text" size="10" style="text-align:right">
</div>
<div class="ctrl_label">
<label>Subtopic:</label>
</div>
<div class="ctrl_wrap">
<input id="subtopic" class="ctrl" type="text" size="40" style="text-align:right">
</div>
<div class="ctrl_label">
<label>Timeout Notifications:</label>
</div>
<div class="ctrl_wrap">
<input id="clearNotifications" class="ctrl" type="checkbox" checked>
</div>
<div class="ctrl_label">
<label>Notification Timeout (s):</label>
</div>
<div class="ctrl_wrap">
<input id="notificationTimeout" class="ctrl" type="text" size="40" style="text-align:right">
</div>
NOTE: If you have changed any of the broker settings, after clicking Save&Close, click the mqtt icon in the task bar above to re-connect to the new broker.
<div class="ctrl_label">
</div>
<div class="ctrl_wrap">
<button id="save">Save & Close</button>
</div>
</div>
<script src="options.js"></script>
</body>
</html>