From 3b27ee2eaf30fbdbefa0d4ff2463bc3c7e2ca2bf Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Wed, 10 Jun 2020 15:19:13 +0200 Subject: Webbox: Download with HTTP Auth via onclick(), download via link in plain version --- plugins/webbox/html/webbox.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'plugins/webbox') 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 = ""; - name_td = "
" + filename + "
"; + + // 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 = "
" + filename + "
"; + } else { // http auth version + name_td = "" + filename + ""; + } } else if (type == "dir") { type = ""; name_td = "" + filename + ""; -- cgit v1.2.3