Commit 48cdba9c authored by Jannik Lehmann's avatar Jannik Lehmann

Remove DOMContentLoaded Eventlisteners

Removing DOMContentLoaded Eventlisteners from
index files since the scripts
are embedded using the defer tag.
parent 3fb22f44
import initSubscriptions from 'ee/billings'; import initSubscriptions from 'ee/billings';
import PersistentUserCallout from '~/persistent_user_callout'; import PersistentUserCallout from '~/persistent_user_callout';
document.addEventListener('DOMContentLoaded', () => { PersistentUserCallout.factory(document.querySelector('.js-gold-trial-callout'));
PersistentUserCallout.factory(document.querySelector('.js-gold-trial-callout')); initSubscriptions();
initSubscriptions();
});
...@@ -5,10 +5,8 @@ import ZenMode from '~/zen_mode'; ...@@ -5,10 +5,8 @@ import ZenMode from '~/zen_mode';
import '~/notes/index'; import '~/notes/index';
import loadAwardsHandler from '~/awards_handler'; import loadAwardsHandler from '~/awards_handler';
document.addEventListener('DOMContentLoaded', () => { new ZenMode(); // eslint-disable-line no-new
new ZenMode(); // eslint-disable-line no-new initEpicApp();
initEpicApp(); new ShortcutsEpic(); // eslint-disable-line no-new
new ShortcutsEpic(); // eslint-disable-line no-new new EpicTabs(); // eslint-disable-line no-new
new EpicTabs(); // eslint-disable-line no-new loadAwardsHandler();
loadAwardsHandler();
});
import { initIterationReport } from 'ee/iterations'; import { initIterationReport } from 'ee/iterations';
import { Namespace } from 'ee/iterations/constants'; import { Namespace } from 'ee/iterations/constants';
document.addEventListener('DOMContentLoaded', () => { initIterationReport({ namespaceType: Namespace.Group, initiallyEditing: true });
initIterationReport({ namespaceType: Namespace.Group, initiallyEditing: true });
});
import { initIterationsList } from 'ee/iterations'; import { initIterationsList } from 'ee/iterations';
import { Namespace } from 'ee/iterations/constants'; import { Namespace } from 'ee/iterations/constants';
document.addEventListener('DOMContentLoaded', () => initIterationsList(Namespace.Group)); initIterationsList(Namespace.Group);
import { initIterationForm } from 'ee/iterations'; import { initIterationForm } from 'ee/iterations';
document.addEventListener('DOMContentLoaded', () => { initIterationForm();
initIterationForm();
});
import { initIterationReport } from 'ee/iterations'; import { initIterationReport } from 'ee/iterations';
import { Namespace } from 'ee/iterations/constants'; import { Namespace } from 'ee/iterations/constants';
document.addEventListener('DOMContentLoaded', () => { initIterationReport({ namespaceType: Namespace.Group });
initIterationReport({ namespaceType: Namespace.Group });
});
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