Commit 93e5974e authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'jnnkl-collected-event-listeners' into 'master'

Remove obsolete EventListeners

See merge request gitlab-org/gitlab!66848
parents efb60fef dd00fff9
import { mount2faAuthentication } from '~/authentication/mount_2fa'; import { mount2faAuthentication } from '~/authentication/mount_2fa';
document.addEventListener('DOMContentLoaded', mount2faAuthentication); mount2faAuthentication();
import initEnvironmentsFolderBundle from '~/environments/folder/environments_folder_bundle'; import initEnvironmentsFolderBundle from '~/environments/folder/environments_folder_bundle';
document.addEventListener('DOMContentLoaded', initEnvironmentsFolderBundle); initEnvironmentsFolderBundle();
import monitoringApp from '~/monitoring/monitoring_app'; import monitoringApp from '~/monitoring/monitoring_app';
document.addEventListener('DOMContentLoaded', monitoringApp); monitoringApp();
import initTerminal from '~/terminal/'; import initTerminal from '~/terminal/';
document.addEventListener('DOMContentLoaded', initTerminal); initTerminal();
...@@ -2,7 +2,7 @@ import $ from 'jquery'; ...@@ -2,7 +2,7 @@ import $ from 'jquery';
import ShortcutsNetwork from '~/behaviors/shortcuts/shortcuts_network'; import ShortcutsNetwork from '~/behaviors/shortcuts/shortcuts_network';
import Network from '../network'; import Network from '../network';
document.addEventListener('DOMContentLoaded', () => { (() => {
if (!$('.network-graph').length) return; if (!$('.network-graph').length) return;
const networkGraph = new Network({ const networkGraph = new Network({
...@@ -14,4 +14,4 @@ document.addEventListener('DOMContentLoaded', () => { ...@@ -14,4 +14,4 @@ document.addEventListener('DOMContentLoaded', () => {
// eslint-disable-next-line no-new // eslint-disable-next-line no-new
new ShortcutsNetwork(networkGraph.branch_graph); new ShortcutsNetwork(networkGraph.branch_graph);
}); })();
import initStaticSiteEditor from '~/static_site_editor'; import initStaticSiteEditor from '~/static_site_editor';
window.addEventListener('DOMContentLoaded', () => { initStaticSiteEditor(document.querySelector('#static-site-editor'));
initStaticSiteEditor(document.querySelector('#static-site-editor'));
});
import initSourcegraph from './index'; import initSourcegraph from './index';
/** initSourcegraph();
* Load sourcegraph in it's own listener so that it's isolated from failures.
*/
document.addEventListener('DOMContentLoaded', initSourcegraph);
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