Browse Source

Fix bug where some containers end up with two CAPTCHAs inside

master
Skylar Ittner 4 weeks ago
parent
commit
bc7e250972
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      captcheck.js

+ 4
- 0
captcheck.js View File

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

Loading…
Cancel
Save