summaryrefslogtreecommitdiffhomepage
path: root/plugins/webbox/html/webbox.js
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2020-05-15 19:50:40 +0200
committerRoland Reichwein <mail@reichwein.it>2020-05-15 19:50:40 +0200
commit01ff8fab013f6e7c95381605bd7adfc7fa712371 (patch)
treeddb44320b650118125c3cc526b783b82f9ced2c8 /plugins/webbox/html/webbox.js
parent8fbada6c7542d233afb4677c19a0395f77d32519 (diff)
webbox: Fix path display
Diffstat (limited to 'plugins/webbox/html/webbox.js')
-rw-r--r--plugins/webbox/html/webbox.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/webbox/html/webbox.js b/plugins/webbox/html/webbox.js
index 839b93d..9b3a486 100644
--- a/plugins/webbox/html/webbox.js
+++ b/plugins/webbox/html/webbox.js
@@ -442,7 +442,15 @@ function setCurrentDir(newDir) {
var menu = document.getElementsByClassName("menu")[0];
var firsttd = menu.getElementsByClassName("firsttd")[0];
- firsttd.innerHTML = getRootLink() + addDirectoryLinks(newDir);
+
+ var result = getRootLink();
+
+ if (result == "" || newDir != "/") {
+ newDir = addDirectoryLinks(newDir);
+ result = result + newDir;
+ }
+
+ firsttd.innerHTML = result;
}
function download(filename) {