From 1e46da2b02106fb79a2268009c427d9243f8f562 Mon Sep 17 00:00:00 2001 From: sultanmyrza Date: Fri, 10 Nov 2023 21:51:03 +0800 Subject: [PATCH] WIP(example): remove unused JS script --- examples/capture-eye-html-design.html | 35 --------------------------- 1 file changed, 35 deletions(-) diff --git a/examples/capture-eye-html-design.html b/examples/capture-eye-html-design.html index 5fd7861..f56b75e 100644 --- a/examples/capture-eye-html-design.html +++ b/examples/capture-eye-html-design.html @@ -398,41 +398,6 @@

Details

body.addEventListener('transitionend', updateIcon); } - /** - * Listens for the DOMContentLoaded event to initialize the form and its event listeners. - */ - document.addEventListener('DOMContentLoaded', (event) => { - // hideCaptureEyeModal(); - - const form = document.getElementById('nidForm'); - const submitButton = form.querySelector('button[type="submit"]'); - - form.addEventListener('submit', async function (e) { - e.preventDefault(); // Prevent the default form submit action - - const nid = form.nid.value; - const userToken = form.userToken.value; - - // Disable the button and change the text - submitButton.disabled = true; - submitButton.textContent = 'Fetching...'; - - hideCaptureEyeModal(); - - // Call the fetchNID function here - try { - await fetchNID(nid, userToken); - } catch (error) { - console.error('Error fetching NID:', error); - // Handle any errors here - } - - // Re-enable the button and reset the text - submitButton.disabled = false; - submitButton.textContent = 'Submit'; - }); - }); - /** * Updates the UI with the fetched data. * @param {Object} data - The data object received from the fetch operation.