summaryrefslogtreecommitdiffhomepage
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-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 b262f6f..839b93d 100644
--- a/plugins/webbox/html/webbox.js
+++ b/plugins/webbox/html/webbox.js
@@ -421,6 +421,14 @@ function addDirectoryLinks(path) {
return result;
}
+function getRootLink() {
+ if (rootDir != "/") {
+ return "<span class=\"link\" onclick=\"setCurrentDir('/')\">" + rootDir + "</span>";
+ }
+
+ return "";
+}
+
function setCurrentDir(newDir) {
if (newDir.endsWith("/")) {
newDir = newDir.substr(0, newDir.length - 1);
@@ -434,7 +442,7 @@ function setCurrentDir(newDir) {
var menu = document.getElementsByClassName("menu")[0];
var firsttd = menu.getElementsByClassName("firsttd")[0];
- firsttd.innerHTML = addDirectoryLinks(newDir);
+ firsttd.innerHTML = getRootLink() + addDirectoryLinks(newDir);
}
function download(filename) {