WeHateCaptchas is a form verification service created by Edward Dalton, now maintained by Cohan Robinson designed to "timeout" bots, rather than out think them. Examples here: HTML, PHP
Here we've altered the Javascript aspect from the example to add some extra benefits.
- Support for multiple forms
- Logging verification steps
To include in a project, upload or copy dist/whc-plugin.umd.js
to your project, and add the necessary parameters below.
If you only need to support more modern browsers, you can use the js inside of dist/whc-plugin.modern.js
id
: Required Necessary for things like event name and finding submit buttons.
data-whc
: Required Marks the form as needing verification.
data-button
: Optional Add to signify use of a submit button outside the form element using the form attribute. Else, uses querySelector to find an element with [type="submit"]
.
data-difficulty
: Optional An Integer between 1 - 10. Default is 5.
data-debug
: Optional Add this to get helpful console messages about the verification process. No value needed.
data-finished
: Optional The text/value of the submit button after the form has been verified. Default is "Submit".
data-progress
: Visual representation of the verification progress