]> git.proxmox.com Git - proxmox-backup.git/blobdiff - docs/_static/custom.js
docs: move custom.js and custom.css into _static folder
[proxmox-backup.git] / docs / _static / custom.js
diff --git a/docs/_static/custom.js b/docs/_static/custom.js
new file mode 100644 (file)
index 0000000..7964b2c
--- /dev/null
@@ -0,0 +1,7 @@
+window.addEventListener('DOMContentLoaded', (event) => {
+    let activeSection = document.querySelector("a.current");
+    if (activeSection) {
+        // https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView
+        activeSection.scrollIntoView({ block: 'center' });
+    }
+});