add code for Safari and Chrome

codes for Safari and Chrome