// Global scanner reference so we can stop or restart it // 1) Show the scanned code on screen // 2) Immediately stop the scanner so it doesn't scan multiple times // Show the "Scan Again" button // 3) Send the code to the server via AJAX // Once the page loads, render the scanner // "Scan Again" button logic // Clear results text // Hide the "Scan Again" button // Re-initialize the scanner