@mcaptcha/vanilla-glue

glue code to setup mCaptcha on your website

Usage no npm install needed!

<script type="module">
  import mcaptchaVanillaGlue from 'https://cdn.skypack.dev/@mcaptcha/vanilla-glue';
</script>

README

Vanilla JavaScript Glue JavaScript library

Embed mCaptcha widget in webpages built using Vanilla JavaScript

0.1.0 Build) codecov

Usage

Add this snippet to the form which requires to be protected using mCaptcha

<div
    id="mcaptcha__widget-container"
    style="width: 304px; height: 78px"
></div>
<script src="../dist/index.js"></script>
<script charset="utf-8">
    let config = {
        widgetLink: new URL(
            "https://demo.mcaptcha.org/widget/?sitekey=pHy0AktWyOKuxZDzFfoaewncWecCHo23"
        ),
    };
    new mcaptchaGlue.default(config);
</script>

Example

See example form in ./static/embeded.html