diff --git a/copyparty/web/svcs.html b/copyparty/web/svcs.html
index 0c3ec858..c47d8403 100644
--- a/copyparty/web/svcs.html
+++ b/copyparty/web/svcs.html
@@ -36,7 +36,7 @@
{% if accs %}{{ pw }}
=password, {% endif %}mp
=mountpoint
- use real password
+ {% if accs %}use real password{% endif %}
diff --git a/copyparty/web/svcs.js b/copyparty/web/svcs.js
index 10513fd2..dc9b07dc 100644
--- a/copyparty/web/svcs.js
+++ b/copyparty/web/svcs.js
@@ -49,7 +49,7 @@ function setos(os) {
setos(WINDOWS ? 'win' : LINUX ? 'lin' : MACOS ? 'mac' : 'idk');
-ebi('setpw').onclick = function (e) {
+function setpw() {
ev(e);
modal.prompt('password:', '', function (v) {
if (!v)
@@ -57,7 +57,7 @@ ebi('setpw').onclick = function (e) {
var pw0 = ebi('pw0').innerHTML,
oa = QSA('b');
-
+
for (var a = 0; a < oa.length; a++)
if (oa[a].innerHTML == pw0)
oa[a].textContent = v;
@@ -65,3 +65,5 @@ ebi('setpw').onclick = function (e) {
add_dls();
});
}
+if (ebi('setpw'))
+ ebi('setpw').onclick = setpw;