Fix bug where some containers end up with two CAPTCHAs inside

This commit is contained in:
Skylar Ittner 2019-05-25 13:09:36 -06:00
parent b91d5c6872
commit bc7e250972
1 changed files with 4 additions and 0 deletions

View File

@ -43,6 +43,10 @@ window.onload = function () {
if (this.readyState == 4) { if (this.readyState == 4) {
var status = this.status; var status = this.status;
var json = this.responseText; var json = this.responseText;
/* Prevent rare bug where two CAPTCHAs appear in one container */
if (container.innerHTML.trim() != "") {
return;
}
/* Create captcha div */ /* Create captcha div */
var captcha = document.createElement("div"); var captcha = document.createElement("div");
captcha.setAttribute("class", "captcheck_box"); captcha.setAttribute("class", "captcheck_box");