From 8a354b5d9156088b35031d861fd8a7ff31c55d9b Mon Sep 17 00:00:00 2001 From: Paweł Marks Date: Mon, 3 Feb 2020 08:42:32 +0100 Subject: Implementation of transformable navigation --- core/src/main/resources/dokka/scripts/navigationLoader.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'core/src/main/resources/dokka/scripts') diff --git a/core/src/main/resources/dokka/scripts/navigationLoader.js b/core/src/main/resources/dokka/scripts/navigationLoader.js index e69de29b..d79203f2 100644 --- a/core/src/main/resources/dokka/scripts/navigationLoader.js +++ b/core/src/main/resources/dokka/scripts/navigationLoader.js @@ -0,0 +1,12 @@ +onload = () => { + fetch(pathToRoot + "navigation") + .then(response => response.text()) + .then(data => { + document.getElementById("sideMenu").innerHTML = data; + }).then(() => { + document.querySelectorAll(".overview > a").forEach(link => { + link.setAttribute("href", pathToRoot + link.getAttribute("href")) + console.log(link.attributes["href"]) + }) + }) +} \ No newline at end of file -- cgit