Added whitespace mode hook for JS