Add JavaScript delete function