mirror of https://github.com/aredn/aredn.git
17 lines
425 B
Plaintext
Executable File
17 lines
425 B
Plaintext
Executable File
<script>
|
|
(function(){
|
|
function toggle()
|
|
{
|
|
const p = htmx.findAll(".password-toggle input");
|
|
const t = p[0].type === "text" ? "password" : "text";
|
|
for (let i = 0; i < p.length; i++) {
|
|
p[i].type = t;
|
|
}
|
|
}
|
|
const b = htmx.findAll(".password-toggle button.icon.eye");
|
|
for (let i = 0; i < b.length; i++) {
|
|
htmx.on(b[i], "click", toggle);
|
|
}
|
|
})();
|
|
</script>
|