add javascript codes to the documentation