Skip to content

Commit e85f3d0

Browse files
committed
add a reset button and fix the endpoint textbox value population
1 parent dd1123e commit e85f3d0

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
package co.thkp.meetingstatusindicator
2+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package co.thkp.meetingstatusindicator.data
2+
3+
class DatabaseProvider {
4+
}

chrome_extension/popup.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
<body>
66
<input type="text" id="endpoint">
77
<button id="setEndpoint">Set Endpoint</button>
8+
<button id="reset">Reset Tabs</button>
89
<script src="popup.js"></script>
910
</body>
10-
</html>
11+
</html>
12+

chrome_extension/popup.js

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
11
let setEndpoint = document.getElementById('setEndpoint');
22
let endpointElement = document.getElementById('endpoint');
3+
let resetTabs = document.getElementById('reset');
4+
35

46
setEndpoint.onclick = () => {
57
let endpoint = endpointElement.value;
68
chrome.storage.local.set({endpoint: endpoint});
79
};
810

11+
resetTabs.onclick = () => {
12+
chrome.storage.local.get(null, (data)=>{
13+
if (data && data.hangouts) {
14+
chrome.storage.local.set({hangouts: []});
15+
}
16+
})
17+
}
18+
919
chrome.storage.local.get(null, (data)=>{
1020
if (data && data.endpoint) {
11-
endpointElement.innerText = data.endpoint;
21+
endpointElement.value = data.endpoint;
1222
}
1323
})

0 commit comments

Comments
 (0)