add javascript function blog