Created
January 2, 2022 03:21
-
-
Save rxb/5a8494a740eee34bf2e3452bdf9ce1a4 to your computer and use it in GitHub Desktop.
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 hacker_news_readable | |
// @namespace work.rgb | |
// @include https://news.ycombinator.com/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
function addGlobalStyle(css) { | |
var head, style; | |
head = document.getElementsByTagName('head')[0]; | |
if (!head) { return; } | |
style = document.createElement('style'); | |
style.type = 'text/css'; | |
style.innerHTML = css; | |
head.appendChild(style); | |
} | |
addGlobalStyle('body, html { padding: 0; margin: 0; }'); | |
addGlobalStyle('body, html, .comment, .title {line-height: 1.5; font-size: 16px; font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial, sans-serif;}'); | |
addGlobalStyle('.subtext {line-height: 1.5; font-size: 13px; font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial, sans-serif;}'); | |
addGlobalStyle('.itemlist .subtext > a:last-child {color: black; font-weight: 500}'); | |
addGlobalStyle('.itemlist .spacer {height: 16px!important;}'); | |
addGlobalStyle('#hnmain {width: 100%;}'); | |
addGlobalStyle('.itemlist {margin: 16px 16px;}'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment