diff options
author | Kegan Dougal <kegan@matrix.org> | 2015-02-23 16:08:43 +0000 |
---|---|---|
committer | Kegan Dougal <kegan@matrix.org> | 2015-02-23 16:08:43 +0000 |
commit | e6363857d04b5ae4594d5e3358763a6f3706cfc1 (patch) | |
tree | e9257919942378f6261720c64f7573d359301490 /static/client/register/js/register.js | |
parent | Actually treat this as static content, not random Resources. (diff) | |
download | synapse-e6363857d04b5ae4594d5e3358763a6f3706cfc1.tar.xz |
Add core registration html/js
Diffstat (limited to 'static/client/register/js/register.js')
-rw-r--r-- | static/client/register/js/register.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/static/client/register/js/register.js b/static/client/register/js/register.js new file mode 100644 index 0000000000..b8a9247e6d --- /dev/null +++ b/static/client/register/js/register.js @@ -0,0 +1,23 @@ +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(); +}; \ No newline at end of file |