diff --git a/.docs/overrides/main.html b/.docs/overrides/main.html
index db14ec6adb627a5103d84d7cefc2411d52fe7d1f..9f9a6daf6fa57add34aa8e9170bc55315f5ed3b1 100644
--- a/.docs/overrides/main.html
+++ b/.docs/overrides/main.html
@@ -8,20 +8,4 @@
     <option value="1.4.0">1.4.0</option>
     <option value="1.3.0">1.3.0</option>
 </select>
-<script>
-    function getVersion() {
-        const segments = location.pathname.split('/')
-        console.debug('segments', segments)
-        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()
-</script>
 {% endblock %}
diff --git a/.docs/scripts/extra.js b/.docs/scripts/extra.js
new file mode 100644
index 0000000000000000000000000000000000000000..4768615e22f22fc7f895cfee742ed9c848347b89
--- /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
diff --git a/mkdocs.yml b/mkdocs.yml
index 14affa17a9a3a1ebb0687936f79c7895f73c3b19..60f1c85e8897ec1936c405ab6d72fe7fa855b456 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -43,6 +43,8 @@ nav:
   - contact.md
 extra_css:
   - stylesheets/extra.css
+extra_javascript:
+  - scripts/extra.js
 theme:
   favicon: images/signet_white.png
   custom_dir: .docs/overrides