Fix feedback

This commit is contained in:
Yarmo Mackenbach 2022-10-05 11:38:39 +02:00
parent 864a58f406
commit edfdc05362
No known key found for this signature in database
GPG key ID: 37367F4AF4087AD1

View file

@ -395,7 +395,12 @@ const runArgon2VerificationUtility = () => {
window.kx__fixArgon2Input = () => {
const elInput = document.querySelector('#form-util-argon2-generate .input');
elInput.value = `openpgp4fpr:${elInput.value.toLowerCase()}`;
elInput.value = elInput.value.toLowerCase();
if (!(/openpgp4fpr:[0-9a-zA-Z]+/.test(elInput.value))) {
elInput.value = `openpgp4fpr:${elInput.value}`;
}
elInput.dispatchEvent(new Event("input"));
}
@ -455,6 +460,11 @@ const runBcryptVerificationUtility = () => {
window.kx__fixBcryptInput = () => {
const elInput = document.querySelector('#form-util-bcrypt-generate .input');
elInput.value = `openpgp4fpr:${elInput.value.toLowerCase()}`;
elInput.value = elInput.value.toLowerCase();
if (!(/openpgp4fpr:[0-9a-zA-Z]+/.test(elInput.value))) {
elInput.value = `openpgp4fpr:${elInput.value}`;
}
elInput.dispatchEvent(new Event("input"));
}