From b5430858f42153ff5892a7fa539381e61211b08c Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Mon, 17 Feb 2025 01:27:47 +0000 Subject: [PATCH] Added optional padding for equal length. --- index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 7d5012d..4d9145a 100644 --- a/index.html +++ b/index.html @@ -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());