From 75f6f2050f0d28518fad91e9a99d9e41179a6e01 Mon Sep 17 00:00:00 2001 From: FURK4NGG <105324908+FURK4NGG@users.noreply.github.com> Date: Thu, 20 Feb 2025 18:34:22 +0300 Subject: [PATCH] Update 1.js --- JAVASCRIPT/1.js | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/JAVASCRIPT/1.js b/JAVASCRIPT/1.js index 05ac8ed..711116a 100644 --- a/JAVASCRIPT/1.js +++ b/JAVASCRIPT/1.js @@ -217,34 +217,7 @@ const options = { saveInCookies: true, // default: true, label: '◐', // default: '' autoMatchOsTheme: true // default: true -} - -function updateThemeColor() { - let themeColorMeta = document.querySelector('meta[name="theme-color"]'); - - if (!themeColorMeta) { - themeColorMeta = document.createElement('meta'); - themeColorMeta.setAttribute('name', 'theme-color'); - document.head.appendChild(themeColorMeta); - } - - if (darkmode.isActivated()) { - document.body.style.backgroundColor = "#100f2c"; // Arka plan siyah - themeColorMeta.setAttribute("content", "#100f2c"); // Tarayıcı rengi siyah - } else { - document.body.style.backgroundColor = "#fff"; // Açık moda dön - themeColorMeta.setAttribute("content", "#fff"); // Tarayıcı rengi beyaz - } -} - -// Sayfa açıldığında ve toggle butonuna basıldığında güncelle -updateThemeColor(); - -document.addEventListener("click", function(event) { - if (event.target.classList.contains("darkmode-toggle")) { - setTimeout(updateThemeColor, 500); // Butona basılınca 0.5s gecikmeli güncelle - } -}); +} /*GALLERY IMAGES*/