(loaded, total)
| 317 | $progressBar.style.width = "0%"; |
| 318 | } |
| 319 | function updateProgress(loaded, total) { |
| 320 | if (total > 0) { |
| 321 | $progressBar.style.width = Math.min(100, Math.round((loaded / total) * 100)) + "%"; |
| 322 | } else { |
| 323 | // Unknown total — fake an indeterminate bar that creeps up. |
| 324 | const cur = parseFloat($progressBar.style.width) || 0; |
| 325 | $progressBar.style.width = Math.min(95, cur + 5) + "%"; |
| 326 | } |
| 327 | } |
| 328 | function hideProgress() { |
| 329 | $progressWrap.style.display = "none"; |
| 330 | $progressBar.style.width = "0%"; |
no outgoing calls
no test coverage detected