Commit e367975a authored by Enrique Alcántara's avatar Enrique Alcántara

Merge branch 'jnnkl-remove-eventlistener-profiles-index' into 'master'

Remove obsolete DOMContentLoadedEventListener

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