a
This commit is contained in:
parent
889970736e
commit
35bac82e01
|
|
@ -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'
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user