Make cloudguy pick random facts after doing his intro
[fp-lecture.git] / 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 = [];