mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-13 11:05:40 +00:00
frontend templating
This commit is contained in:
19
frontend/static/js/index.js
Normal file
19
frontend/static/js/index.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import './css/forms.scss';
|
||||
|
||||
import signin from './auth/signin';
|
||||
import registerUser from './auth/register';
|
||||
import {checkUsernameEventHandler} from './auth/userExists';
|
||||
|
||||
if (window.location.pathname == '/') {
|
||||
let form = document.getElementById('form');
|
||||
form.addEventListener('submit', signin, true);
|
||||
} else if (window.location.pathname == '/signup') {
|
||||
let form = document.getElementById('form');
|
||||
form.addEventListener('submit', registerUser, true);
|
||||
let username = document.getElementById('username');
|
||||
username.addEventListener('input', checkUsernameEventHandler, false);
|
||||
} else {
|
||||
}
|
||||
|
||||
|
||||
//export default signin;
|
||||
Reference in New Issue
Block a user