()
| 1329 | } |
| 1330 | } |
| 1331 | function updatePayloadLineCount() { |
| 1332 | if (!UI.payloadInput || !UI.nbrTab2 || !UI.payloadLineLabel) return; |
| 1333 | const lineCount = UI.payloadInput.value |
| 1334 | ? UI.payloadInput.value.split("\n").filter((line) => line.trim() !== "") |
| 1335 | .length |
| 1336 | : 0; |
| 1337 | UI.nbrTab2.textContent = lineCount; |
| 1338 | UI.payloadLineLabel.textContent = lineCount === 1 ? "Line" : "Lines"; |
| 1339 | updatePayloadEditorLabel(); |
| 1340 | updatePayloadLineNumbers(); |
| 1341 | } |
| 1342 | |
| 1343 | function updatePayloadLineNumbers() { |
| 1344 | if (!UI.payloadInput || !UI.payloadLineNumbers) return; |
no test coverage detected