From 0bf17313945d343f71d47e3b2723f55e8ed7263c Mon Sep 17 00:00:00 2001
From: Martin Weise <martin.weise@tuwien.ac.at>
Date: Thu, 7 Mar 2024 08:03:57 +0000
Subject: [PATCH] Need JS also

---
 .docs/scripts/extra.js | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 .docs/scripts/extra.js

diff --git a/.docs/scripts/extra.js b/.docs/scripts/extra.js
new file mode 100644
index 0000000000..4768615e22
--- /dev/null
+++ b/.docs/scripts/extra.js
@@ -0,0 +1,13 @@
+function getVersion() {
+    const segments = location.pathname.split('/');
+    if (segments.length >= 4) {
+        return segments[3];
+    } else {
+        return '__APPVERSION__';
+    }
+}
+function switchVersion(value) {
+    if (!value) { return }
+    this.location.href = location.protocol + '//' + location.host + '/infrastructures/dbrepo/' + value + '/';
+}
+document.getElementById("version").value = getVersion();
\ No newline at end of file
-- 
GitLab