re-externalize javascript