Remove duplicate js function.