-
-
Save jamigibbs/70050c6fde78efc4c1e2ec1e571a41fb to your computer and use it in GitHub Desktop.
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
window.addEventListener("message", function(event) { | |
if (event.data.type === 'CAPTCHA-SITEKEY') { | |
sitekey = event.data.key; | |
hostURL = event.data.hostURL; | |
var gCaptchaScript = document.getElementById('g-captcha-script') | |
if (!gCaptchaScript) { | |
var script = document.createElement('script'); | |
head = document.head || document.getElementsByTagName('head')[0]; | |
script.src = `https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit` | |
script.id = 'g-captcha-script' | |
document.head.insertBefore(script, head.firstChild); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment