fix current-directory hilight

This commit is contained in:
ed 2021-09-27 20:55:05 +02:00
parent cb81fe962c
commit 14aab62f32

View file

@ -3228,12 +3228,12 @@ var treectl = (function () {
} }
function reload_tree() { function reload_tree() {
var cdir = get_evpath(), var cdir = get_vpath(),
links = QSA('#treeul a+a'), links = QSA('#treeul a+a'),
nowrap = QS('#tree.nowrap') && QS('#hovertree.on'); nowrap = QS('#tree.nowrap') && QS('#hovertree.on');
for (var a = 0, aa = links.length; a < aa; a++) { for (var a = 0, aa = links.length; a < aa; a++) {
var href = links[a].getAttribute('href'); var href = uricom_dec(links[a].getAttribute('href'))[0];
links[a].setAttribute('class', href == cdir ? 'hl' : ''); links[a].setAttribute('class', href == cdir ? 'hl' : '');
links[a].onclick = treego; links[a].onclick = treego;
links[a].onmouseenter = nowrap ? menter : null; links[a].onmouseenter = nowrap ? menter : null;