From 89150a4f58aee639eb1e420c2a399c64a9c9defa Mon Sep 17 00:00:00 2001 From: SteveSamJacob19 Date: Tue, 9 Jul 2024 14:12:01 +0530 Subject: [PATCH] Replaced .replace to .href --- src/main/content/_assets/js/antora-redirect.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/content/_assets/js/antora-redirect.js b/src/main/content/_assets/js/antora-redirect.js index 5c9e43fc2b..8fd6edbe64 100644 --- a/src/main/content/_assets/js/antora-redirect.js +++ b/src/main/content/_assets/js/antora-redirect.js @@ -19,7 +19,7 @@ $(document).ready(function () { if (hash.indexOf("#") === 0) { hash = hash.substring(1); // Remove hash } - window.location.replace(window.location.origin + "/docs/latest/" + hash); + window.location.href= window.location.origin + "/docs/latest/" + hash; } else if ( path.indexOf("/docs/ref/feature/") > -1 || path.indexOf("/docs/ref/config/") > -1 || @@ -48,13 +48,12 @@ $(document).ready(function () { break; } } - window.location.replace( + window.location.href = window.location.origin + "/docs/latest/reference/" + resource_type + "/" + page + - hash - ); + hash; } });