Last active
August 15, 2023 02:58
-
-
Save techygrrrl/d62f05669bd8cea660cf80b344579d64 to your computer and use it in GitHub Desktop.
Dark mode for the Twitch Dev docs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Twitch Dev Dark Mode | |
// @match https://dev.twitch.tv/docs/* | |
// @match https://dev.twitch.com/docs/* | |
// @grant none | |
// @version 1.0 | |
// @icon https://i.imgur.com/nEGAZMA.png | |
// @description Dark Mode for Twitch Dev | |
// ==/UserScript== | |
var css = ` | |
html { | |
font-size: 120%; | |
color-scheme: dark; | |
} | |
body { | |
color: #ddd; | |
background-color: #222 !important; | |
} | |
.main { | |
border-color: rgba(255, 255, 255, 0.1) !important; | |
} | |
a { | |
color: #A262FF !important; | |
text-decoration: none; | |
} | |
a:hover | |
{ | |
color: #9145FF !important; | |
text-decoration: underline; | |
} | |
.b, div, th { | |
color: #fff !important; | |
} | |
div { | |
background: transparent !important; | |
} | |
table tr:nth-child(odd) { | |
background: rgba(255, 255, 255, 0.1); | |
} | |
table th, table td, h2, header .sidebar dl { | |
border-color: rgba(255, 255, 255, 0.1); | |
} | |
table thead + tbody tr:nth-child(even) { | |
background: rgba(255, 255, 255, 0.05); | |
} | |
header .sidebar dl dt a:hover { | |
background: rgba(255, 255, 255, 0.05); | |
} | |
header .sidebar dl dt.search input { | |
background: transparent; | |
} | |
header .sidebar dl dt.search input:focus { | |
background: rgba(255, 255, 255, 0.1); | |
} | |
header .sidebar dl dt.search .search-icon svg path { | |
fill: #fff; | |
} | |
.left-docs pre, .text-content pre { | |
background: #2b2b2b !important; | |
border-color: rgba(255, 255, 255, 0.1); | |
} | |
code { | |
background: #2b2b2b !important; | |
} | |
.right-code code { | |
background: transparent !important; | |
} | |
.nav__container .nav__links a { | |
color: #fff !important; | |
} | |
.nav__container .nav__links a:hover { | |
color: #fff !important; | |
} | |
.doc-content { | |
background: transparent; | |
} | |
pre:not(.right-code) > code .s1, | |
pre:not(.right-code) > code .s2 { | |
color: #EBEF15; | |
} | |
pre:not(.right-code) > code .nt { | |
color: #15AEEF; | |
} | |
pre:not(.right-code) > code .mi { | |
color: #B596F8; | |
} | |
pre:not(.right-code) > code .kc { | |
color: #EF15BF; | |
} | |
` | |
var style = document.createElement('style') | |
style.innerHTML = css | |
document.head.appendChild(style) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment