feat & chore: use mCaptcha browser libs

This commit is contained in:
Aravinth Manivannan 2022-03-26 12:46:41 +05:30
parent 7ff66c551d
commit 35c076cedd
Signed by: realaravinth
GPG Key ID: AD9F0F08E855ED88
4 changed files with 23 additions and 22 deletions

View File

@ -32,7 +32,7 @@
"webpack-dev-server": "^4.3.1"
},
"dependencies": {
"mcaptcha-browser": "./vendor/pow/",
"mcaptcha-glue": "^0.1.0-alpha-3"
"@mcaptcha/vanilla-glue": "^0.1.0-alpha-1",
"mcaptcha-browser": "./vendor/pow/"
}
}

View File

@ -15,6 +15,12 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import * as glue from "mcaptcha-glue";
import Widget, { WidgetConfig } from "@mcaptcha/vanilla-glue";
glue.init();
const config: WidgetConfig = {
widgetLink: new URL(
"https://demo.mcaptcha.org/widget/?sitekey=pHy0AktWyOKuxZDzFfoaewncWecCHo23"
),
};
new Widget(config);

View File

@ -19,19 +19,7 @@
system for optimal user experience, see for yourself!
</p>
<div class="survey__captcha-widget" style="width: 304px; height: 78px">
<iframe
title="mCaptcha"
src="https://demo.mcaptcha.org/widget/?sitekey=6o3p1Fx94hJRFm8g8IHBB7sv8D0em20k"
role="presentation"
name="mcaptcha-widget__iframe"
id="mcaptcha-widget__iframe"
scrolling="no"
sandbox="allow-same-origin allow-scripts"
width="304"
height="78"
data-mcaptcha_host="https://demo.mcaptcha.org"
frameborder="0"
></iframe>
<div id="mcaptcha__widget-container" style="width: 304px; height: 78px"></div>
</div>
</section>
<section>

View File

@ -533,6 +533,18 @@
"@types/yargs" "^16.0.0"
chalk "^4.0.0"
"@mcaptcha/core-glue@^0.1.0-alpha-3":
version "0.1.0-alpha-3"
resolved "https://registry.yarnpkg.com/@mcaptcha/core-glue/-/core-glue-0.1.0-alpha-3.tgz#16c11cb3751b6421999353dc10c032afd08ffa8b"
integrity sha512-avphBVgf3PPDWuUoDsB2qiXAss2pc00lUILswJaMQofr8FQyflzkhha8H2Z+qGFiX0Iib/yyP2TOtBDbHqE9Tg==
"@mcaptcha/vanilla-glue@^0.1.0-alpha-1":
version "0.1.0-alpha-1"
resolved "https://registry.yarnpkg.com/@mcaptcha/vanilla-glue/-/vanilla-glue-0.1.0-alpha-1.tgz#6ddef419280853c55611d30fd44f4a31e7aab65f"
integrity sha512-GHPjUpqdgk9DquGnGYGDQertcwMENKUc4yr/Q3M7WzL6rPBs6JMCVdDHV22RGTxk3xBM19fGuDQ8GOyNauQ3hg==
dependencies:
"@mcaptcha/core-glue" "^0.1.0-alpha-3"
"@nodelib/fs.scandir@2.1.5":
version "2.1.5"
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5"
@ -3436,11 +3448,6 @@ makeerror@1.0.x:
mcaptcha-browser@./vendor/pow/:
version "0.1.0"
mcaptcha-glue@^0.1.0-alpha-3:
version "0.1.0-alpha-3"
resolved "https://registry.yarnpkg.com/mcaptcha-glue/-/mcaptcha-glue-0.1.0-alpha-3.tgz#0c1c5cfc6991de6571fb2c0f0950acac289e1141"
integrity sha512-C/Nfw4RGsmbozbyvxx/p0C7bUBn+YmP7tTl/8ORNdQiuy2VQUmD874LvbocnmSar8Isk/8rIaCqmVRBlRw/Yaw==
media-typer@0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"