captcha-canvas
captcha-canvas copied to clipboard
feature request: setCaptcha support to pass SetCaptchaOption array
feature request: setCaptcha support to pass SetCaptchaOption array, for now, only can pass one SetCaptchaOption
for example, I want generate a captcha: "abcd", and "ab" is red, "cd" is green
Can you elaborate on the request? Like what you actually want, a feature to customise each character of a captcha.
if so, I can let user to enter the specified character, for example:
- please enter the red characters
- please enter the biggest 2 characters many many possibilities
Hmm... make sense I will try to add this feature
by the way, is it a bug in captcha.ts:
if (option.colors && option.colors?.length > 2) {this._ctx.fillStyle = option.colors[getRandom(option.colors.length - 1)];}
should it be:
if (option.colors && option.colors?.length >= 2)
by the way, is it a bug in captcha.ts:
if (option.colors && option.colors?.length > 2) {this._ctx.fillStyle = option.colors[getRandom(option.colors.length - 1)];}
should it be:
if (option.colors && option.colors?.length >= 2)
Yupp it is a bug. Actually I never use option.colors
so I never noticed it. Thank you for raising it 😅