User:Jaminux/common.js: Difference between revisions

From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to navigationJump to search
(Created page with "// ==UserScript== // @name Bulbapedia Dark Mode // @namespace http://userstyles.org // @description A dark mode I cobbled together because there wasn't any othe...")
 
(Blanked the page)
Tag: Blanking
 
Line 1: Line 1:
// ==UserScript==
 
// @name          Bulbapedia Dark Mode
// @namespace    http://userstyles.org
// @description   A dark mode I cobbled together because there wasn't any other. If you find anything that looks horrible, comment about it and I might make it better.
// @author        Gus Johnnson
// @homepage      https://userstyles.org/styles/174696
// @include      https://bulbapedia.bulbagarden.net/*
// @run-at        document-start
// @version      0.20190825021557
// ==/UserScript==
(function() {var css = [
"h1, h2, h3, h4, h5, h6, h7, h8 {",
"    color: #ccc !important;",
"}",
"body, #content, #toc, .tocnumber, tr, td, tbody, table, th, .roundy, ul, #catlinks, #footer {",
"    background-color: #111 !important;",
"    color: #ccc !important;",
"}",
".roundy, .thumbinner {",
"    background-color: #333 !important;",
"}",
"div>h3, #localNotice, .noticebar {",
"    color: #444 !important;",
"}",
"a>span {",
"    color: #ccc !important;",
"}",
"/* unvisited link */",
" a:link {",
"    color: #2d7eff !important;",
"}",
"/* visited link */",
" a:visited {",
"    color: #915eff !important;",
"}",
"/* mouse over link */",
" a:hover {",
"    color: white !important;",
"    background-color: #888 !important;",
"}",
"/* selected link */",
" a:active {",
"    color: gray !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);
}
}
})();

Latest revision as of 21:20, 3 April 2023