Remove ()

This commit is contained in:
oliver
2026-06-20 07:32:22 -03:00
parent d4c484778c
commit 0461f6b0d0
+4 -2
View File
@@ -265,11 +265,13 @@ function updateQueuePill() {
// (0-indexed 2..5) form the real scan code, concatenated without spaces.
// E.g. "0003 580 0626 5027 3077 23 328 040" → "06265027307723"
function extractCode(raw) {
const parts = raw.trim().split(/\s+/);
// Strip parentheses first
const cleaned = raw.trim().replace(/[()]/g, "");
const parts = cleaned.split(/\s+/);
if (parts.length >= 6) {
return parts.slice(2, 6).join("");
}
return raw.trim(); // fallback: use as-is
return cleaned; // fallback: use cleaned input
}
// ── Enqueue (called immediately on Enter) ──────────────────────────────