anonymousland-synapse/static/client/register/js/register.js

23 lines
550 B
JavaScript
Raw Normal View History

2015-02-23 11:08:43 -05:00
window.matrixRegistration = {};
var setupCaptcha = function() {
if (!window.matrixRegistrationConfig) {
return;
}
console.log("Setting up ReCaptcha");
var public_key = window.matrixRegistrationConfig.recaptcha_public_key;
if (public_key === undefined) {
console.error("No public key defined for captcha!");
return;
}
Recaptcha.create(public_key,
"regcaptcha",
{
theme: "red",
callback: Recaptcha.focus_response_field
});
};
matrixRegistration.onLoad = function() {
setupCaptcha();
};