Update Javascript for chrome