()
| 253 | } |
| 254 | |
| 255 | function setButtonLoading() { |
| 256 | dom.generateBtn.classList.add("generating"); |
| 257 | hide(dom.resultSection); |
| 258 | progressStep = 0; |
| 259 | setButtonMessage(PROGRESS_MESSAGES[0]); |
| 260 | startCatAnimation(); |
| 261 | progressInterval = setInterval(() => { |
| 262 | progressStep++; |
| 263 | setButtonMessage( |
| 264 | progressStep < PROGRESS_MESSAGES.length |
| 265 | ? PROGRESS_MESSAGES[progressStep] |
| 266 | : "🎨 Finalizing...", |
| 267 | ); |
| 268 | }, 2500); |
| 269 | } |
| 270 | |
| 271 | function setButtonMessage(msg) { |
| 272 | dom.generateBtn.textContent = ""; |
no test coverage detected