Adjusting js preview