diff --git a/static/js/cours.js b/static/js/cours.js index 30ece9a..82cff88 100644 --- a/static/js/cours.js +++ b/static/js/cours.js @@ -102,6 +102,14 @@ window.addEventListener("load", () => { fileTreeElement.querySelector("ul").childNodes ); + // Bold opened file + const opened_file = fullpath.split("/").at(-1); + last_openeded.querySelector("ul").childNodes.forEach((el) => { + if (el.innerText === opened_file) { + el.style.fontWeight = "bold"; + } + }); + uncollapse(last_openeded); } });