I just upgraded from v2 and css is no longer a valid option for hiding the recaptcha badge from my UI. Can this be done with JavaScript?
You can achieve this with recursion and requestAnimationFrame
.
Try creating something like this:
function hideRecaptcha() {
const recaptcha = $(".grecaptcha-badge");
if (recaptcha.length) return recaptcha.css({ display: "none" });
requestAnimationFrame(() => this.hideRecaptcha());
}
Then call hideRecaptcha()
immediately after loading the recaptcha script.