diff --git a/app.js b/app.js index 89f1026..76f4d9c 100644 --- a/app.js +++ b/app.js @@ -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) ──────────────────────────────