This file contains 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 NO_OP = function(){}; | |
// randomly choose one of dribbble's popular shots | |
// keep choosing until we get one with comments | |
var getRandomShotId = function( callback ){ | |
var getRandomShot = function( shots ){ | |
var random_index = Math.floor(Math.random()*shots.length); | |
var shot = shots[random_index]; | |
if( shot.comments_count === 0 ){ | |
return getRandomShot( shots ); |