Apply stackoverflow dark theme without login
当前为
// ==UserScript==
// @name Dark Theme Stackoverflow
// @description Apply stackoverflow dark theme without login
// @version 0.1
// @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/tampermonkey-collection
// @license GNU GPLv3
// ==/UserScript==
(function () {
"use strict";
new MutationObserver((_, observer) => {
if (document.body) {
document.body.classList.add("theme-dark");
observer.disconnect();
}
}).observe(document.documentElement, { subtree: true, childList: true });
})();