From 5a4d0841a888ab85d906f3ee6fe2c97435ed0170 Mon Sep 17 00:00:00 2001 From: Felipe Date: Wed, 31 Oct 2018 18:01:52 +0100 Subject: [PATCH] Add onLoad callback to reCAPTCHA service --- tarteaucitron.services.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 502abd4..a491f68 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -1300,8 +1300,9 @@ tarteaucitron.services.recaptcha = { "cookies": ['nid'], "js": function () { "use strict"; + window.tacRecaptchaOnLoad = tarteaucitron.user.recaptchaOnLoad || function() {}; 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 () { "use strict";