Archive of Our Own: Dark Mode

A dark mode for users without an account.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Archive of Our Own: Dark Mode
// @version      0.11
// @description  A dark mode for users without an account.
// @match        https://archiveofourown.org/*
// @match        http://archiveofourown.org/*
// @author       Felix G. "Automalix"
// @namespace    https://greasyfork.org/en/users/322117
// @run-at       document-start
// ==/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)}

addGlobalStyle('body, .listbox > .heading, .listbox .heading a:visited, .filters .expander {color:#EEE} a, a:link, a:visited:hover {color:#EEEEEE} a:visited {color:#DDDDDD}'
               +'a.tag {color:#EFEFEF} #modal {border:10px solid #000; background:#222} li.relationships a {background:#000}'
               +'#symbols-key, .account.module, .work {background-color:#222 !important;}'
               +'#header {background:#101010} #footer{border:none} #new_work_search, #outer, #main {background:#101010}'
               +'.wrapper {box-shadow: 1px 1px 5px #202020;} .work.meta.group {background: #121212; border:1px solid #111}'
               +'fieldset, .listbox, fieldset fieldset.listbox {background-color:#222; box-shadow: inset 1px 0 5px #202020; border: 2px solid #000000}'
               +'.listbox .index {background:#333; box-shadow:inset 1px 1px 3px #222}'
               +'.actions a, .actions a:link, .action, .action:link, .actions input, input[type="submit"], button, .current, .actions label{background-image:none; background:#666;'
               +'color:#FFF; border:none} #site_search {background:#000} form.verbose legend, .verbose form legend {background:#121212; border:2px solid #000; box-shadow:none}'
               +'#admin-banner {display:none}');