This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| async function enviarScript(scriptText){ | |
| const lines = scriptText.split(/[\n\t]+/).map(line => line.trim()).filter(line => line); | |
| main = document.querySelector("#main"), | |
| textarea = main.querySelector(`div[contenteditable="true"]`) | |
| if(!textarea) throw new Error("Não há uma conversa aberta") | |
| for(const line of lines){ | |
| console.log(line) | |