forked from snowsanta/snowsanta.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
26 lines (22 loc) · 837 Bytes
/
script.js
File metadata and controls
26 lines (22 loc) · 837 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
var back_cols = ["rgb(150,206,180)","rgb(255,238,173)"]
Array.from(document.getElementsByClassName("container")).forEach((div) => {
div.style.height = window.innerHeight + "px";
})
var load_flg = 0;
window.addEventListener('load', function(event){
if(screen.availWidth - window.innerWidth){
document.getElementById("max-note").style.opacity = "1";
load_flg = 1;
};
document.getElementById("preloader").classList.add("finish")
})
window.addEventListener('resize', function(event){
if((load_flg) && !(screen.availWidth - window.innerWidth)){
location.reload();
}
if(screen.availWidth - window.innerWidth){
document.getElementById("max-note").style.opacity = "1";
}else{
document.getElementById("max-note").style.opacity = "0";
};
})