Bläddra i källkod

Merge pull request #254 from kuuak/master

Add onLoad callback to reCAPTCHA service
Amauri CHAMPEAUX 6 år sedan
förälder
incheckning
fe84c6bc33
1 ändrade filer med 2 tillägg och 1 borttagningar
  1. 2 1
      tarteaucitron.services.js

+ 2 - 1
tarteaucitron.services.js

@@ -1327,8 +1327,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";