Dark Mode

5/15/2025, 3:06:18 PM

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name        Dark Mode
// @namespace   Violentmonkey Scripts
// @match       *://jav.guru/*
// @grant       none
// @version     1.0
// @author      -
// @description 5/15/2025, 3:06:18 PM
// ==/UserScript==

(function () {
    function addDarkClass() {
        if (!document.body.classList.contains("wp-night-mode-on")) {
            document.body.classList.add("wp-night-mode-on");
            console.log("[VM] wp-night-mode-on class added");
        }
    }

    // Wait until the DOM is ready and the body exists
    if (document.readyState === "loading") {
        document.addEventListener("DOMContentLoaded", addDarkClass);
    } else {
        addDarkClass();
    }

    // Also use MutationObserver in case body is changed or replaced
    const observer = new MutationObserver(() => {
        addDarkClass();
    });

    observer.observe(document.documentElement, { childList: true, subtree: true });
})();