Update 1.js

This commit is contained in:
FURK4NGG
2025-02-24 11:02:52 +03:00
committed by GitHub
parent 2ad3b31436
commit 0d6e53efac
+18 -18
View File
@@ -385,24 +385,24 @@ function animateCircles() {
animateCircles();
const themeMetaTag = document.querySelector('meta[name="theme-color"]');
function updateThemeColor() {
if (document.body.classList.contains("darkmode--activated")) {
themeMetaTag.setAttribute("content", "#100f2c"); // Karanlık Mod Rengi
} else {
themeMetaTag.setAttribute("content", "#000000"); // Açık Mod Rengi
}
}
// Dark mode butonu oluştur ve çalıştır
const darkmode = new Darkmode(options);
darkmode.showWidget();
// Dark mode değiştiğinde theme color'ı güncelle
document.addEventListener("DOMContentLoaded", updateThemeColor);
document.addEventListener("click", () => {
setTimeout(updateThemeColor, 100); // Dark mode animasyonu için küçük gecikme
const themeMetaTag = document.querySelector('meta[name="theme-color"]');
function updateThemeColor() {
if (darkmode.isActivated()) {
themeMetaTag.setAttribute("content", "#000000"); // Dark mode aktifken siyah renk
} else {
themeMetaTag.setAttribute("content", "#100f2c"); // Açık modda farklı renk
}
}
// Dark mode butonu oluştur ve çalıştır
const darkmode = new Darkmode(options);
darkmode.showWidget();
// Dark mode değiştiğinde theme color'ı güncelle
document.addEventListener("DOMContentLoaded", updateThemeColor);
document.addEventListener("click", () => {
setTimeout(updateThemeColor, 100); // Dark mode animasyonu için küçük gecikme
});