Basic cours support #44

Merged
Anri merged 67 commits from cours into main 2024-04-01 18:11:49 +02:00
Showing only changes of commit 7fc3f95dd5 - Show all commits

View file

@ -65,20 +65,17 @@ const deepestNodeOpened = (path, options) => {
// Iterate over possible options
for (let i = 0; i < options.length; ++i) {
// If the directory and the current path match
if (path[0] === options[i].firstChild.nodeValue) {
if (decodeURI(path[0]) === options[i].firstChild.nodeValue) {
if (path.length === 1) {
// We found it
return options[i];
}
// Continue the search
let returned_value = deepestNodeOpened(
return deepestNodeOpened(
path.slice(1),
options[i].querySelector("ul").childNodes
);
if (returned_value) {
return returned_value;
}
}
}
};