Commit 302833b3 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 5fa9332d
import '~/pages/projects/blame/show/index'; import '~/pages/projects/blame/show/index';
import initBlob from '../../shared/init_blob'; import initBlob from '../../shared/init_blob';
document.addEventListener('DOMContentLoaded', initBlob); initBlob();
...@@ -7,13 +7,11 @@ import UsersSelect from '~/users_select'; ...@@ -7,13 +7,11 @@ import UsersSelect from '~/users_select';
import UserCallout from '~/user_callout'; import UserCallout from '~/user_callout';
import groupsSelect from '~/groups_select'; import groupsSelect from '~/groups_select';
document.addEventListener('DOMContentLoaded', () => { new UsersSelect();
new UsersSelect(); groupsSelect();
groupsSelect();
new UserCallout({ className: 'js-mr-approval-callout' }); new UserCallout({ className: 'js-mr-approval-callout' });
mountApprovals(document.getElementById('js-mr-approvals-settings')); mountApprovals(document.getElementById('js-mr-approvals-settings'));
initProjectAdjournedDeleteButton(); initProjectAdjournedDeleteButton();
});
import '~/pages/projects/jobs/show/index'; import '~/pages/projects/jobs/show/index';
import initVueAlerts from '~/vue_alerts'; import initVueAlerts from '~/vue_alerts';
document.addEventListener('DOMContentLoaded', initVueAlerts); initVueAlerts();
...@@ -2,7 +2,5 @@ import '~/pages/projects/milestones/show/index'; ...@@ -2,7 +2,5 @@ import '~/pages/projects/milestones/show/index';
import initBurndownChart from 'ee/burndown_chart'; import initBurndownChart from 'ee/burndown_chart';
import UserCallout from '~/user_callout'; import UserCallout from '~/user_callout';
document.addEventListener('DOMContentLoaded', () => { new UserCallout(); // eslint-disable-line no-new
new UserCallout(); // eslint-disable-line no-new initBurndownChart();
initBurndownChart();
});
import '~/pages/projects/new/index'; import '~/pages/projects/new/index';
import initCustomProjectTemplates from 'ee/projects/custom_project_templates'; import initCustomProjectTemplates from 'ee/projects/custom_project_templates';
document.addEventListener('DOMContentLoaded', () => { initCustomProjectTemplates();
initCustomProjectTemplates();
});
import initOnDemanScans from 'ee/on_demand_scans'; import initOnDemanScans from 'ee/on_demand_scans';
document.addEventListener('DOMContentLoaded', initOnDemanScans); initOnDemanScans();
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