Update 1.js

This commit is contained in:
FURK4NGG
2025-03-01 07:43:56 +03:00
committed by GitHub
parent b4ae40e99b
commit 800623d819
+17 -2
View File
@@ -2,18 +2,33 @@
let clickCount = 0;
const container = document.getElementById("container_4");
// Fontu yükle ve bildirimi göster
function loadFontAndShowNotification() {
const font = new FontFace('Monomakh', 'url("/FONTS/Monomakh.woff2") format("woff2")');
font.load().then((loadedFont) => {
document.fonts.add(loadedFont);
showNotification();
}).catch((err) => {
console.error("Font yüklenirken hata oluştu:", err);
showNotification(); // Font yüklenmese bile bildirim gösterilsin
});
}
// Tıklama event'i
container.addEventListener("click", () => {
clickCount++;
if (clickCount === 4) {
navigator.clipboard.writeText("asdasd").then(() => {
showNotification();
loadFontAndShowNotification();
});
clickCount = 0;
clickCount = 0; // Sayaç sıfırla
}
});
// Bildirim fonksiyonu
function showNotification() {
const notification = document.createElement("div");
notification.innerText = "Copied to Clipboard";