update javascript demo