User:Madly Happy/common.css

From Baka-Tsuki
Revision as of 07:46, 19 October 2015 by Madly Happy (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
// ==UserScript==
// @name          baka-tsuki NIGHT (dark)
// @namespace     http://userstyles.org
// @description	  A simple dark theme for Baka-tsuki
// @author        ARH
// @homepage      https://userstyles.org/styles/109013
// @include       http://baka-tsuki.org/*
// @include       https://baka-tsuki.org/*
// @include       http://*.baka-tsuki.org/*
// @include       https://*.baka-tsuki.org/*
// @run-at        document-start
// @version       0.20150205004849
// ==/UserScript==
(function() {var css = [
	"/*!========================================\\\\",
	"|| Dark Baka-Tsuki                         ||",
	"||-----------------------------------------||",
	"|| Created by ARH                          ||",
	"||-----------------------------------------||",
	"|| Comment Template by MIMIC-Project       ||",
	"||-----------------------------------------||",
	"|| A simple dark theme for Baka-tsuki      ||",
	"|| Especially usefull when reading at night||",
	"||-----------------------------------------||",
	"|| ver 1.0b (dark)                        ||",
	"\\\\----------------------------------------!*/",
	"",
	"  ",
	"  div#content, div#simpleSearch, input, button, pre {",
	"    background-color: #000000 !important;",
	"  }",
	"  ",
	"  body, div#toc, th, div#mw-page-base, div#catlinks, div.mw-content-ltr#mw-content-text > div:first-of-type {",
	"    background-color: #222222 !important;",
	"  }",
	"  ",
	"  ul, li, td, tr, table, div.thumb {",
	"    background-color: inherit !important;",
	"  }",
	"  ",
	"  div#mw-page-base, span, ul, li {",
	"    background-image: none !important;",
	"  }",
	"  ",
	"  h1, h2, h3, h4, h5, h6, div#content, input, button, pre {",
	"    color: #DDDDDD !important;",
	"  }",
	"  ",
	"  a {",
	"    color: #aaaaff !important;",
	"  }",
	"  ",
	"  a:visited {",
	"    color: #ffaaff !important;",
	"  }",
	"  ",
	"  a.external {",
	"    color: #aaffaa !important;",
	"  }",
	"  ",
	"  a.new {",
	"    color: red !important;",
	"  }"
].join("\n");
if (typeof GM_addStyle != "undefined") {
	GM_addStyle(css);
} else if (typeof PRO_addStyle != "undefined") {
	PRO_addStyle(css);
} else if (typeof addStyle != "undefined") {
	addStyle(css);
} else {
	var node = document.createElement("style");
	node.type = "text/css";
	node.appendChild(document.createTextNode(css));
	var heads = document.getElementsByTagName("head");
	if (heads.length > 0) {
		heads[0].appendChild(node); 
	} else {
		// no head yet, stick it whereever
		document.documentElement.appendChild(node);
	}
}
})();