Created
April 6, 2011 04:48
-
-
Save dustingetz/905150 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| var oPosts = $('table td .title a'); | |
| oPosts.each(function(index, oPost){ | |
| var sTitle = oPost.innerHTML; | |
| var oScoreRow = $(oPost).parent().parent().next(); | |
| var sVotes = oScoreRow.find('span')[0].innerHTML; | |
| var sComments = oScoreRow.find('a')[1].innerHTML; | |
| var numComments = parseInt(sComments.split(' ')); | |
| var numVotes = parseInt(sVotes.split(' ')); | |
| var score = numVotes/numComments; | |
| //console.log(sTitle + ':::' + score); | |
| if (score < 2) $(oPost).css('color', 'red'); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment