1document.getElementById('email-form').addEventListener('submit', function(event) { 2 event.preventDefault(); 3 4 let domain = document.getElementById('user-value').value; 5 const spinner = document.getElementById('spinner'); 6 const buttonText = document.getElementById('button-text'); 7 const button = document.getElementById('submit-button'); 8 9 const atIndex = domain.indexOf('@'); 10 if (atIndex !== -1) { 11 domain = domain.slice(atIndex + 1); 12 document.getElementById('user-value').value = domain; 13 } 14 15 buttonText.style.display = 'none'; 16 spinner.style.display = 'inline-block'; 17 18 fetch('https://tempmaildetector.com/test-lookup', { 19 method: 'POST', 20 headers: { 21 'Content-Type': 'application/json', 22 }, 23 body: JSON.stringify({ domain: domain }), 24 }) 25 .then(response => { 26 const ct = response.headers.get('content-type') || ''; 27 if (!ct.includes('application/json')) { 28 throw new Error('Something went wrong. Please try again.'); 29 } 30 return response.json(); 31 }) 32 .then(data => { 33 let responseDiv = document.getElementById('response'); 34 const responsePre = document.getElementById('response-pre'); 35 responseDiv.textContent = JSON.stringify(data, null, 2); 36 responsePre.classList.add('pre-loading'); 37 Prism.highlightElement(responseDiv); 38 requestAnimationFrame(() => responsePre.classList.remove('pre-loading')); 39 40 let counterDiv = document.getElementById('counter'); 41 let currentCount = parseInt(counterDiv.textContent.split('/')[0].trim()); 42 if (currentCount < 10) { 43 counterDiv.textContent = `${currentCount + 1}/10`; 44 const nextCount = currentCount + 1; 45 if (nextCount === window.MODAL_TRIGGERS.automationNudge) { 46 setTimeout(() => { 47 window.showSignupModal({ 48 title: 'Still doing this by hand?', 49 message: 'Automate it away with 200 free lookups each month.' 50 }); 51 }, 1500); 52 } 53 if (nextCount === window.MODAL_TRIGGERS.finalPitch) { 54 setTimeout(() => { 55 window.showSignupModal({ 56 title: 'Still testing manually?', 57 message: 'Our API integrates in minutes and blocks fraud before it happens. Join the many customers already protecting their signups from automated attacks.' 58 }); 59 }, 1500); 60 } 61 } 62 63 spinner.style.display = 'none'; 64 buttonText.style.display = 'inline'; 65 }) 66 .catch(error => { 67 console.error('Error:', error); 68 let responseDiv = document.getElementById('response'); 69 responseDiv.textContent = error.message; 70 71 spinner.style.display = 'none'; 72 buttonText.style.display = 'inline'; 73 }); 74}); 75 76window.addEventListener('load', function() { 77 document.querySelectorAll('pre.pre-loading').forEach(pre => pre.classList.remove('pre-loading')); 78});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.