From 0461f6b0d0bb9aefe1f77db1ff5b8c8aaf6e1f8d Mon Sep 17 00:00:00 2001 From: oliver Date: Sat, 20 Jun 2026 07:32:22 -0300 Subject: [PATCH] Remove () --- app.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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) ──────────────────────────────