Skip to content

excelerondesign/whc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

df833cb Β· Oct 21, 2020
Jun 25, 2020
Sep 14, 2020
Oct 21, 2020
Oct 21, 2020
Jul 4, 2020
Jul 4, 2020
Jul 6, 2020
Jul 8, 2020
Jul 6, 2020
Oct 21, 2020
Oct 21, 2020
Oct 20, 2020

Repository files navigation

About

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

Documentation

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

Parameters

HTMLFormElement

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".

Automatic data attributes

data-progress: Visual representation of the verification progress