Move window.onload function from coffee scripts to html files