1(function (window, document) { 2 var timerFunction = function (hiddenField, siteKey) { 3 window.grecaptcha.execute(siteKey, { action: 'umbracoform_submit' }).then(function (token) { 4 // Enable the submit button now we have a token. 5 hiddenField.form.querySelector('[type=submit]').removeAttribute('disabled'); 6 hiddenField.value = token; 7 }); 8 setTimeout(timerFunction, 60 * 1000, hiddenField, siteKey); 9 }; 10 11 document.addEventListener('DOMContentLoaded', function () { 12 13 Array.from(document.getElementsByClassName("umbraco-forms-recaptcha-v3-config")).forEach(function (configElement) { 14 15 // Get reference to hidden field. 16 var hiddenField = document.getElementById(configElement.dataset.id); 17 var siteKey = configElement.dataset.siteKey; 18 19 // Disable the submit button for this form, until we actually have a key from Google reCAPTCHA. 20 hiddenField.form.querySelector('[type=submit]').setAttribute('disabled', 'disabled'); 21 22 window.grecaptcha.ready(function () { 23 timerFunction(hiddenField, siteKey); 24 }); 25 }); 26 }); 27})(window, document);
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.