Dark Theme for Official Minecraft Wiki

Dark theme for Official Minecraft Wiki pages - minecraft.gamepedia.com

当前为 2020-11-13 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Dark Theme for Official Minecraft Wiki
// @namespace    https://greasyfork.org/en/users/704811-wjatek
// @version      0.1
// @description  Dark theme for Official Minecraft Wiki pages - minecraft.gamepedia.com
// @author       wjatek
// @license      MIT
// @match        https://minecraft.gamepedia.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict'
    const styleEl = document.createElement('style')
    styleEl.innerText = `
        #content {
            background-color: #293033 !important;
        }

        #toc,
        #content .notaninfobox,
        #content .wikitable,
        #content .thumbinner
        {
            background-color: #313f4c !important;
        }

        #content .infobox-rows tr:nth-child(even) {
            background-color: #3f4c58 !important;
        }

        #content .wikitable > tr > th,
        #content .wikitable > * > tr > th,
        #content .loadbox-navbox,
        #catlinks,
        #content .navbox,
        #content .navbox th
        {
            background-color: #28333e !important;
        }

        #content .navbox table {
            background-color: #1f2831 !important;
        }

        #content .loadbox-navbox > p {
            background: none !important;
        }

        #content .msgbox {
            background: #696969 !important;
            border-width: 5px !important;
        }

        #content code {
            background: #131313 !important;
            border-color: #292929 !important;
        }

        #content .nbttree-inherited {
            background-color: #585858 !important;
            color: #cacaca !important;
        }

        #content p,
        #content h1,
        #content h2,
        #content h3,
        #content h4,
        #content h5,
        #content li,
        #content td,
        #content th,
        #content span,
        #content .thumbcaption,
        #content code,
        #content .hatnote,
        #content dd
        {
            color: #cacaca !important;
        }

        #content td {
            box-shadow: inset 0px 0px 0px 500px rgba(0,0,0,0.5);
        }

        #content a {
            color: #4082bb !important;
        }

        #content .msgbox a {
            color: #7eb7e8 !important;
        }
    `
    document.head.appendChild(styleEl)
})();