This commit is contained in:
KANE LAZENI 2026-02-16 01:06:11 +00:00
parent 889970736e
commit 35bac82e01

View File

@ -78,9 +78,6 @@ inputField.addEventListener('cut', e => e.preventDefault());
// Détection du type de scan
function detectScanType(value) {
// QR code commence généralement par un format spécifique
// Ajustez cette logique selon votre format de QR code
// if (value.startsWith('QR') || value.includes('|') || value.length > 50) {
if (value.endsWith('qr') {
return 'qr';
}
@ -108,7 +105,7 @@ inputField.addEventListener('input', function() {
// Soumission automatique du formulaire
inputField.addEventListener('change', function () {
alert(this.value.length);
alert(this.value);
if (this.value.length > 3) {
const type = detectScanType(this.value);
const message = type === 'qr'