fixed generate js script