Skip to content

FireStreaker2/AnimeCaptcha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AnimeCaptcha

About

AnimeCaptcha was designed to be a simple captcha system, just using anime waifus. It was meant to replace modern captcha systems like hCaptcha and reCaptcha. It utilizes the FemboyFinder API in order to retrieve images, and then display them.

Usage

Setup

To get started, include this script link in your <body> tag.

<script src="https://cdn.jsdelivr.net/gh/FireStreaker2/AnimeCaptcha@latest/index.min.js"></script>

After, make sure to initialize it and attach it to an element.

const captcha = new AnimeCaptcha();
captcha.attach(document.getElementById("anime-captcha"));

Functions

Method Accepts Usage
finished boolean check/set status of captcha
indicators array check/set indicators
validFormats array check/set valid formats for images
attach HTML element attach captcha to an HTML element

Example

<script>
  // initialize captcha
  const captcha = new AnimeCaptcha();

  // set specific indicators
  captcha.setIndicators([
    "hoshino_ai",
    "hoshino_ruby",
    "kurokawa_akane",
    "memcho",
  ]);

  // attach to element
  captcha.attach(document.getElementById("anime-captcha"));

  // submit logic
   document.getElementById("form").addEventListener("submit", (event) => {
    event.preventDefault();

    captcha.isFinished()
      ? alert(input.value.trim())
      : alert("Please finish the captcha");
  });
</script>

A full demo can be found here.

License

MIT

Releases

No releases published

Packages

No packages published