This is an automated email from the ASF dual-hosted git repository.

jbertram pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-website.git


The following commit(s) were added to refs/heads/main by this push:
     new 714a73799 fixup another test for Artemis out-of-date doc warning
714a73799 is described below

commit 714a73799c2b11066a03d233bbc3637dd6e85c18
Author: Justin Bertram <jbert...@apache.org>
AuthorDate: Tue May 20 12:04:52 2025 -0500

    fixup another test for Artemis out-of-date doc warning
---
 .../documentation/latest/address-model.html        | 35 ++++++++++------------
 1 file changed, 15 insertions(+), 20 deletions(-)

diff --git a/src/components/artemis/documentation/latest/address-model.html 
b/src/components/artemis/documentation/latest/address-model.html
index ee7a42550..48b3045b6 100644
--- a/src/components/artemis/documentation/latest/address-model.html
+++ b/src/components/artemis/documentation/latest/address-model.html
@@ -11,28 +11,23 @@
 <link rel="stylesheet" href="css/font-awesome.css">
 <link rel="stylesheet" href="css/rouge-github.css">
 <script>
-document.addEventListener("DOMContentLoaded", function() {
-    var currentUrl = window.location.href;
-    console.log(currentUrl);
-    if (!currentUrl.includes("latest")) {
-        console.log("=== latest!");
-        var message = document.createElement("div");
-        message.style.margin = "20px";
-        message.style.textAlign = "center";
-        message.style.backgroundColor = "#FFFFE0";
-        message.textContent = "Please be aware that this documentation is 
out-of-date. ";
+    document.addEventListener("DOMContentLoaded", function() {
+        const pathSegments = window.location.pathname.split('/');
+        if (window.location.hostname == "activemq.apache.org" && 
pathSegments[pathSegments.length - 2] != "latest") {
+            var message = document.createElement("div");
+            message.style.margin = "20px";
+            message.style.textAlign = "center";
+            message.style.backgroundColor = "#FFFFE0";
+            message.textContent = "Please be aware that this documentation is 
out of date. ";
 
-        // Create a link
-        var link = document.createElement("a");
-        link.href = "../latest/" + 
currentUrl.substring(currentUrl.lastIndexOf('/') + 1);
-        link.textContent = "Consider using the latest documentation.";
+            var link = document.createElement("a");
+            link.href = "../latest";
+            link.textContent = "Here is the latest documentation.";
+            message.appendChild(link);
 
-        message.appendChild(link);
-
-        // Insert the message at the top of the body
-        document.body.insertBefore(message, document.body.firstChild);
-    }
-});
+            document.body.insertBefore(message, document.body.firstChild);
+        }
+    });
 </script>
 </head>
 <body class="book toc2 toc-left">


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@activemq.apache.org
For additional commands, e-mail: commits-h...@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact


Reply via email to