-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathui.html
More file actions
59 lines (46 loc) · 1.14 KB
/
Copy pathui.html
File metadata and controls
59 lines (46 loc) · 1.14 KB
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
<style>
body {
margin: 0;
margin-top: 10px;
}
.button{
display: flex;
align-items: center;
width: 100%;
height: 32px;
font-family: Inter;
font-style: normal;
font-weight: normal;
font-size: 11px;
line-height: 16px;
padding-left: 10px;
}
.button:hover {
background-color: #F0F0F0;
cursor:pointer;
}
#clear{
margin-top: 41px;
border-top: 1px solid rgb(235, 235, 235);
color: #18A0FB;
}
</style>
<div class="button">🔴 Progress</div>
<div class="button">🟡 Review</div>
<div class="button">🟢 Done</div>
<div class="button" id="clear">Clear status</div>
</div>
<script>
var buttons = document.querySelectorAll(".button");
var changeStatus = function(e) {
const buttonName = e.target.innerText;
parent.postMessage({ pluginMessage: { type: 'change-status', buttonName} }, '*')
};
for (var i = 0, len = buttons.length; i < len; i++) {
buttons[i].addEventListener("click", changeStatus);
};
document.getElementById('clear').onclick = clearStatus;
function clearStatus(){
parent.postMessage({ pluginMessage: { type: 'clearStatus' } }, '*')
}
</script>