From f50e067a24347298e72a387488892c71fc0f6902 Mon Sep 17 00:00:00 2001 From: devenblake Date: Sun, 20 Dec 2020 22:39:48 -0500 Subject: [PATCH] quotes might finally be finished --- homepage/quotes.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/homepage/quotes.js b/homepage/quotes.js index b6438e3..e7244e7 100644 --- a/homepage/quotes.js +++ b/homepage/quotes.js @@ -24,12 +24,10 @@ window.setStyling = function(sheet) { }; window.genQuote = function() { - if(window.quote) window.quotes.push(window.quote); + window.oldquote = window.quote; quoteindex = Math.floor(Math.random() * window.quotes.length); window.quote = window.quotes.splice(quoteindex, 1)[0]; - console.log("Quote set to:"); - console.log(window.quote); - console.log(window.quotes); + if(window.oldquote) window.quotes.push(window.oldquote); document.getElementById('quote').textContent = '\"' + window.quote[0] + '\"'; document.getElementById('quoteauthor').textContent = '~ ' + window.quote[1]; document.getElementById('getaquote').setAttribute('value', 'Get another free quote today!');