Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
function play(min,sec){var challenges=$(".challenge");if(arguments.length===0)return challenges.eq(Math.floor(Math.random()*challenges.length)).find(".accept").click();else{challenges=challenges.filter(function(){return $(this).find(".desc").text().search(new RegExp(min+"\\+"+sec))!==-1});if(challenges.length===0)console.log("No challenges matching the specified time control");else{return challenges.eq(Math.floor(Math.random()*challenges.length)).find(".accept").click()}}}

This comment has been minimized.

Copy link
Owner Author

@ddugovic ddugovic commented Mar 17, 2019

Thanks to an anonymous viewer of IM Eric Rosen's twitch channel. (Sorry I didn't record the author's name.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.