Skip to content

bhatnagar-ankur/captcha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Client Side Captcha

This repository has been created for client-side captcha.

Authors

Run Locally

Download the files from the dist folder.

Open the HTML page where it needs to be injected. Create a DOM element with an ID where it needs to be injected.

  <div id="captchaContainer"></div>

Once the captcha.min.js is included in the project. Use the below code to initiate the captcha, 'options' is optional.

  captcha.initiateCaptcha('captchaContainer', options);

Use the below code to validate the captcha answer, it returns true or false.

  captcha.validateCaptcha();

The default value of options are

  {
    "equation": true,
    "grid": false,
    "reload": true,
    "audio": true,
    "hoverColor": '#00bcd4',
    "refreshIcon": null, // use SVG icon or HTML code to build a custom icon
    "audioIcon": null,   // use SVG icon or HTML code to build a custom icon
  }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published