MCPcopy Create free account
hub / github.com/pollinations/pollinations / setButtonLoading

Function setButtonLoading

apps/catgpt/script.js:255–269  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

253}
254
255function 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
271function setButtonMessage(msg) {
272 dom.generateBtn.textContent = "";

Callers 1

generateMemeFunction · 0.85

Calls 4

setButtonMessageFunction · 0.85
startCatAnimationFunction · 0.85
addMethod · 0.80
hideFunction · 0.70

Tested by

no test coverage detected