layout logics for julia mode

Layout js logic in custom.js needed for #17.

ping @malmaud