Wikipedia: dark mode
Applies a tuned dark theme to Wikipedia for background, text, tables and code blocks.
Code to copy
(function () {
var ID = 'jz-wiki-dark';
if (document.getElementById(ID)) return;
var st = document.createElement('style');
st.id = ID;
st.textContent =
'body,#content,.mw-body,.mw-page-container{background:#1e1e24!important;color:#d4d4da!important}' +
'a{color:#7aa2f7!important}a:visited{color:#b083f0!important}' +
'.mw-parser-output table,.infobox,.navbox{background:#26262e!important;border-color:#3a3a44!important}' +
'h1,h2,h3,h4,#firstHeading{color:#e8e8ee!important;border-color:#3a3a44!important}' +
'pre,code{background:#2c2c34!important;color:#d4d4da!important}';
(document.head || document.documentElement).appendChild(st);
})();
How to use this example
- Copy the code with the button above.
- Install JustZix (2 minutes) and open the extension on the target page.
- Add a new rule matching that page.
- Paste the code into the rule's JavaScript panel and save — it runs on every page visit.
Rate this example
No ratings yet — be the first.