MCPcopy Create free account
hub / github.com/Cicada000/VV / showRandomString

Method showRandomString

Web/script.js:467–480  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

465 }
466 }
467 static showRandomString() {
468 if (!AppState.randomStringDisplayed) {
469 const randomStringDisplay = document.getElementById(
470 "randomStringDisplay",
471 );
472 const randomIndex = Math.floor(
473 Math.random() * CONFIG.randomStrings.length,
474 );
475 randomStringDisplay.textContent = CONFIG.randomStrings[randomIndex];
476 AppState.randomStringDisplayed = true;
477 randomStringDisplay.classList.remove("fade-out");
478 randomStringDisplay.classList.add("fade-in");
479 }
480 }
481 static clearRandomString() {
482 const randomStringDisplay = document.getElementById("randomStringDisplay");
483 randomStringDisplay.classList.remove("fade-in");

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected