-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzz-plugin.html
38 lines (37 loc) · 1.08 KB
/
zz-plugin.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
<html>
<body>
<div class='row'>
<div class='col-xs-6'>
<select class='form-control' id='pos'>
<option value='bottom'>Place at bottom</option>
<option value='top'>Place at the top</option>
</select>
</div>
<div class='col-xs-6'>
<select class='form-control' id='overlap'>
<option value='overlap'>Overlap content</option>
<option value='reserve'>Reserve space</option>
</select>
</div>
</div>
<div id='bottom'></div>
<script src='hosted.js'></script>
<script>
let pos = document.getElementById('pos'),
overlap = document.getElementById('overlap')
ib.setDefaultStyle()
ib.onConfigUpdate(config => {
pos.value = config.pos || 'bottom'
overlap.value = config.overlap || 'overlap'
})
const change = () => {
ib.set_config({
pos: pos.value,
overlap: overlap.value,
})
}
pos.addEventListener("change", change)
overlap.addEventListener("change", change)
</script>
</body>
</html>