1$(function() { 2 $("footer .line_logo .flex-footer-logo .button_up").on('click', function () { 3 $("html, body").animate({ scrollTop: 0 }, "slow"); 4 }); 5 6 function validateEmail(email) { 7 let re = /[^\s@]+@[^\s@]+\.[^\s@]+/; 8 9 return re.test(email) 10 } 11 12 function emailField() { 13 let email_field = $("#newsletter_email_v2"), 14 email = email_field.val(); 15 16 if (!validateEmail(email)) { 17 email_field.addClass("invalid"); 18 } 19 } 20 21 $("#newsletter_email_v2").on("input", function() { 22 $(this).removeClass("invalid"); 23 }); 24 25 $("#t2_consent_email_small").on("input", function() { 26 $(this).parent().removeClass("invalid"); 27 }); 28 29 $("footer .line1.v2 .blocks .block .email_form .form-group .btn_2022").on("click", function() { 30 let email_field = $("#newsletter_email_v2"), email, pdata, 31 newsSubmit = $(this).closest(".email_form"), 32 newsLoading = $("#newsletter_loading_v2"); 33 34 newsSubmit.hide(); 35 newsLoading.show(); 36 37 email_field.removeClass("invalid"); 38 39 emailField(); 40 41 if (email_field.hasClass("invalid")) { 42 email_field.focus(); 43 newsLoading.hide(); 44 newsSubmit.show(); 45 46 return false 47 } else { 48 email = email_field.val(); 49 pdata = { 50 "email": email 51 }; 52 53 $.post("?cmd=get&cid=11391&piet_jaunumiem=1", pdata, function(data) { 54 if (data === "1") { 55 newsLoading.hide(); 56 newsSubmit.show(); 57 58 $("footer .line1.v2 .blocks .block .email_form").hide(); 59 $("#newsletter_thanks_v2").show(); 60 } else { 61 newsLoading.hide(); 62 newsSubmit.show(); 63 64 email_field.addClass("invalid").focus(); 65 } 66 }); 67 } 68 }); 69});
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.