diff options
Diffstat (limited to 'www')
-rw-r--r-- | www/index.html | 8 | ||||
-rw-r--r-- | www/index.js | 6 |
2 files changed, 13 insertions, 1 deletions
diff --git a/www/index.html b/www/index.html index 5a4ada3..3197b6c 100644 --- a/www/index.html +++ b/www/index.html @@ -69,6 +69,14 @@ </div> <div class="field"> <div class="control"> + <label class="checkbox"> + <input id="extended" type="checkbox"> + Extended ASCII + </label> + </div> + </div> + <div class="field"> + <div class="control"> <button class="button is-primary" id="generate">Generate</button> </div> </div> diff --git a/www/index.js b/www/index.js index a4257c1..d7b2869 100644 --- a/www/index.js +++ b/www/index.js @@ -10,6 +10,7 @@ let upperCaseInput = document.getElementById("upperCase"); let lowerCaseInput = document.getElementById("lowerCase"); let numberInput = document.getElementById("number"); let specialInput = document.getElementById("special"); +let extendedInput = document.getElementById("extended"); function copyToClipboard() { let text = passwordInput.innerText @@ -31,7 +32,8 @@ function generate() { let upper = upperCaseInput.checked; let number = numberInput.checked; let special = specialInput.checked; - passwordInput.innerHTML = wasm.generate(size, lower, upper, number, special); + let extended = extendedInput.checked; + passwordInput.innerHTML = wasm.generate(size, lower, upper, number, special, extended); } // Setting up defaults @@ -40,6 +42,7 @@ upperCaseInput.checked = true; lowerCaseInput.checked = true; numberInput.checked = true; specialInput.checked = true; +extendedInput.checked = true; //this will trigger passwordInput to be filled generate(); @@ -50,5 +53,6 @@ upperCaseInput.onchange = generate; lowerCaseInput.onchange = generate; numberInput.onchange = generate; specialInput.onchange = generate; +extendedInput.onchange = generate; generateButton.onclick = generate; copyButton.onclick = copyToClipboard;
\ No newline at end of file |