1/* OneDoor Studios form handler: sends Webflow-style forms to FormSubmit (email to [email protected]) */ 2(function () { 3 var ENDPOINT = 'https://formsubmit.co/ajax/[email protected]'; 4 var LABELS = { 5 'footer-newsletter-form': 'Newsletter signup', 6 'blog-newsletter-form': 'Newsletter signup', 7 'card-contact-form': 'Investor interest', 8 'vote-form': 'LA Comicon vote' 9 }; 10 function kind(form) { 11 if (form.id === 'vote-form') return LABELS['vote-form']; 12 for (var k in LABELS) if (form.classList.contains(k)) return LABELS[k]; 13 return null; 14 } 15 document.addEventListener('submit', function (e) { 16 var form = e.target; 17 var label = kind(form); 18 if (!label) return; // leave filter forms etc. alone 19 e.preventDefault(); 20 e.stopImmediatePropagation(); 21 var block = form.parentElement; 22 var done = block.querySelector('.w-form-done'); 23 var fail = block.querySelector('.w-form-fail'); 24 var btn = form.querySelector('[type=submit]'); 25 var orig = btn && btn.value; 26 if (btn && btn.getAttribute('data-wait')) btn.value = btn.getAttribute('data-wait'); 27 var data = {}; 28 new FormData(form).forEach(function (v, k) { data[k] = v; }); 29 data._subject = 'OneDoorStudios.com: ' + label; 30 data._template = 'table'; 31 data.page = location.href; 32 fetch(ENDPOINT, { 33 method: 'POST', 34 headers: { 'Content-Type': 'application/json', 'Accept': 'application/json' }, 35 body: JSON.stringify(data) 36 }).then(function (r) { return r.json(); }).then(function (j) { 37 if (j.success === false || j.success === 'false') throw new Error(j.message || 'failed'); 38 form.style.display = 'none'; 39 if (fail) fail.style.display = 'none'; 40 if (done) done.style.display = 'block'; 41 }).catch(function () { 42 if (fail) fail.style.display = 'block'; 43 if (btn) btn.value = orig; 44 }); 45 }, true); 46})();
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.