code.gitea.io/gitea@v1.21.7/web_src/js/features/sshkey-helper.js (about) 1 import $ from 'jquery'; 2 3 export function initSshKeyFormParser() { 4 // Parse SSH Key 5 $('#ssh-key-content').on('change paste keyup', function () { 6 const arrays = $(this).val().split(' '); 7 const $title = $('#ssh-key-title'); 8 if ($title.val() === '' && arrays.length === 3 && arrays[2] !== '') { 9 $title.val(arrays[2]); 10 } 11 }); 12 }