User:Bravotwoxero/common.js

From Wikiquote
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)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
// ==UserScript==
// @name          Dark Wikipedia
// @namespace     http://userstyles.org
// @description	  Simple Gray Wikipedia theme. (It based on Wikipedia - Dark grey w/ nicer search box.)
// @author        nodaguti
// @homepage      https://userstyles.org/styles/42313
// @include       http://wikipedia.org/*
// @include       https://wikipedia.org/*
// @include       http://*.wikipedia.org/*
// @include       https://*.wikipedia.org/*
// @run-at        document-start
// @version       0.20120730101143
// ==/UserScript==
(function() {var css = [
	"@namespace url(http://www.w3.org/1999/xhtml);",
	"/* *** Basic *** */",
	"",
	"*{",
	"   background-color: transparent !important;",
	"   color: #bcbcbc !important;",
	"}",
	"",
	"body, div, form, table, tbody, tr, td, fieldset, ul, li, a,",
	"#content, #bodyContent{",
	"   background-color: #333 !important;",
	"   background-image: none !important;",
	"}",
	"",
	"",
	"/* *** Form Elements *** */",
	"input, select, button, checkbox{",
	"   -moz-appearance: none !important;",
	"   border: 1px white solid !important;",
	"   outline: none !important;",
	"   background-color: #333 !important;",
	"}",
	"",
	"#simpleSearch{",
	"   border: none !important;",
	"}",
	"",
	"",
	"/* *** Main *** */",
	"#content{",
	"   font-family: trebuchet, arial !important; ",
	"   font-size: 12pt !important;",
	"   border: 0 !important;",
	"}",
	"",
	"div#siteNotice{",
	"   display:none !important;",
	"}",
	"p{",
	"   border: none !important;",
	"}",
	"a{",
	"   color: lightgrey !important;",
	"}",
	"a:visited{",
	"   font-weight: bold !important;",
	"   opacity: 0.65 !important;",
	"}",
	"a:link{",
	"   color: white !important;",
	"}",
	"",
	"h2{",
	"   border-bottom: #ccc 1px solid !important;",
	"   font-size: 120% !important;",
	"}",
	"h2 > span{",
	"   color: white !important;",
	"}",
	"h2 > span > span{",
	"   color: white !important;",
	"   font-size: 100% !important;",
	"}",
	"",
	"fieldset{",
	"   border-color: #ddd !important;",
	"}",
	"",
	"#bodyContent ul{",
	"   list-style-image: none !important;",
	"   list-style-type: disc !important;",
	"}",
	"#toc ul{",
	"   list-style-type: none !important;",
	"}",
	"",
	".thumb{",
	"   border-color: #333 !important;",
	"}",
	"",
	"",
	"/* *** Tabs *** */",
	"#searchButton{",
	"   display: none !important;",
	"}",
	"",
	"div.vectorTabs,",
	"div.vectorTabs ul,",
	"div.vectorTabs ul > li,",
	"div.vectorTabs ul > li > a{",
	"   background-color: #333 !important;",
	"   background-image: none !important;",
	"   border: none !important;",
	"}",
	"",
	"#right-navigation > .vectorMenu,",
	"#ca-watch{",
	"   display: none !important;",
	"}",
	"",
	"div.vectorTabs ul > li > a > span{",
	"   padding: 0 !important;",
	"}",
	"div.vectorTabs ul > li > a{",
	"  outline: 1px #888 solid !important;",
	"  margin: 0 0.5em;",
	"  height: auto !important;",
	"  font-weight: normal !important;",
	"}",
	"div.vectorTabs ul > li > a:hover{",
	"   text-decoration: none !important;",
	"   outline: 1px #ccc solid !important;",
	"}",
	"",
	"",
	"/* *** Preference *** */",
	"#preftoc > li{",
	"   outline: 1px #ccc solid !important;",
	"   border-bottom: 5px #ccc solid !important;",
	"}",
	"",
	".successbox{",
	"   border-color: white !important;",
	"}",
	"",
	"",
	"/* *** Search *** */",
	"#search .search-types ul,",
	"#search .results-info ul{",
	"   list-style-type: none !important;",
	"}",
	"",
	"",
	"/* *** Logo Replacement *** */",
	"#p-logo a {",
	"   background: url(http://upload.wikimedia.org/wikipedia/en/b/bc/Wiki.png) no-repeat !important;",
	"   position: absolute !important;",
	"   clip: rect(0, 135px, 115px, 0) !important;",
	"   height: 115px !important;",
	"   overflow: hidden !important;",
	"   margin-top: 30px !important;",
	"}",
	"",
	"",
	"/* *** Image and Math *** */",
	"img{",
	"   background-color: #fdfdfd !important;",
	"}",
	"img.tex{",
	"   padding: 5px !important;",
	"}",
	"span.tex{",
	"   border: 1px white solid !important;",
	"   padding: 5px !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);
	}
}
})();