-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
67 lines (59 loc) · 2.01 KB
/
Copy pathapp.js
File metadata and controls
67 lines (59 loc) · 2.01 KB
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
// Selectors
const password_input = document.getElementById("password");
const signup_password_input = document.getElementById("s-password");
const repeat_password_input = document.getElementById("r-password");
const vispass = document.getElementById("vispass");
const login = document.getElementById("login");
const signup = document.getElementById("signup");
const privacy = document.getElementById("accespt");
const btn_signup = document.getElementById("btn-signup");
const btn_signup_disabled = document.getElementById("btn-signup-disable");
const btn_change_text = document.getElementById("btn-change-text");
const forget_pass = document.getElementById("forget-pass")
const visiblePassword = () => {
if(password_input.type == "password"){
password_input.type = "text";
repeat_password_input.type = "text";
signup_password_input.type = "text";
vispass.textContent = "Hide Password🔒🔑";
}
else{
password_input.type = "password";
repeat_password_input.type = "password";
signup_password_input.type = "password";
vispass.textContent = "Show Password🔒🔑";
}
}
const showSignup = () => {
login.style.display = "none";
signup.style.display = "flex";
}
const showLogin = () => {
signup.style.display = "none";
login.style.display = "flex";
forget_pass.style.display = "none";
}
const change = () => {
if(login.style.display == "flex"){
showSignup()
btn_change_text.textContent = "Login"
}
else{
showLogin()
btn_change_text.textContent = "SignUp";
}
}
const privacy_accespt = () => {
if(privacy.checked){
btn_signup.style.display = "block";
btn_signup_disabled.style.display = "none";
}
else{
btn_signup.style.display = "none";
btn_signup_disabled.style.display = "block";
}
}
const forgetPassword = () => {
login.style.display = "none";
forget_pass.style.display = "flex";
}