From bc7e2509729c221a02f8d55f93993a04b93f0a86 Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Sat, 25 May 2019 13:09:36 -0600 Subject: [PATCH] Fix bug where some containers end up with two CAPTCHAs inside --- captcheck.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/captcheck.js b/captcheck.js index cd56481..544c66a 100644 --- a/captcheck.js +++ b/captcheck.js @@ -43,6 +43,10 @@ window.onload = function () { if (this.readyState == 4) { var status = this.status; var json = this.responseText; + /* Prevent rare bug where two CAPTCHAs appear in one container */ + if (container.innerHTML.trim() != "") { + return; + } /* Create captcha div */ var captcha = document.createElement("div"); captcha.setAttribute("class", "captcheck_box");