()
| 1341 | } |
| 1342 | |
| 1343 | function updatePayloadLineNumbers() { |
| 1344 | if (!UI.payloadInput || !UI.payloadLineNumbers) return; |
| 1345 | |
| 1346 | const physicalLineCount = UI.payloadInput.value |
| 1347 | ? UI.payloadInput.value.split("\n").length |
| 1348 | : 1; |
| 1349 | const lineCount = Math.max(7, physicalLineCount); |
| 1350 | |
| 1351 | if (UI.payloadLineNumbers.dataset.lineCount !== String(lineCount)) { |
| 1352 | UI.payloadLineNumbers.textContent = Array.from( |
| 1353 | { length: lineCount }, |
| 1354 | (_, index) => index + 1 |
| 1355 | ).join("\n"); |
| 1356 | UI.payloadLineNumbers.dataset.lineCount = String(lineCount); |
| 1357 | } |
| 1358 | |
| 1359 | syncPayloadLineNumbersScroll(); |
| 1360 | } |
| 1361 | |
| 1362 | function syncPayloadLineNumbersScroll() { |
| 1363 | if (!UI.payloadInput || !UI.payloadLineNumbers) return; |
no test coverage detected