   if challenge?
     updateChallengeDetails(challenge)
     updateStats(challenge)
-
-    # If we know the challenge, we can use that to set the page up
+    getTaskByChallenge(challenge, near)
   else
     # We'll need to grab a task and then use the information from that
     # task to populate the page


  # add keyboard hooks
  if enablekeyboardhooks
    $(document).bind "keydown", (e) ->
      key = String.fromCharCode(e)
      switch key.which
        when "q"
            nextUp "falsepositive"
        when "w"
            nextUp "skip"
        when "e"
          openIn('josm')
        when "r"
          openIn('potlatch')
        when "i"
          openIn('id')

  # Try to grab parameters from the url
  challenge = $(document).getUrlParam("challenge")

1###
# This file contains all the MapRoulette client/javascript code
###
root = exports ? this
