2 reviews
Review written by timecube22 - see all my reviews (1)
From http://www.reddit.com/r/javascript/comments/9dn...
--
// ==UserScript==
// @name Reddit Up/Down CSS
// @namespace tritelife
// @include http://*.reddit.com/*/comments/*
// ==/UserScript==
var $ = unsafeWindow.jQuery;
$.getJSON(location.href+".json",null,function(r){
var css = [];
var searcher = function(comments) {
comments.forEach(function(comment){
css.push(['.comment.id-t1_',comment.data.id,' > div > div > p.tagline:after,.comment.id-t1_',comment.data.id,' > div > .collapsed:after{font-style:normal;content:\'(',comment.data.ups,' upvote',(comment.data.ups==1 ? '':'s'),', '+comment.data.downs,' downvote',(comment.data.downs===1 ? '':'s'),')\'}'].join(''));
if(typeof(comment.data.replies) === 'object') searcher(comment.data.replies.data.children);
});
};
searcher(r[1].data.children);
GM_addStyle(css.join(''));
});
This script displays the up and down scores neatly and much faster than reddit commentoversy.
Very good script, highly recommended!
