Updated js file and added credit for edit