-
Notifications
You must be signed in to change notification settings - Fork 2
/
script.js
36 lines (28 loc) · 1.33 KB
/
script.js
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
document.addEventListener('DOMContentLoaded', function() {
document.getElementById('cog').addEventListener("click", show_settings);
document.getElementById('back').addEventListener("click", hide_settings);
document.getElementById('tracker').addEventListener("click", show_preview);
document.getElementById('saveApplication').addEventListener("click", hide_preview);
})
function show_settings() {
document.getElementById("email").value = localStorage.getItem("janus-email");
document.getElementById("settings_page").style.display="block";
document.getElementById("index").style.display="none";
}
function hide_settings() {
document.getElementById("index").style.display="inline";
document.getElementById("settings_page").style.display="none";
}
function saveEmail() {
localStorage.setItem("janus-email", document.getElementById("email").value);
}
document.getElementById("saveEmail").addEventListener("click", saveEmail);
function show_preview() {
document.getElementById("data_preview").style.display="block";
document.getElementById("index").style.display="none";
}
function hide_preview() {
document.getElementById("data_preview").style.display="none";
document.getElementById("index").style.display="block";
document.getElementById("success-alert").style.display="block";
}