Alphabetized list by first name

Here's my javascript automation code for it. Run the code while in your browser's console on the edit page for the csv. It'll print out what should be pasted in the file.
It changes the innerHTML because I thought it'd keep one from needing to copy and paste, since github's editor would see you made a change, but I was wrong, it didn't detect a change. There's also more code I wrote for this that edits all the divs in the editor to be alphabetical (this is a visible page change), but GitHub's editor still didn't count it as a file change.

    // the edit area
    var textarea = document.getElementById('blob_contents');
    
    // the csv lines
    var itemsToSort = textarea.innerHTML.split('\n');
    
    // bubble sorts the elements in itemArr by their lowercase string values
    var bubbleSort = function(itemArr, startIndex) {
     var somethingChanged = true;
     while(somethingChanged === true) {
      somethingChanged = false;
    
      for(var i = startIndex; i < itemArr.length - 1; i++) {
       // lowercase innerHTML to comper alphabetical order
       var text1 = itemArr[i].toLowerCase();
       var text2 = itemArr[i+1].toLowerCase();
    
       if(text2 < text1) {
        somethingChanged = true;
    
        var temp = itemArr[i];
        itemArr[i] = itemArr[i+1];
        itemArr[i+1] = temp;
       }
      }
     }
    };
    
    // Call bubblesort on items. Having 1 as startindex removes 'First,Last,Website,GitHub,Twitter,Facebook' from what'll be sorted
    bubbleSort(itemsToSort, 1);
    
    // finally, replace textarea's innerHTML with the new values
    textarea.innerHTML = "";
    for(var i = 0; i < itemsToSort.length; i++) {
     textarea.innerHTML += itemsToSort[i] + '\n';
    }
    
    // And since that doesn't "change" anything, print out the textarea's innerHTML to copy and paste into the editor
    console.log(textarea.innerHTML);