Create refreshonpreview.js