Socket
Socket
Sign inDemoInstall

react-simple-captcha

Package Overview
Dependencies
Maintainers
1
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-simple-captcha - npm Package Compare versions

Comparing version 6.1.7 to 7.0.0

2

package.json
{
"name": "react-simple-captcha",
"version": "6.1.7",
"version": "7.0.0",
"description": "A very simple and powerful captcha for ReactJS",

@@ -5,0 +5,0 @@ "main": "react-simple-captcha.js",

@@ -81,2 +81,26 @@ import { Component } from 'react';

render() {
let reload_text = "";
let reload_color = "";
LoadCanvasTemplate_HTML = "<div><canvas id=\"canv\"></canvas><div><a id=\"reload_href\" style=\"cursor: pointer; color: blue\">Reload Captcha</a></div></div>";
if (this.props.reloadText) {
reload_text = this.props.reloadText;
}
if (this.props.reloadColor) {
reload_color = this.props.reloadColor;
}
if (reload_text == "") {
reload_text = "Reload Captach";
}
if (reload_color == "") {
reload_color = "blue";
}
LoadCanvasTemplate_HTML = "<div><canvas id=\"canv\"></canvas><div><a id=\"reload_href\" style=\"cursor: pointer; color: " + reload_color + "\">" + reload_text + "</a></div></div>";
return (ReactHtmlParser(LoadCanvasTemplate_HTML));

@@ -83,0 +107,0 @@ }

@@ -78,3 +78,3 @@ # React Simple Captcha

**OR**
If you don't watch captcha to be reloaded if user enter the wrong value then set second parameter to *false* **validateCaptcha(user_captcha_value, false)**
If you don't want captcha to be reloaded if user enter the wrong value then set second parameter to *false* **validateCaptcha(user_captcha_value, false)**

@@ -109,2 +109,8 @@

| **validateCaptcha(*User_Submitted_Value*, *false*)** | Will return *true* if user submitted value matches with captcha otherwise *false*. Will not reload captcha if user submitted value is *false* |
| **Version ^7.0.0 Updates** | **All of these changes are optional** |
| ------ | ------ |
| **< LoadCanvasTemplate reloadText="Reload My Captcha" />** | **Optional** In case you want to change the "Reload Captcha" with your own text |
| **< LoadCanvasTemplate reloadColor="red" />** | **Optional** In case you want to change the blue color of "Reload Captcha" |
| **< LoadCanvasTemplate reloadText="Reload My Captcha" reloadColor="red" />** | **Optional** In case you want to change the "Reload Captcha" text and it's blue color |

@@ -111,0 +117,0 @@ ### Example

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc