Commit 9244f924 authored by Jannik Lehmann's avatar Jannik Lehmann

Remove obsolete DOMContentLoadedEventListener

parent e5df1467
...@@ -3,21 +3,19 @@ import '~/profile/gl_crop'; ...@@ -3,21 +3,19 @@ import '~/profile/gl_crop';
import Profile from '~/profile/profile'; import Profile from '~/profile/profile';
import initSearchSettings from '~/search_settings'; import initSearchSettings from '~/search_settings';
document.addEventListener('DOMContentLoaded', () => { // eslint-disable-next-line func-names
// eslint-disable-next-line func-names $(document).on('input.ssh_key', '#key_key', function () {
$(document).on('input.ssh_key', '#key_key', function () { const $title = $('#key_title');
const $title = $('#key_title'); const comment = $(this)
const comment = $(this) .val()
.val() .match(/^\S+ \S+ (.+)\n?$/);
.match(/^\S+ \S+ (.+)\n?$/);
// Extract the SSH Key title from its comment // Extract the SSH Key title from its comment
if (comment && comment.length > 1) { if (comment && comment.length > 1) {
$title.val(comment[1]).change(); $title.val(comment[1]).change();
} }
}); });
new Profile(); // eslint-disable-line no-new new Profile(); // eslint-disable-line no-new
initSearchSettings(); initSearchSettings();
});
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