Update JavaScript client code