From a0ef61425282147e93832194b8dae3502eab6a50 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Mon, 14 Jan 2019 14:19:56 +0100 Subject: [PATCH] Improved navigation --- .../assets/js/main.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/assets/zip/personnal-data-export-navigator/assets/js/main.js b/assets/zip/personnal-data-export-navigator/assets/js/main.js index 6e9afce3..5c7371d1 100644 --- a/assets/zip/personnal-data-export-navigator/assets/js/main.js +++ b/assets/zip/personnal-data-export-navigator/assets/js/main.js @@ -115,6 +115,18 @@ function RefreshTabsVisibility(){ }); + document.querySelectorAll(".sidenav .bold").forEach(el => { + + let isActive = el.querySelector("a").href.includes("#" + hash); + + if(isActive && !el.className.includes(" active")) + el.className += " active"; + + if(!isActive && el.className.includes(" active")) + el.className = el.className.replace(" active", ""); + + }); + } /**