From c177ff6cd99158d3092c585f3eacc6c9b50d2519 Mon Sep 17 00:00:00 2001 From: devenblake Date: Sun, 20 Dec 2020 22:27:26 -0500 Subject: [PATCH] quotes work --- homepage/quotes.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/homepage/quotes.js b/homepage/quotes.js index 1d84ed4..61991c4 100644 --- a/homepage/quotes.js +++ b/homepage/quotes.js @@ -15,7 +15,7 @@ window.initializequotes = function() { [ "Special thanks to Ками for their help adding quotes to this page.", "Deven Blake" ] ]; - window.quote = ["", ""] + window.quote = 0; } window.setStyling = function(sheet) { @@ -24,12 +24,13 @@ window.setStyling = function(sheet) { }; window.genQuote = function() { - if(window.quote != ["",""]) window.quotes.push(window.quote); + if(window.quote) window.quotes.push(window.quote); quoteindex = Math.floor(Math.random() * window.quotes.length); window.quote = window.quotes.splice(quoteindex, 1); console.log("Quote set to:"); console.log(window.quote); + console.log(window.quotes); document.getElementById('quote').textContent = '\"' + window.quote[0] + '\"'; document.getElementById('quoteauthor').textContent = '~ ' + window.quote[1]; document.getElementById('getaquote').setAttribute('value', 'Get another free quote today!'); -} +};