-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
139 lines (116 loc) · 4.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
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
const clipboard1 = document.querySelector(".clipboard1");
const clipboard2 = document.querySelector(".clipboard2");
const copyText1 = document.getElementById("copy1");
const copyText2 = document.getElementById("copy2");
const createDiv = document.querySelector(".create");
const gooleDiv = document.querySelector(".google");
const forgetDiv = document.querySelector(".forget");
// copy function
const copyFunction = (copyText) => {
copyText.select();
copyText.setSelectionRange(0, 99999);
navigator.clipboard.writeText(copyText.value);
}
// toast alert function
const toastAlert = document.querySelector(".toastAlert");
const toastAlertFunction = () => {
toastAlert.style.transform = `translateY(20px)`;
setTimeout(() => {
toastAlert.style.transform = `translateY(${-(toastAlert.offsetHeight)-20}px)`
}, 3000)
}
clipboard1.addEventListener("click", () => {
toastAlert.textContent = "copied text!"
copyFunction(copyText1);
toastAlertFunction();
})
clipboard2.addEventListener("click", () => {
toastAlert.textContent = "copied text!"
copyFunction(copyText2);
toastAlertFunction();
})
gooleDiv.addEventListener("click", () => {
toastAlert.textContent = "stay tuned for update!"
toastAlertFunction();
})
forgetDiv.addEventListener("click", () => {
toastAlert.textContent = "stay tuned for update!"
toastAlertFunction();
})
createDiv.addEventListener("click", () => {
toastAlert.textContent = "stay tuned for update!"
toastAlertFunction();
})
// cokkie function
const cookie = document.querySelector(".cookie");
document.querySelector(".cookieDecline").addEventListener("click", () => {
cookie.style.opacity = "0";
})
document.querySelector(".cookieAccept").addEventListener("click", () => {
localStorage.setItem("accepted" , 1)
cookie.style.opacity = "0";
})
addEventListener("load", () => {
setTimeout(() => {
localStorageFunction();
}, 3000)
})
const localStorageFunction = () => {
if(localStorage.getItem("accepted") == 1) {
return;
} else {
cookie.style.opacity = "1";
parent.style.opavity = "0.1";
}
}
// valitation
const userNameDiv = document.querySelector(".userNameValitate");
const passwordDiv = document.querySelector(".passwordValitate");
const loginBtn = document.querySelector(".loginBtn");
const page1 = document.querySelector(".page1");
const valitation = () => {
if(userNameDiv.value === "lazyboi" && passwordDiv.value === "hellolazyboies2001") {
toastAlert.textContent = "login success!"
toastAlertFunction();
page1.click();
}else {
toastAlert.textContent = "invalid credential!"
toastAlertFunction();
}
}
loginBtn.addEventListener("click", () => {
intervalId = setInterval(() => {
loaderFunction();
}, 200)
setTimeout(() => {
valitation();
}, 2000)
});
//aboutUs
const aboutUsDiv = document.querySelector(".aboutUsContainer");
const aboutUsTitle = `<div class="aboutUsText col-12 col-md-12 col-lg-6">
<h5> The Most Powerful Way to Connect with Every Audience.<h5>
<h6>
Whether you want to motivate or train team members,
sell products or services, or entertain and inform
subscribers, video does it best. And Brightcove provides
you with the most reliable, scalable, and secure platform
to deliver it on. Since 2004, our technology has helped
customers all over the world harness the incredible power
of video we have even won two Technology and Engineering Emmy Awards for it.
</h6>
</div>`;
const aboutUsTitle2 = `
<div class="aboutUsText col-12 col-md-12 col-lg-6">
<h5> The Most Powerful Way to Connect with Every Audience.<h5>
<h6>
Whether you want to motivate or train team members,
sell products or services, or entertain and inform
subscribers, video does it best. And Brightcove provides
you with the most reliable, scalable, and secure platform
to deliver it on. Since 2004, our technology has helped
customers all over the world harness the incredible power
of video we have even won two Technology and Engineering Emmy Awards for it.
</h6>
</div>`;
aboutUsDiv.innerHTML += aboutUsTitle + aboutUsTitle2;