repair javascript