Dark Theme Stackoverflow

Apply Stack Overflow dark theme without login

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 Theme Stackoverflow
// @name:en            Dark Theme Stackoverflow
// @name:zh-CN         Dark Theme Stackoverflow
// @name:zh-TW         Dark Theme Stackoverflow
// @name:id            Dark Theme Stackoverflow
// @name:ja            Dark Theme Stackoverflow
// @name:ko            Dark Theme Stackoverflow
// @name:fr            Dark Theme Stackoverflow
// @name:es            Dark Theme Stackoverflow
// @name:de            Dark Theme Stackoverflow
// @name:ru            Dark Theme Stackoverflow
// @description        Apply Stack Overflow dark theme without login
// @description:en     Apply Stack Overflow dark theme without login
// @description:zh-CN  在未登录的情况下应用 Stack Overflow 暗黑主题
// @description:zh-TW  在未登入的情況下套用 Stack Overflow 深色主題
// @description:id     Terapkan tema gelap Stack Overflow tanpa login
// @description:ja     ログインせずに Stack Overflow のダークテーマを適用します
// @description:ko     로그인하지 않고 Stack Overflow 다크 테마를 적용합니다
// @description:fr     Appliquez le thème sombre de Stack Overflow sans vous connecter
// @description:es     Aplica el tema oscuro de Stack Overflow sin iniciar sesión
// @description:de     Wendet das Dark Theme von Stack Overflow ohne Anmeldung an
// @description:ru     Применяет тёмную тему Stack Overflow без входа в систему
// @version            0.3
// @run-at             document-start
// @match              https://*.stackoverflow.com/*
// @icon               https://stackoverflow.com/favicon.ico
// @author             Fznhq
// @namespace          https://github.com/fznhq
// @homepageURL        https://github.com/fznhq/userscript-collection
// @homepage           https://github.com/fznhq/userscript-collection
// @license            GNU GPLv3
// ==/UserScript==

(function () {
    "use strict";

    new MutationObserver((_, observer) => {
        if (document.body) {
            observer.disconnect();
            document.body.classList.add("theme-dark");
        }
    }).observe(document, { subtree: true, childList: true });
})();