1var formId; 2var onloadCallback = function() { 3 $('.g-recaptcha').each(function(){ 4 var el = $(this); 5 try{ 6 grecaptcha.render(el.attr('id'), { 7 //'sitekey': '6LcRXxUlAAAAAColjioFyFW_jATJ_YHGkIFLbOUw', //daniels localhost dev 8 'sitekey': '6LeN-xYlAAAAABzgbnt5Tq6CFBFtvcSkawZA8tb9', //immersive site key 9 'callback': function(token) { 10 el.parents('form').find('.g-recaptcha-response').val(token); 11 formId = el.parents('form').attr('id'); 12 submitForm(formId, token); 13 } 14 }); 15 console.log("grecaptcha"); 16 }catch(error){console.error( error);} 17 }); 18 }; 19 function submitForm(form, token){ 20 let fform = $('#' + form); 21 let btn = fform.find('button'); 22 btn.prop('disabled', true); 23 fform.validate(); 24 if(fform.valid()) { 25 verifyBackend(form, token); 26 } else { 27 console.error('form not valid!'); 28 } 29 }; 30 function verifyBackend(formId, token) { 31 $.ajax({ 32 type: "POST", 33 url: "/recaptcha.php", 34 data: { 'captcha': token }, 35 success: function (msg) { 36 var msg = JSON.parse(msg); 37 var fform = $('#' + formId); 38 39 if (msg.success == true) { 40 fform.validate(); 41 if (token && fform.valid()) { 42 fform.submit(); 43 } 44 } else { 45 alert("Sorry, you are a robot ð¤"); 46 } 47 }, 48 error: function (error) { 49 alert('Sorry, something went wrong. Please try again later.'); 50 console.log(error); 51 } 52 }); 53 }
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.