Commit 0f03eaec authored by Jannik Lehmann's avatar Jannik Lehmann Committed by David O'Regan

Remove DOMContentLoaded Eventlisteners

Removing DOMContentLoaded Eventlisteners from
index files since the scripts
are embedded using the defer tag.
parent 871933eb
import $ from 'jquery';
import initDependencyProxy from '~/dependency_proxy';
document.addEventListener('DOMContentLoaded', () => {
initDependencyProxy();
});
initDependencyProxy();
document.addEventListener('DOMContentLoaded', () => {
const form = document.querySelector('form.edit_dependency_proxy_group_setting');
const toggleInput = $('input.js-project-feature-toggle-input');
const form = document.querySelector('form.edit_dependency_proxy_group_setting');
const toggleInput = $('input.js-project-feature-toggle-input');
if (form && toggleInput) {
toggleInput.on('trigger-change', () => {
form.submit();
});
}
});
if (form && toggleInput) {
toggleInput.on('trigger-change', () => {
form.submit();
});
}
import PersistentUserCallout from '~/persistent_user_callout';
document.addEventListener('DOMContentLoaded', () => {
const callout = document.querySelector('.js-gold-trial-callout');
PersistentUserCallout.factory(callout);
});
const callout = document.querySelector('.js-gold-trial-callout');
PersistentUserCallout.factory(callout);
import initIssuesAnalytics from 'ee/issues_analytics';
document.addEventListener('DOMContentLoaded', () => {
initIssuesAnalytics();
});
initIssuesAnalytics();
......@@ -4,18 +4,16 @@ import initRoadmap from 'ee/roadmap/roadmap_bundle';
import initFilteredSearch from '~/pages/search/init_filtered_search';
import UserCallout from '~/user_callout';
document.addEventListener('DOMContentLoaded', () => {
initFilteredSearch({
page: 'epics',
isGroup: true,
isGroupDecendent: true,
useDefaultState: false,
filteredSearchTokenKeys: FilteredSearchTokenKeysEpics,
stateFiltersSelector: '.epics-state-filters',
});
initEpicCreateApp(true);
initRoadmap();
// eslint-disable-next-line no-new
new UserCallout({ className: 'js-epics-limit-callout' });
initFilteredSearch({
page: 'epics',
isGroup: true,
isGroupDecendent: true,
useDefaultState: false,
filteredSearchTokenKeys: FilteredSearchTokenKeysEpics,
stateFiltersSelector: '.epics-state-filters',
});
initEpicCreateApp(true);
initRoadmap();
// eslint-disable-next-line no-new
new UserCallout({ className: 'js-epics-limit-callout' });
import storageCounter from 'ee/storage_counter';
import LinkedTabs from '~/lib/utils/bootstrap_linked_tabs';
document.addEventListener('DOMContentLoaded', () => {
if (document.querySelector('#js-storage-counter-app')) {
storageCounter();
if (document.querySelector('#js-storage-counter-app')) {
storageCounter();
// eslint-disable-next-line no-new
new LinkedTabs({
defaultAction: '#pipelines-quota-tab',
parentEl: '.js-storage-tabs',
hashedTabs: true,
});
}
});
// eslint-disable-next-line no-new
new LinkedTabs({
defaultAction: '#pipelines-quota-tab',
parentEl: '.js-storage-tabs',
hashedTabs: true,
});
}
import storageCounter from 'ee/storage_counter';
import LinkedTabs from '~/lib/utils/bootstrap_linked_tabs';
document.addEventListener('DOMContentLoaded', () => {
if (document.querySelector('#js-storage-counter-app')) {
storageCounter();
if (document.querySelector('#js-storage-counter-app')) {
storageCounter();
// eslint-disable-next-line no-new
new LinkedTabs({
defaultAction: '#pipelines-quota-tab',
parentEl: '.js-storage-tabs',
hashedTabs: true,
});
}
});
// eslint-disable-next-line no-new
new LinkedTabs({
defaultAction: '#pipelines-quota-tab',
parentEl: '.js-storage-tabs',
hashedTabs: true,
});
}
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