Skip to content

Commit

Permalink
Merge pull request #99 from hurda/recaptcha
Browse files Browse the repository at this point in the history
Fix Recaptcha-initialisation being too fast for QR
  • Loading branch information
loadletter committed Apr 18, 2021
2 parents 289ef2b + 648d417 commit 109293e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 4chan_x.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -2357,7 +2357,7 @@
value: ''
}));
$.addClass(QR.el, 'captcha');
$.globalEval('(function () {window.grecaptcha.render(document.getElementById("g-recaptcha"), {sitekey: "6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc", theme: "light", callback: (' + (Conf['Auto Submit'] ? 'function (res) {var sb = document.getElementById("x_QR_Submit"); if(sb) sb.click(); }' : 'function (res) {}') + ') });})()');
$.globalEval('(window.setTimeout(function () {window.grecaptcha.render(document.getElementById("g-recaptcha"), {sitekey: "6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc", theme: "light", callback: (' + (Conf['Auto Submit'] ? 'function (res) {var sb = document.getElementById("x_QR_Submit"); if(sb) sb.click(); }' : 'function (res) {}') + ') });}),1000)()');
$.after($('.textarea', QR.el), $.id('g-recaptcha'));
} else {
$.addClass(QR.el, 'captcha');
Expand Down

0 comments on commit 109293e

Please sign in to comment.