let output = document.getElementById("output"); let errorOutput = document.getElementById("error"); let input; let linesArr; let parsedArr = [[], [], [], [], [], [], [], [], []]; let cmdArr = []; let copy9001 = []; function readFile(input) { let file = input.files[0]; let fileReader = new FileReader(); fileReader.readAsText(file); fileReader.onload = function() { input = fileReader.result; linesArr = input.split("\n"); }; fileReader.onerror = function() { alert(fileReader.error); }; } let start = document.getElementById("start"); start.addEventListener("mouseover", () => { start.innerHTML = "pwease pwess mee hawwd mastaaa! ~^o^~" }); start.addEventListener("mouseout", () => { start.innerHTML = "sowwy mastaa! Ow0;" }); start.addEventListener("click", () => { try { parseArr(); } catch(e) { console.error(e); errorOutput.innerHTML = "^^^ pwease gibe me file fiwwst!!1! :3"; return 1; } if (errorOutput.innerHTML != "") { errorOutput.innerHTML = "senk ju~ *UwU~"; } parseCmd(); copy9001 = [].concat(parsedArr); console.log("🚀 ~ file: script.js:44 ~ start.addEventListener ~ copy9001", copy9001) for(let i=0; i=0; i--) { copy9001[d-1].push(tmpArr[i]); } } function parseCmd() { for(let i=10; i