Commit d8612464 authored by Jannik Lehmann's avatar Jannik Lehmann

Remove obsolete DOMContentLoadedEventListener

parent c279c795
...@@ -2,12 +2,10 @@ import $ from 'jquery'; ...@@ -2,12 +2,10 @@ import $ from 'jquery';
import ProjectFindFile from '~/project_find_file'; import ProjectFindFile from '~/project_find_file';
import ShortcutsFindFile from '~/behaviors/shortcuts/shortcuts_find_file'; import ShortcutsFindFile from '~/behaviors/shortcuts/shortcuts_find_file';
document.addEventListener('DOMContentLoaded', () => { const findElement = document.querySelector('.js-file-finder');
const findElement = document.querySelector('.js-file-finder'); const projectFindFile = new ProjectFindFile($('.file-finder-holder'), {
const projectFindFile = new ProjectFindFile($('.file-finder-holder'), {
url: findElement.dataset.fileFindUrl, url: findElement.dataset.fileFindUrl,
treeUrl: findElement.dataset.findTreeUrl, treeUrl: findElement.dataset.findTreeUrl,
blobUrlTemplate: findElement.dataset.blobUrlTemplate, blobUrlTemplate: findElement.dataset.blobUrlTemplate,
});
new ShortcutsFindFile(projectFindFile); // eslint-disable-line no-new
}); });
new ShortcutsFindFile(projectFindFile); // eslint-disable-line no-new
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