added the javascript route functionality.  Closes GH-732