-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
38 lines (31 loc) · 1.06 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
37
const btn=document.getElementById("sub-button");
const access_button = document.getElementById("get-access-key")
var user='false';
btn.onclick = function () {
var passwd = document.getElementById('firstname').value;
if (passwd == "5043@infinitygreen"){
document.getElementById("login-form").style.display = 'none';
document.getElementById('locked_section').style.display= 'unset';
document.getElementById('extra-space').style.display= 'none';
user="true"
localStorage.setItem("user", user);
}
else {
alert('input invalid');
}
};
myfunction=function() {
var user_log=localStorage.getItem("user");
if (user_log=='true'){
document.getElementById("login-form").style.display = 'none';
document.getElementById('locked_section').style.display= 'unset';
document.getElementById('extra-space').style.display= 'none';
}
}
access_button.onclick =function(){
window.open("landing.html","_self");
}
window.onload = function() {
myfunction();
// console.log(user)
}