-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapp_func.js
77 lines (68 loc) · 2.15 KB
/
app_func.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
window.onload = function()
{
document.getElementById("main_content").innerHTML =
document.getElementById("hidden_home").innerHTML;
}
var resultEnabled = false;
function home()
{
document.getElementById("main_content").innerHTML =
document.getElementById("hidden_home").innerHTML;
if(resultEnabled)
{
document.getElementById("main_content_container").style.height = '300%';
document.getElementById("result_area").style.height = '33.33%';
document.getElementById("input_area").style.height = '33.33%';
document.getElementById("introduction_area").style.height = '33.33%';
}
else
{
document.getElementById("main_content_container").style.height = '200%';
document.getElementById("result_area").style.height = '0%';
document.getElementById("input_area").style.height = '50%';
document.getElementById("introduction_area").style.height = '50%';
}
}
function help()
{
if(resultEnabled)
{
document.getElementById("hidden_home").innerHTML =
document.getElementById("main_content").innerHTML;
}
document.getElementById("main_content").innerHTML =
document.getElementById("hidden_help").innerHTML;
}
function about()
{
if(resultEnabled)
{
document.getElementById("hidden_home").innerHTML =
document.getElementById("main_content").innerHTML;
}
document.getElementById("main_content").innerHTML =
document.getElementById("hidden_about").innerHTML;
}
function hide_intro_button()
{
var element = document.getElementById("intro_button");
if(element != undefined) {
element.parentNode.removeChild(element);
}
}
function go_to_input()
{
window.scroll({top:1100,left:0,behavior:'smooth'});
hide_intro_button();
}
function enable_result()
{
resultEnabled = true;
hide_intro_button();
document.getElementById("main_content_container").style.height = '300%';
document.getElementById("result_area").style.height = '33.3%';
document.getElementById("input_area").style.height = '33.3%';
document.getElementById("introduction_area").style.height = '33.3%';
document.getElementById("result_area").innerHTML = hidden_result.innerHTML;
window.scroll({top:2000,left:0,behavior:'smooth'});
}