You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

sshkey-helper.js 360B

12345678910
  1. export function initSshKeyFormParser() {
  2. // Parse SSH Key
  3. document.getElementById('ssh-key-content')?.addEventListener('input', function () {
  4. const arrays = this.value.split(' ');
  5. const title = document.getElementById('ssh-key-title');
  6. if (!title.value && arrays.length === 3 && arrays[2] !== '') {
  7. title.value = arrays[2];
  8. }
  9. });
  10. }