diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..7ebb957 --- /dev/null +++ b/.htaccess @@ -0,0 +1,2 @@ +RewriteEngine On +RewriteRule ^captcheck.dist.js captcheck.min.js [L] \ No newline at end of file diff --git a/captcheck.dist.js b/captcheck.dist.js deleted file mode 100644 index c08790f..0000000 --- a/captcheck.dist.js +++ /dev/null @@ -1 +0,0 @@ -window.onload=function(){var e="https://captcheck.netsyms.com/api.php";function t(e,t){return document.getElementById("captcheck_"+e+"_answer_"+t).checked=!0,!1}function a(e){var t=document.getElementById("captcheck_"+e+"_alt_question_button"),a=document.getElementById("captcheck_"+e+"_question_image"),n=document.getElementById("captcheck_"+e+"_question_access"),c=document.getElementById("captcheck_"+e+"_answer_images"),i=document.getElementById("captcheck_"+e+"_answer_access");"> Text mode"==t.innerHTML?(t.innerHTML="> Image mode",a.style.display="none",n.style.display="initial",c.style.display="none",i.style.display="initial",i.innerHTML=""):(t.innerHTML="> Text mode",a.style.display="initial",n.style.display="none",c.style.display="initial",i.style.display="none",i.innerHTML="")}var n="";Array.prototype.forEach.call(document.getElementsByClassName("captcheck_container"),function(c){c.dataset.stylenonce&&(n=c.dataset.stylenonce);var i=new XMLHttpRequest;i.open("GET",e+"?action=new",!0),i.onreadystatechange=function(){if(4==this.readyState){var n=this.status,i=this.responseText,s=document.createElement("div");if(s.setAttribute("class","captcheck_box"),c.appendChild(s),200==n){for(var r=JSON.parse(i),o=r.id_prefix,d="
"}d+="
<script src="https://captcheck.netsyms.com/captcheck.dist.js"></script>
+ <script src="https://captcheck.netsyms.com/captcheck.min.js"></script>
Put this in your form where you want the CAPTCHA:
<div class="captcheck_container"></div>
Put this in your server-side form validation (PHP example):
diff --git a/readme.md b/readme.md
index 057b9d2..0337d22 100644
--- a/readme.md
+++ b/readme.md
@@ -11,7 +11,7 @@ How to use
----------
In your form, put an empty div with the class "captcheck_container".
-Add `captcheck.js` (or `captcheck.dist.js`) into your page.
+Add `captcheck.js` (or `captcheck.min.js`) into your page.
diff --git a/test.html b/test.html
index 6d21587..46bf4dc 100644
--- a/test.html
+++ b/test.html
@@ -1,17 +1,12 @@
-
-
-