Skip to content

Instantly share code, notes, and snippets.

@RuslanUC
Created February 27, 2026 18:10
Show Gist options
  • Select an option

  • Save RuslanUC/45faf2896d05e1c9b4d8edde893acfdb to your computer and use it in GitHub Desktop.

Select an option

Save RuslanUC/45faf2896d05e1c9b4d8edde893acfdb to your computer and use it in GitHub Desktop.
Tempermonkey userscript to enable dark theme on StackExchange websites by default
// ==UserScript==
// @name StackExchange dark theme
// @namespace http://tampermonkey.net/
// @version 2026-02-27
// @description Enable dark theme on StackExchange websites by default
// @author RuslanUC
// @match https://stackoverflow.com/*
// @match https://meta.stackoverflow.com/*
// @match https://askubuntu.com/*
// @match https://stackexchange.com/*
// @match https://*.stackexchange.com/*
// @match https://serverfault.com/*
// @match https://superuser.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=stackoverflow.com
// @grant none
// @run-at document-body
// ==/UserScript==
(function() {
'use strict';
document.body.classList.add("theme-dark");
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment