const editButtons = document.querySelectorAll(".submission-edit");
const editor = document.querySelector("#editor form");
const channelField = editor.querySelector("#channel");
const typeField = editor.querySelector("#type");
const idField = editor.querySelector('input[name="id"]');

const updateEditor = (e) => {
    const currentRow = e.target.parentNode.parentNode;
    channelField.value = currentRow.cells[2].textContent;
    typeField.value = currentRow.cells[1].textContent;
    idField.value = currentRow.querySelector('input[name="id"]').value;
    document.querySelector('#editor .channel-name').textContent = currentRow.cells[0].textContent;
};
for(const button of editButtons) {
    button.addEventListener("click", updateEditor, false);
}

@@ -417,24 +417,169 @@
 extContent;%0A
+    if(currentRow.cells%5B1%5D.childElementCount %3E 0) %7B%0A        typeField.value = currentRow.cells%5B1%5D.querySelector(%22a%22).title;%0A    %7D%0A    else %7B%0A    
     typeFiel
@@ -617,24 +617,30 @@
 extContent;%0A
+    %7D%0A
     idField.

Fix ttypes in editor