diff options
| author | RblSb <msrblsb@gmail.com> | 2020-03-10 08:55:09 +0300 |
|---|---|---|
| committer | RblSb <msrblsb@gmail.com> | 2020-03-10 08:55:09 +0300 |
| commit | 1fb3e2de251f5f1d33a43cd13bc4ca6d3ae23c26 (patch) | |
| tree | ef23a8fa4622ce216b06bbf7733eb5f82c9333b2 /src | |
| parent | fe4c5fee38f5b85ca3f9d13874e7c056d832730e (diff) | |
Show/hide password button
Diffstat (limited to 'src')
| -rw-r--r-- | src/client/Buttons.hx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/client/Buttons.hx b/src/client/Buttons.hx index e5c36a0..b8e4a16 100644 --- a/src/client/Buttons.hx +++ b/src/client/Buttons.hx @@ -19,6 +19,15 @@ class Buttons { initChatInput(main); initNavBar(main); + final passIcon = ge("#guestpass_icon"); + passIcon.onclick = e -> { + final isOpen = passIcon.classList.toggle("glyphicon-eye-open"); + passIcon.classList.toggle("glyphicon-eye-close"); + final pass:InputElement = cast ge("#guestpass"); + if (isOpen) pass.type = "password"; + else pass.type = "text"; + } + final smilesBtn = ge("#smilesbtn"); smilesBtn.onclick = e -> { smilesBtn.classList.toggle("active"); |
