Dark Read The Docs

Dark theme for all "Read The Docs" websites.

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

You will need to install an extension such as Tampermonkey to install this script.

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name        Dark Read The Docs
// @version     1.3
// @namespace   Dark Read The Docs
// @include     *
// @grant       none
// @description Dark theme for all "Read The Docs" websites.
// ==/UserScript==
function addGlobalStyle(css) {
	var head,
		style;
	head = document.getElementsByTagName('head')[0];
	if (!head) {
		return;
	}
	style = document.createElement('style');
	style.type = 'text/css';
	style.innerHTML = css;
	head.appendChild(style);
}

var nodes = document.querySelectorAll(".rst-current-version");
if (nodes.length == 0) {
	return;
}
addGlobalStyle('html,body,.wy-nav-content,.highlight,.reference,.subnav,.n,.k,.ow,.wy-nav-content-wrap,.admonition\
{background:none#000!important;color:#bbb!important;text-shadow:none!important;}\
dt,.reference,.highlighted,.admonition-title{background:none#222!important;color:#bbb!important;text-shadow:none!important;}\
input,code\
{background:none#222!important;color:#ddd!important;text-shadow:none!important;}\
input { border:1px solid #00f!important;}\
{visibility: hidden}\
');