Update 1.js
This commit is contained in:
@@ -384,6 +384,28 @@ function animateCircles() {
|
|||||||
|
|
||||||
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", "#ffffff"); // 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
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
/*DISABLE COPY-PASTE*/
|
/*DISABLE COPY-PASTE*/
|
||||||
const disabledKeys = ["c", "C", "x", "J", "u", "I"]; // keys that will be disabled
|
const disabledKeys = ["c", "C", "x", "J", "u", "I"]; // keys that will be disabled
|
||||||
const showAlert = e => {
|
const showAlert = e => {
|
||||||
|
|||||||
Reference in New Issue
Block a user