From 4faf8e1db0ecea9c5c5ab593e204a741eb2bba99 Mon Sep 17 00:00:00 2001 From: TheIceCreamTroll Date: Sun, 12 Dec 2021 19:23:44 -0500 Subject: [PATCH] Click on empty line numbers to jump to that point in the main window --- src/listmaker.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/listmaker.js b/src/listmaker.js index b430c80..546c730 100644 --- a/src/listmaker.js +++ b/src/listmaker.js @@ -13,11 +13,11 @@ function readme() { function updateDirectory() { ipc.send('open-folder-dialog'); - ipc.on('selected-folder', function (result) { - if (result['canceled'] == false) { + ipc.on('selected-folder', function (event, result) { + if (result['canceled']==false) { directoryPath = String(result['filePaths']); if (! directoryPath == "") { loadFileList(directoryPath); } - else { return; } + else { return; } } }) } @@ -120,10 +120,10 @@ function checkEmptyLines() { const rows = document.getElementsByClassName("textBox"); let emptyLines = []; - for (let i = 0; i < rows.length; i++) { //Change this to only show the rows that are empty, without deleting all the non-empty ones ofc. Or.... Need to either reverse the order it goes in, or get the name/id instead of using i (since it's asceding instead of decsending.) + for (let i = 0; i < rows.length; i++) { if (rows[i].value === "") { - emptyLines.push(" " + rows[i].id); + emptyLines.push(" " + ''+rows[i].id+''); } } if (emptyLines.length !== 0) {