feat(corp/rih): wire up captcha solving callback

This turned out a lot nicer than I expected it to be.

Change-Id: I427670644eba789ea2037423fa9af8e632b19b34
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8695
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
This commit is contained in:
Vincent Ambo 2023-06-02 15:56:47 +03:00 committed by tazjin
parent 6f0ddbac06
commit 138f1ca1b9
2 changed files with 35 additions and 11 deletions

View file

@ -1,12 +1,13 @@
html! {
<main>
<script>
{r#"function captchaOnload(sitekey) {
{r#"function captchaOnload(sitekey, callback) {
if (window.smartCaptcha) {
const container = document.getElementById('captcha-container');
const widgetId = window.smartCaptcha.render(container, {
sitekey: sitekey,
hl: 'en',
callback: callback,
});
}
}"#}