Make cloudguy pick random facts after doing his intro
authorCameron Ball <cameron@cameron1729.xyz>
Sat, 14 Mar 2020 16:56:08 +0000 (00:56 +0800)
committerCameron Ball <cameron@cameron1729.xyz>
Sat, 14 Mar 2020 16:56:08 +0000 (00:56 +0800)
index.html

index aee2f0f..ca546f1 100644 (file)
  numQuotes = cloudGuyQuotes.length;
  currentQuote = 0;
  setInterval(function(){
+     if (currentQuote == 0 || currentQuote == 1) {
+         currentQuote++;
+     } else {
+         currentQuote = Math.floor(Math.random()*(cloudGuyQuotes.length - 3)) + 3;
+         console.log(currentQuote);
+     }
+
      cgq.innerText = cloudGuyQuotes[currentQuote];
-     currentQuote = (currentQuote + 1) % numQuotes;
- }, 5000);
+ }, 10000);
 
  angeries = document.querySelectorAll(".angereyWrap");
  usedPositions = [];