Skip to content

Instantly share code, notes, and snippets.

@dsimmons
Last active August 29, 2015 13:59
Show Gist options
  • Save dsimmons/10764722 to your computer and use it in GitHub Desktop.
Save dsimmons/10764722 to your computer and use it in GitHub Desktop.
Rev.com browser console stats
$rows = $('#orders-history tbody tr');
// Sum the cost of all orders placed.
costTotal = [].reduce.call($('td:nth-child(7)', $rows).map(function(i, el) { return Number(el.innerHTML.replace(/[^0-9\.]+/g, "")); }), function(sum, current) { return sum + current; })
// Average audio file duration
avgDuration = costTotal / $rows.length;
console.log("Total cost: $" + costTotal);
console.log("Average call duration: " + avgDuration + "m");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment