aboutsummaryrefslogtreecommitdiff
path: root/www/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/index.js')
-rw-r--r--www/index.js6
1 files changed, 5 insertions, 1 deletions
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