Commit 50ac92b2 authored by Jannik Lehmann's avatar Jannik Lehmann

Remove DOMContentLoaded Events

Removing DOMContentLoaded Events from
index files since the scripts
are embedded using the defer tag.
parent 5fa9332d
......@@ -5,12 +5,9 @@ import initVueAlerts from '~/vue_alerts';
import initInviteMembersTrigger from '~/invite_members/init_invite_members_trigger';
import initInviteMembersModal from '~/invite_members/init_invite_members_modal';
document.addEventListener('DOMContentLoaded', () => {
leaveByUrl('group');
initGroupDetails();
initGroupAnalytics();
initVueAlerts();
initInviteMembersModal();
initInviteMembersTrigger();
});
leaveByUrl('group');
initGroupDetails();
initGroupAnalytics();
initVueAlerts();
initInviteMembersModal();
initInviteMembersTrigger();
import initWikis from '~/pages/shared/wikis';
document.addEventListener('DOMContentLoaded', initWikis);
initWikis();
import initSubscriptions from 'ee/billings';
import PersistentUserCallout from '~/persistent_user_callout';
document.addEventListener('DOMContentLoaded', () => {
PersistentUserCallout.factory(document.querySelector('.js-gold-trial-callout'));
initSubscriptions();
});
PersistentUserCallout.factory(document.querySelector('.js-gold-trial-callout'));
initSubscriptions();
import mountAddGitlabSlackApplication from 'ee/add_gitlab_slack_application';
document.addEventListener('DOMContentLoaded', () => mountAddGitlabSlackApplication());
mountAddGitlabSlackApplication();
......@@ -6,10 +6,8 @@ import NoEmojiValidator from '~/emoji/no_emoji_validator';
import SigninTabsMemoizer from '~/pages/sessions/new/signin_tabs_memoizer';
import UsernameSuggester from './username_suggester';
document.addEventListener('DOMContentLoaded', () => {
new UsernameValidator(); // eslint-disable-line no-new
new LengthValidator(); // eslint-disable-line no-new
new SigninTabsMemoizer(); // eslint-disable-line no-new
new NoEmojiValidator(); // eslint-disable-line no-new
new UsernameSuggester('new_user_username', ['new_user_first_name', 'new_user_last_name']); // eslint-disable-line no-new
});
new UsernameValidator(); // eslint-disable-line no-new
new LengthValidator(); // eslint-disable-line no-new
new SigninTabsMemoizer(); // eslint-disable-line no-new
new NoEmojiValidator(); // eslint-disable-line no-new
new UsernameSuggester('new_user_username', ['new_user_first_name', 'new_user_last_name']); // eslint-disable-line no-new
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment