Created
April 3, 2018 23:44
-
-
Save MiraiTunga/75efeab7f868498c491c865e00399a14 to your computer and use it in GitHub Desktop.
Prevents google recaptcha from timing out in Business catalyst and adds a refresh captcha link
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
//add script to end of form | |
(function ($) { | |
$( window ).load(function() { | |
SetRefreshButton(); | |
}); | |
window.setInterval(function(){ | |
reCaptchaV2Manager.onLoadHandler(); | |
}, 120000); | |
function SetRefreshButton() { | |
var button = '<a href="#" onclick="reCaptchaV2Manager.reloadControls(); return false;">Reload Captcha</a>'; | |
$('.g-recaptcha').parent().append(button); | |
} | |
}(jQuery)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment