Updated livepreview.js