refactor js urls