-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
147 lines (109 loc) · 6.52 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
140
141
142
143
144
145
146
147
const selectL = document.getElementById("lang-select")
let language = document.getElementsByClassName("change-Languange")
const head = document.querySelector("#text")
let parag = document.querySelector("p")
let head5 = document.querySelector("h5")
let login = document.querySelector("#login")
const btnSign = document.getElementById("btn-sign")
let hindi = document.getElementById("Hindi")
let bigHead = document.getElementById("text")
let error = document.getElementById("error")
let email = document.getElementById("login")
let btn = document.querySelector(".btn-submit")
let Enjoy = document.querySelector(".EnjoyH1")
let EnjoyP1 = document.querySelector(".paraa-1")
let stranger = document.querySelector(".load-text")
let strangerLoading = document.querySelector(".loading")
let EnjoyP2 = document.querySelector(".Enjoy-2")
let PTwo = document.querySelector(".paraa-2")
let EnjoyP3 = document.querySelector(".Enjoy-3")
let P3 = document.querySelector(".paraa-3")
let EnjoyP4 = document.querySelector(".Enjoy-4")
let P4 = document.querySelector(".paraa-four")
let askCont = document.querySelector(".ask")
let firstQ = document.querySelector(".first")
const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
let flag = true;
function validation() {
const userEmail = email.value;
if (emailRegex.test(userEmail)) {
alert(" ✅ Process done");
email.style.border = "1px solid grey";
email.value = "";
} else {
alert("Wrong ! email address");
email.style.border = "2px solid red";
email.value = "";
}
flag = false;
}
let lang = true;
selectL.addEventListener("change", changeLanguage);
function changeLanguage() {
if(selectL.value != "Hindi") {
btnSign.innerHTML = "साइन इन करे "
head.innerHTML = "अनलिमिटेड फ़िल्में, टीवी शो के साथ भी बहुत कुछ"
parag.innerHTML = "जहां चाहें देखें. जब चाहें कैंसल करें."
head5.innerHTML = "देखने के लिए तैयार हैं? अपनी मेंबरशिप बनाने या रीस्टार्ट करने के लिए अपना ईमेल एड्रेस डालें"
login.innerHTML = "ईमेल एड्रेस"
btn.innerHTML = "शुरू करे"
stranger.innerHTML = "अजनबी चीजें";
strangerLoading.innerHTML = "डाउनलोड हो रहा है"
Enjoy.innerHTML = "अपने टीवी पर आनंद लें"
askCont.innerHTML = "अक्सर पूछे जाने वाले प्रश्नों"
PTwo.innerHTML = "अपने पसंदीदा शो और फ़िल्में सेव करें, ताकि आप कभी भी इन्हें देख सकें."
EnjoyP3.innerHTML = "हर जगह देखें"
P3.innerHTML = "बिना ज़्यादा पेमेंट किए, अपने फ़ोन, टैबलेट, लैपटॉप और टीवी पर अनलिमिटेड फ़िल्में और टीवी शो स्ट्रीम करें."
EnjoyP4.innerHTML = "बच्चों के लिए प्रोफ़ाइल बनाएं"
P4.innerHTML = "बच्चों को अपने पसंदीदा किरदारों के साथ उस रोमांचक सफ़र पर जाने दें जो सिर्फ़ उनके लिए ही है - आपकी मेंबरशिप के साथ फ़्री."
EnjoyP1.innerHTML = "स्मार्ट टीवी, PlayStation, Xbox, Chromecast, Apple TV, Blu-ray प्लेयर के साथ ही दूसरे डिवाइस पर भी देखें.";
EnjoyP2.innerHTML = "ऑफ़लाइन देखने के लिए अपने शो डाउनलोड करें"
firstQ.innerHTML = "नेटफ्लिक्स क्या है?"
alert("Hindi Selected")
lang = false;
}
if (selectL.value == "English") {
alert("English selected");
changeToEnglish();
lang = true;
}
function changeToEnglish() {
btnSign.innerHTML = "Sign in";
head.innerHTML = "Unlimited movies, TV shows and more"
head5.innerHTML = "Ready to watch? Enter your email address to create or restart your membership.";
login.innerHTML = "Email address";
parag.innerHTML = "Watch anywhere. Cancel anytime.";
btn.innerHTML = "Get Started"
stranger.innerHTML = "Stranger Things"
strangerLoading.innerHTML = "Downloading..."
Enjoy.innerHTML = "Enjoy on your TV"
askCont.innerHTML = "Frequently Asked Questions"
EnjoyP3.innerHTML = "Watch everywhere"
P3.innerHTML = "Stream unlimited movies and TV shows on your phone, tablet, laptop, and TV."
EnjoyP4.innerHTML = "Create profiles for children."
P4.innerHTML = "Send children on adventures with their favourite characters in a space made just for them—free with your membership."
EnjoyP1.innerHTML = "ffffffffffWatch on smart TVs, PlayStation, Xbox, Chromecast, Apple TV, Blu-ray players and more.";
EnjoyP2.innerHTML = "Download your shows to watch offline"
PTwo.innerHTML = "Save your favourites easily and always have something to watch."
firstQ.innerHTML = "What is Netflix?"
}
}
let da = document.querySelectorAll(".ask-container")
let O = document.querySelector(".paragraph")
let plus = document.querySelector(".ask-fontPlus")
let displaying = true;
da.addEventListener("onclick", function() {
O.style.backgroundColor = "red";
})
function Hidden() {
if(displaying == true) {
// O.style.display = "block"
plus.style.transform = "rotate(145deg)"
displaying = false
}
else {
// O.style.display = "none"
plus.style.transform = "rotateX(0deg)"
displaying = true;
}
}