Skip to content

Commit 510100c

Browse files
authored
Update svcs.js
Signed-off-by: ed <[email protected]>
1 parent 161bbc7 commit 510100c

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

copyparty/web/svcs.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,21 @@ function setos(os) {
4949
setos(WINDOWS ? 'win' : LINUX ? 'lin' : MACOS ? 'mac' : 'idk');
5050

5151

52-
pwbutton = ebi('setpw')
53-
if (pwbutton != null)
54-
pwbutton.onclick = function (e) {
55-
ev(e);
56-
modal.prompt('password:', '', function (v) {
57-
if (!v)
58-
return;
52+
function setpw() {
53+
ev(e);
54+
modal.prompt('password:', '', function (v) {
55+
if (!v)
56+
return;
5957

60-
var pw0 = ebi('pw0').innerHTML,
61-
oa = QSA('b');
62-
63-
for (var a = 0; a < oa.length; a++)
64-
if (oa[a].innerHTML == pw0)
65-
oa[a].textContent = v;
58+
var pw0 = ebi('pw0').innerHTML,
59+
oa = QSA('b');
60+
61+
for (var a = 0; a < oa.length; a++)
62+
if (oa[a].innerHTML == pw0)
63+
oa[a].textContent = v;
6664

67-
add_dls();
68-
});
69-
}
65+
add_dls();
66+
});
67+
}
68+
if (ebi('setpw'))
69+
ebi('setpw').onclick = setpw;

0 commit comments

Comments
 (0)