Skip to content

Instantly share code, notes, and snippets.

View ANTOSzbk's full-sized avatar
👋
Hello there

Adrian Solarczyk ANTOSzbk

👋
Hello there
View GitHub Profile
@ANTOSzbk
ANTOSzbk / captchaVerification.js
Created March 31, 2020 19:48
Commented code solved Uncaught (in promise) Timeout
async function captchaVerification() {
return await new Promise((resolve, reject) => {
const captcha = document.createElement('div')
captcha.setAttribute('id', 'g-recaptcha')
document.getElementById('main').appendChild(captcha)
const verifyCallback = async (response) => {
if (response) {
const data = {
token: response,
}