diff options
| author | jaerri <62021987+jaerri@users.noreply.github.com> | 2026-02-10 16:25:21 -0600 |
|---|---|---|
| committer | jaerri <62021987+jaerri@users.noreply.github.com> | 2026-02-10 16:25:21 -0600 |
| commit | eb62cf70a6791e5c8fd140f069e8b31b6886587a (patch) | |
| tree | ffa1abfb12e27708907b3c18d10ee6336da3a36e /script.js | |
Diffstat (limited to 'script.js')
| -rwxr-xr-x | script.js | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/script.js b/script.js new file mode 100755 index 0000000..19b17a6 --- /dev/null +++ b/script.js @@ -0,0 +1,60 @@ +const unlockPhrases = ['irene', 'tien', 'zee', 'ren'];
+const inputField = document.getElementById('password');
+const lockscreen = document.getElementById('lockscreen');
+const mainpage = document.getElementById('main-page');
+const audio = document.querySelector('audio');
+if(inputField){
+ if (sessionStorage.getItem('unlocked') === 'true') {
+ lockscreen.style.display = 'none';
+ mainpage.style.zIndex = '1';
+ }
+ inputField.addEventListener('input', () => {
+ const typedInput = inputField.value.toLowerCase();
+
+ if (unlockPhrases.some(phrase => typedInput.includes(phrase))) {
+ sessionStorage.setItem('unlocked', 'true');
+ lockscreen.style.transition = 'opacity 0.5s ease-out';
+ lockscreen.style.opacity = '0';
+ setTimeout(() => {
+ lockscreen.remove();
+ mainpage.style.zIndex = '1';
+ }, 500);
+ audio.volume = 0;
+ audio.play();
+
+ const fadeIn = setInterval(() => {
+ if (audio.volume < 0.2) {
+ audio.volume += 0.005;
+ } else {
+ clearInterval(fadeIn);
+ }
+ }, 100);
+ }
+
+ if (typedInput.length > 20) inputField.value = '';
+ });
+
+}
+const thankLetterContainer = document.getElementById('thank-letter-container');
+const iloveirene = document.getElementById("lockscreen-container");
+const pawImage = document.getElementById("paw-lockscreen-image");
+if (pawImage) {
+ pawImage.addEventListener("click", () => {
+ console.log("Paw clicked");
+ pawImage.style.transition = 'all 0.7s ease-out';
+ pawImage.style.height = '300px';
+
+ setTimeout(() => {
+ iloveirene.style.transition = 'opacity 0.7s ease-out';
+ iloveirene.style.opacity = '0';
+ pawImage.style.opacity = '0';
+
+ setTimeout(() => {
+ iloveirene.remove();
+ pawImage.remove();
+ thankLetterContainer.style.display = 'flex';
+ }, 700);
+ }, 700);
+
+ });
+}
|
