Added optional padding for equal length.

This commit is contained in:
DebaucheryLibrarian 2025-02-17 01:27:47 +00:00
parent 224bfa19cd
commit b5430858f4
1 changed files with 2 additions and 1 deletions

View File

@ -209,6 +209,7 @@
.replace(/[^a-z0-9]/g, ' ')
.replace(/\s+/g, ' ')
.trim();
// .padEnd(20, '#');
}
function getCode() {
@ -222,7 +223,7 @@
const decoded = base32.decode(codeInput.value);
const capitalized = decoded.split(' ').map((word) => `${word.slice(0, 1).toUpperCase()}${word.slice(1)}`).join(' ');
nameOutput.value = capitalized;
nameOutput.value = capitalized.replace(/#+$/, '');
}
nameInput.addEventListener('input', () => getCode());