change some snippet of javascript