1
0
This commit is contained in:
devenblake 2020-12-17 08:53:53 -05:00
parent 2b9a669b40
commit 8a0933b6ce

View File

@ -47,7 +47,8 @@ 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); quoteindex = Math.floor(Math.random() * window.quotes.length);
window.quote = window.quotes.splice(quoteindex, 1); window.quote = window.quotes.splice(quoteindex, 1);
console.log(window.quote); console.log(window.quote); console.log(window.quote[0]; console.log(window.quote[1]);
console.log(window.quote[0][0]);
document.getElementById('getaquote').setAttribute('value', 'Get another free quote today!'); document.getElementById('getaquote').setAttribute('value', 'Get another free quote today!');
document.getElementById('quote').textContent = '\"' + window.quote[0] + '\"'; document.getElementById('quote').textContent = '\"' + window.quote[0] + '\"';
document.getElementById('quoteauthor').textContent = '~ ' + window.quote[1]; document.getElementById('quoteauthor').textContent = '~ ' + window.quote[1];
@ -73,8 +74,10 @@ window.quotes = [
"Darth Vader" ], "Darth Vader" ],
[ "A checklist can aid here.", [ "A checklist can aid here.",
"Lance Leventhal" ], "Lance Leventhal" ],
[ "Special thanks to Ками for their help adding quotes to this page.", [ "Special thanks to Ками for their help adding this quote feature to this page.",
"Deven Blake" ] "Deven Blake" ],
[ "It soothes. It heals. It protects.",
"Unknown" ]
]; ];
</SCRIPT> </SCRIPT>
<SCRIPT TYPE="application/javascript"> <SCRIPT TYPE="application/javascript">