Skip to content

Instantly share code, notes, and snippets.

View RaghavSood's full-sized avatar

Raghav Sood RaghavSood

View GitHub Profile
var candidates = $( ".vote-count-post" ).map(function() {
var score, name, reputation, helpfulFlags,
postEl, repEl;
score = Math.max( +$( this ).text(), 1 );
postEl = $( this ).closest( "tr" );
postHeight = postEl.find( ".post-text" ).height();
name = postEl.find( ".user-details a" ).text();
repEl = postEl.find( ".user-details .reputation-score" );
reputation = +( repEl.attr( "title" ).replace( /[^0-9]/g, "" ) || repEl.text().replace( /[^0-9]/g, "" ) );