Update js code