mirror of
https://github.com/privacyguides/privacyguides.org.git
synced 2024-12-23 22:49:42 -05:00
readability tweak
This commit is contained in:
parent
97f89b7ba2
commit
28803ae0b9
@ -218,34 +218,28 @@
|
||||
if (options.includePunctuationChars) {
|
||||
candidates += punct;
|
||||
}
|
||||
var result = "";
|
||||
var password = "";
|
||||
for (var i = 0; i < options.passwordLength; i++) {
|
||||
var randomNum = generateRandomNum(candidates.length);
|
||||
result += candidates.substring(randomNum, randomNum + 1);
|
||||
password += candidates.substring(randomNum, randomNum + 1);
|
||||
}
|
||||
return result;
|
||||
return password;
|
||||
};
|
||||
|
||||
return {
|
||||
generatePassword: generatePassword
|
||||
};
|
||||
})();
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
function getOptions() {
|
||||
return {
|
||||
passwordLength: $("#password-length").val(),
|
||||
includeUppercaseChars: $("#include-uppercase-chars-checkbox").is(
|
||||
":checked"),
|
||||
includeLowercaseChars: $("#include-lowercase-chars-checkbox").is(
|
||||
":checked"),
|
||||
includeUppercaseChars: $("#include-uppercase-chars-checkbox").is(":checked"),
|
||||
includeLowercaseChars: $("#include-lowercase-chars-checkbox").is(":checked"),
|
||||
includeNumbers: $("#include-digits-checkbox").is(":checked"),
|
||||
includePunctuationChars: $("#include-special-chars-checkbox").is(
|
||||
":checked"),
|
||||
includePunctuationChars: $("#include-special-chars-checkbox").is(":checked"),
|
||||
}
|
||||
};
|
||||
|
||||
function outputGeneratedPassword() {
|
||||
var password;
|
||||
try {
|
||||
@ -254,9 +248,7 @@
|
||||
return $("#unsupported-browser-alert").show();
|
||||
}
|
||||
if (password === '') {
|
||||
alert(
|
||||
"Whops. You unselected all the options. I don't know what characters you want. Click on the button entitled \"Advanced Options\" and enable some options then try again. Nice one"
|
||||
);
|
||||
alert("Whops. You unselected all the options. I don't know what characters you want. Click on the button entitled \"Advanced Options\" and enable some options then try again. Nice one");
|
||||
return;
|
||||
}
|
||||
$("#password-input").val(password);
|
||||
|
Loading…
Reference in New Issue
Block a user