Remove ()
This commit is contained in:
@@ -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) ──────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user