viewmod javascript converted to livescript