Add onLoad callback to reCAPTCHA service

This commit is contained in:
Felipe 2018-10-31 18:01:52 +01:00 committed by GitHub
parent 706fcff7e0
commit 5a4d0841a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -1300,8 +1300,9 @@ tarteaucitron.services.recaptcha = {
"cookies": ['nid'], "cookies": ['nid'],
"js": function () { "js": function () {
"use strict"; "use strict";
window.tacRecaptchaOnLoad = tarteaucitron.user.recaptchaOnLoad || function() {};
tarteaucitron.fallback(['g-recaptcha'], ''); tarteaucitron.fallback(['g-recaptcha'], '');
tarteaucitron.addScript('https://www.google.com/recaptcha/api.js'); tarteaucitron.addScript('https://www.google.com/recaptcha/api.js?onload=tacRecaptchaOnLoad');
}, },
"fallback": function () { "fallback": function () {
"use strict"; "use strict";