Coffee Script to Java Script automated script