update js snippit