Switch JS to use preview mode