Skip to content

Instantly share code, notes, and snippets.

@1player
Created September 1, 2019 20:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 1player/85d146a4aa0c2afc78bab63582f518aa to your computer and use it in GitHub Desktop.
Save 1player/85d146a4aa0c2afc78bab63582f518aa to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Dark mode HN
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://news.ycombinator.com/*
// @grant GM_addStyle
// ==/UserScript==
(function() {
'use strict';
GM_addStyle(`
@media (prefers-color-scheme: dark) {
body {
background-color: black;
}
table#hnmain {
background-color: #333;
}
a:link, .c00, .c00 a:link {
color: #ddd;
}
.comhead a:link, .subtext, .subtext a:link, .subtext a:visited {
color: #999;
}
textarea {
background-color: #444;
color: white;
}
.pagetop a {
color: #000;
}
}
`);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment