Issue #286 Put javascript in seperate file