debian-mirror-gitlab/app/assets/javascripts/pages/sessions/new/index.js

23 lines
971 B
JavaScript
Raw Normal View History

2018-05-09 12:01:36 +05:30
import $ from 'jquery';
2019-09-04 21:01:54 +05:30
import LengthValidator from './length_validator';
2018-03-17 18:26:18 +05:30
import UsernameValidator from './username_validator';
2019-07-07 11:18:12 +05:30
import NoEmojiValidator from '../../../emoji/no_emoji_validator';
2018-03-17 18:26:18 +05:30
import SigninTabsMemoizer from './signin_tabs_memoizer';
import OAuthRememberMe from './oauth_remember_me';
2019-03-02 22:35:43 +05:30
import preserveUrlFragment from './preserve_url_fragment';
2018-03-17 18:26:18 +05:30
document.addEventListener('DOMContentLoaded', () => {
new UsernameValidator(); // eslint-disable-line no-new
2019-09-30 21:07:59 +05:30
new LengthValidator(); // eslint-disable-line no-new
2018-03-17 18:26:18 +05:30
new SigninTabsMemoizer(); // eslint-disable-line no-new
2019-07-07 11:18:12 +05:30
new NoEmojiValidator(); // eslint-disable-line no-new
2018-11-08 19:23:39 +05:30
new OAuthRememberMe({
2018-03-17 18:26:18 +05:30
container: $('.omniauth-container'),
}).bindEvents();
2019-03-02 22:35:43 +05:30
// Save the URL fragment from the current window location. This will be present if the user was
// redirected to sign-in after attempting to access a protected URL that included a fragment.
preserveUrlFragment(window.location.hash);
2018-03-17 18:26:18 +05:30
});