NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript==
// @name Hacker News Text Tweaks
// @namespace http://openuserjs.org/users/kennethrapp
// @copyright 2018, kennethrapp (https://openuserjs.org/users/kennethrapp)
// @license MIT
// @version 1.0
// @description Text enhancements for Hacker News
// @author kenneth rapp
// @match https://news.ycombinator.com/*
// @grant none
// ==/UserScript==
(function () {
'use strict';
aeach(function (comment) {
// unfade all comments
comment.firstElementChild.setAttribute("class", "c00");
// highlight inline replies
var regex = new RegExp('>>(.+?)<', 'gim');
comment.innerHTML = comment.innerHTML.replace(regex, '><font color="#195708">>$1</font><');
// tweak the css a smidge
comment.setAttribute("style", "line-height:150%;text-align: justify;text-justify: inter-word;position:relative;display:inherit;padding-right:3em;padding-left:1em");
}, allof('comment'));
})();