Issue #3467911 by narendrar, phenaproxima, chrisfromredfin: Refactor URL construction to use window.location instead of Drupal.url