-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathscript.js
More file actions
42 lines (36 loc) · 1.67 KB
/
script.js
File metadata and controls
42 lines (36 loc) · 1.67 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
// const form = document.getElementById('login-form');
// const codeInput = document.getElementById('code');
// const submitBtn = document.getElementById('submit-btn');
// const resultDiv = document.getElementById('result');
// const secretCode = 'dukhi Aatma'; // Replace with your secret code
// const nextPageUrl = 'main.html'; // Replace with the URL of the new page
// form.addEventListener('submit', (e) => {
// e.preventDefault();
// const userInput = codeInput.value.trim();
// if (userInput === secretCode) {
// resultDiv.innerHTML = 'Yes, Thats My Baby';
// window.location.href = nextPageUrl; // Redirect to new page
// } else {
// resultDiv.innerHTML = 'Naa Tum meri baby nhi hoo kon hooo tum kaha hai meri Dukhi Aatma';
// }
// });
const form = document.getElementById('login-form');
const codeInput = document.getElementById('code');
const submitBtn = document.getElementById('submit-btn');
const resultDiv = document.getElementById('result');
// Multiple secret codes (case-insensitive)
const secretCodes = ['dukhi aatma', 'Baby', 'Meethi Rasmalai'];
const nextPageUrl = 'main.html'; // URL of the new page
// Ensure input is visible (not a password field)
codeInput.setAttribute('type', 'text');
form.addEventListener('submit', (e) => {
e.preventDefault();
const userInput = codeInput.value.trim().toLowerCase(); // Convert input to lowercase
// Convert all secret codes to lowercase and check
if (secretCodes.some(code => code.toLowerCase() === userInput)) {
resultDiv.innerHTML = 'Yes, Thats My Baby';
window.location.href = nextPageUrl; // Redirect to new page
} else {
resultDiv.innerHTML = 'Naa Tum meri baby nhi hoo kon hooo tum kaha hai meri Dukhi Aatma';
}
});