108 lines
1.5 KiB
JavaScript
108 lines
1.5 KiB
JavaScript
// ==UserScript==
|
|
// @name Style-HackerNews
|
|
// @namespace code.sitosis.com
|
|
// @version 1.0
|
|
// @description Style HackerNews
|
|
// @author rudism
|
|
// @match https://news.ycombinator.com/*
|
|
// @grant none
|
|
// @run-at document-end
|
|
// ==/UserScript==
|
|
|
|
function injectStyle(css) {
|
|
var style = document.createElement('style');
|
|
style.innerHTML = css;
|
|
var body = document.getElementsByTagName('body');
|
|
if(body.length > 0) {
|
|
body[0].appendChild(style);
|
|
}
|
|
}
|
|
|
|
(function () {
|
|
'use strict';
|
|
injectStyle(`
|
|
body {
|
|
background-color: #11111b;
|
|
}
|
|
|
|
.fatitem td {
|
|
color: #cdd6f4;
|
|
font-size: 12pt;
|
|
}
|
|
|
|
#hnmain {
|
|
background-color: #1e1e2e;
|
|
}
|
|
|
|
#hnmain td[bgcolor='#ff6600'] {
|
|
background-color: #89b4fa;
|
|
}
|
|
|
|
img[src='y18.gif'] {
|
|
filter: invert(100%);
|
|
}
|
|
|
|
#hnmain td[bgcolor='#ff6600'] a:link {
|
|
color: #11111b;
|
|
}
|
|
|
|
.comhead a:link,
|
|
.subtext a:visited,
|
|
.hnmore a:link,
|
|
a:visited {
|
|
color: #a6adc8;
|
|
}
|
|
|
|
a:link {
|
|
color: #cdd6f4;
|
|
}
|
|
|
|
a.titlelink:hover, a.storylink:hover {
|
|
color: #a6e3a1;
|
|
}
|
|
|
|
font[color='#3c963c'] {
|
|
color: #a6e3a1;
|
|
}
|
|
|
|
.c00,
|
|
.c00 a:link {
|
|
color: #cdd6f4;
|
|
}
|
|
|
|
.c5a,
|
|
.c5a a:link,
|
|
.c5a a:visited,
|
|
.c73,
|
|
.c73 a:link,
|
|
.c73 a:visited,
|
|
.c82,
|
|
.c82 a:link,
|
|
.c82 a:visited,
|
|
.c88,
|
|
.c88 a:link,
|
|
.c88 a:visited,
|
|
.c9c,
|
|
.c9c a:link,
|
|
.c9c a:visited,
|
|
.cae,
|
|
.cae a:link,
|
|
.cae a:visited,
|
|
.cbe,
|
|
.cbe a:link,
|
|
.cbe a:visited,
|
|
.cce,
|
|
.cce a:link,
|
|
.cce a:visited,
|
|
.cdd,
|
|
.cdd a:link,
|
|
.cdd a:visited {
|
|
color: #f38ba8;
|
|
}
|
|
|
|
.comment,
|
|
.title {
|
|
font-size: 12pt;
|
|
}`);
|
|
})();
|