Created
March 24, 2017 00:07
-
-
Save uestla/8473c35c78300fbb9a58d893341e8bc6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
(function (window, $) { | |
window['grecaptchaInit'] = function () { | |
$.nette.ext({ | |
init: function () { | |
$('.g-recaptcha').each(function () { | |
var recaptcha = $(this); | |
if (recaptcha.children().length) { // already processed -> skip | |
return ; | |
} | |
grecaptcha.render(recaptcha[0], { | |
sitekey: recaptcha.attr('data-sitekey') | |
}); | |
}); | |
}, | |
load: function () { | |
grecaptcha.reset(); | |
} | |
}); | |
$.nette.init(); | |
}; | |
})(window, window.jQuery); | |
</script> | |
<script type="text/javascript" src="https://www.google.com/recaptcha/api.js?onload=grecaptchaInit&render=explicit"></script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment