Update JS code