diff options
Diffstat (limited to 'plugins/webbox/html')
-rw-r--r-- | plugins/webbox/html/webbox.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/webbox/html/webbox.js b/plugins/webbox/html/webbox.js index 963491d..1d6c31f 100644 --- a/plugins/webbox/html/webbox.js +++ b/plugins/webbox/html/webbox.js @@ -72,7 +72,15 @@ function loadContents(dir) { var name_td; if (type == "file") { type = "<img src=\"webbox-html/file.png\"/>"; - name_td = "<td><a href=\"" + absolutePath(full_path) + "\"><div class=\"name\">" + filename + "</div></a></td>"; + + // Difference between HTTP Auth version (with login authorization) and plain version: + // HTTP Auth: download via onclick() of element. This automatically includes the HTTP auth for the download. + // Plain: download via generated link which can be used universally. + if (username == "notaname") { // plain version + name_td = "<td><a href=\"" + absolutePath(full_path) + "\"><div class=\"name\">" + filename + "</div></a></td>"; + } else { // http auth version + name_td = "<td class=\"name\" " + mouse_click + ">" + filename + "</td>"; + } } else if (type == "dir") { type = "<img src=\"webbox-html/directory.png\"/>"; name_td = "<td class=\"name\" " + mouse_click + ">" + filename + "</td>"; |