This repository has been created for client-side captcha.
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
}