From 6bae5e694056d19c718c2906181ba1763ac2dcb7 Mon Sep 17 00:00:00 2001 From: FURK4NGG <105324908+FURK4NGG@users.noreply.github.com> Date: Tue, 25 Feb 2025 11:14:06 +0300 Subject: [PATCH] Update 1.js --- JAVASCRIPT/1.js | 86 +++++++++++++++++++++++++------------------------ 1 file changed, 44 insertions(+), 42 deletions(-) diff --git a/JAVASCRIPT/1.js b/JAVASCRIPT/1.js index ed8150c..e23fa76 100644 --- a/JAVASCRIPT/1.js +++ b/JAVASCRIPT/1.js @@ -1,46 +1,48 @@ /*LOCATION SAVER*/ -let clickCount = 0; -const container = document.getElementById("container_4"); - -container.addEventListener("click", () => { - clickCount++; - - if (clickCount === 4) { - navigator.clipboard.writeText("asdasd").then(() => { - showGlitchMessage(); - }); - - clickCount = 0; - } -}); - -function showGlitchMessage() { - const message = document.createElement("div"); - message.innerText = "!!! ERROR: System Corrupted !!!"; - message.style.position = "fixed"; - message.style.top = "50%"; - message.style.left = "50%"; - message.style.transform = "translate(-50%, -50%)"; - message.style.background = "black"; - message.style.color = "red"; - message.style.fontSize = "24px"; - message.style.padding = "20px"; - message.style.border = "2px solid red"; - message.style.fontFamily = "monospace"; - message.style.zIndex = "9999"; - - document.body.appendChild(message); - - // Titreme efekti - let interval = setInterval(() => { - message.style.transform = `translate(-50%, -50%) rotate(${Math.random() * 4 - 2}deg)`; - }, 100); - - // 3 saniye sonra mesajı sil - setTimeout(() => { - clearInterval(interval); - message.remove(); - }, 3000); +let clickCount = 0; +const container = document.getElementById("container_4"); + +container.addEventListener("click", () => { + clickCount++; + + if (clickCount === 4) { + navigator.clipboard.writeText("asdasd").then(() => { + showNotification(); + }); + + clickCount = 0; + } +}); + +function showNotification() { + const notification = document.createElement("div"); + notification.innerText = "🤫 Bir şeyler kopyalandı ama sessiz ol..."; + notification.style.position = "fixed"; + notification.style.bottom = "-60px"; // İlk başta aşağıda + notification.style.left = "50%"; + notification.style.transform = "translateX(-50%)"; + notification.style.background = "#333"; + notification.style.color = "#fff"; + notification.style.padding = "12px 24px"; + notification.style.borderRadius = "20px"; // Kenarları oval + notification.style.boxShadow = "0 4px 6px rgba(0, 0, 0, 0.1)"; + notification.style.transition = "bottom 0.5s ease-in-out"; + notification.style.zIndex = "9999"; + + document.body.appendChild(notification); + + // Bildirimi yukarı kaydır + setTimeout(() => { + notification.style.bottom = "20px"; + }, 100); + + // 2 saniye sonra aşağı kaydır ve sil + setTimeout(() => { + notification.style.bottom = "-60px"; + setTimeout(() => { + notification.remove(); + }, 500); + }, 2000); }