-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrenderer.js
More file actions
34 lines (28 loc) · 934 Bytes
/
renderer.js
File metadata and controls
34 lines (28 loc) · 934 Bytes
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
const switch_html = document.getElementById("switch-round");
const test = document.getElementById("slider-round")
const notification = document.getElementById("alert-container");
const token = document.getElementById("token-input")
console.log(switch_html)
switch_html.addEventListener('change', function() {
if (this.checked) {
console.log("test")
RPCStatus.login(token.value)
token.disabled = true
} else {
console.log("test2")
RPCStatus.logout()
token.disabled = false
}
});
test.addEventListener('mouseenter', function() {
if (switch_html.disabled == true) {
console.log(test.style.cursor)
test.style.cursor = "not-allowed";
}
})
function changeSwitchState(state) {
console.log("Switch changing")
switch_html.disabled = !switch_html.disabled
notification.hidden = !notification.hidden
}
RPCStatus.SwitchState(changeSwitchState)