From 51b4460935bb04d26d368810aa5c330fb9bcccdd Mon Sep 17 00:00:00 2001 From: gabrielgio Date: Fri, 25 Mar 2022 18:55:37 +0100 Subject: ref: Add actual pass generator function Modify `generate` function to actually generate usable. --- www/index.html | 1 - www/index.js | 10 ++++++---- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'www') diff --git a/www/index.html b/www/index.html index 8007121..76d8c1c 100644 --- a/www/index.html +++ b/www/index.html @@ -12,7 +12,6 @@

Password Generator

-

password

diff --git a/www/index.js b/www/index.js index c9baaf8..e25ec3a 100644 --- a/www/index.js +++ b/www/index.js @@ -1,7 +1,9 @@ import * as wasm from "genpass"; -function generatePassword() { - document.getElementById("password").innerHTML = wasm.generate(); -} +const LEN = 32; -document.getElementById("generate").onclick = generatePassword +document.getElementById("password").innerHTML = wasm.generate(LEN); + +document.getElementById("generate").onclick = (function () { + document.getElementById("password").innerHTML = wasm.generate(LEN); +}); -- cgit v1.2.3