added preview js support