Commit dd00fff9 authored by Jannik Lehmann's avatar Jannik Lehmann

Remove obsolete EventListeners

parent 36a765d9
import { mount2faAuthentication } from '~/authentication/mount_2fa';
document.addEventListener('DOMContentLoaded', mount2faAuthentication);
mount2faAuthentication();
import initEnvironmentsFolderBundle from '~/environments/folder/environments_folder_bundle';
document.addEventListener('DOMContentLoaded', initEnvironmentsFolderBundle);
initEnvironmentsFolderBundle();
import monitoringApp from '~/monitoring/monitoring_app';
document.addEventListener('DOMContentLoaded', monitoringApp);
monitoringApp();
import initTerminal from '~/terminal/';
document.addEventListener('DOMContentLoaded', initTerminal);
initTerminal();
......@@ -2,7 +2,7 @@ import $ from 'jquery';
import ShortcutsNetwork from '~/behaviors/shortcuts/shortcuts_network';
import Network from '../network';
document.addEventListener('DOMContentLoaded', () => {
(() => {
if (!$('.network-graph').length) return;
const networkGraph = new Network({
......@@ -14,4 +14,4 @@ document.addEventListener('DOMContentLoaded', () => {
// eslint-disable-next-line no-new
new ShortcutsNetwork(networkGraph.branch_graph);
});
})();
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';
/**
* Load sourcegraph in it's own listener so that it's isolated from failures.
*/
document.addEventListener('DOMContentLoaded', initSourcegraph);
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