Add friendly capcha #36

Merged
ashten merged 5 commits from feature/friendly-captcha into main 2025-01-19 07:47:57 +00:00
2 changed files with 8 additions and 8 deletions
Showing only changes of commit 7ed25ef7f5 - Show all commits

View file

@ -118,13 +118,13 @@ async function requestRender() {
},
});
} else if (variable.value === 'friendlyChallenge' && captchaEl.value instanceof Element) {
new captcha.value.WidgetInstance(captchaEl.value, {
sitekey: props.sitekey,
doneCallback: callback,
errorCallback: callback,
});
// The following line is needed so that the design gets applied without it the captcha will look broken
captchaEl.value.className = 'frc-captcha';
new captcha.value.WidgetInstance(captchaEl.value, {
sitekey: props.sitekey,
doneCallback: callback,
errorCallback: callback,
});
// The following line is needed so that the design gets applied without it the captcha will look broken
captchaEl.value.className = 'frc-captcha';
} else {
window.setTimeout(requestRender, 1);
}

View file

@ -280,7 +280,7 @@ async function init() {
enableMcaptcha.value = meta.enableMcaptcha;
enableRecaptcha.value = meta.enableRecaptcha;
enableTurnstile.value = meta.enableTurnstile;
enableFriendlycaptcha.value = meta.enableFriendlycaptcha
enableFriendlycaptcha.value = meta.enableFriendlycaptcha;
sensitiveMediaDetection.value = meta.sensitiveMediaDetection;
sensitiveMediaDetectionSensitivity.value =
meta.sensitiveMediaDetectionSensitivity === 'veryLow' ? 0 :