Clean infobox js code