1
0
This commit is contained in:
dtb 2022-02-20 13:41:08 -05:00
parent fe572a76aa
commit a15f6d5e12

View File

@ -28,8 +28,8 @@ window.quotes_initialize = function(){
/* Will not give you the same quote twice in a row! */
window.quote_new = function(){
window.quote_old = window.quote; /* The quote currently in use. */
quoteIndex = Math.floor(Math.random() * window.quotes.length);
window.quote = window.quotes.splice(quoteIndex, 1)[0];
quote_index = Math.floor(Math.random() * window.quotes.length);
window.quote = window.quotes.splice(quote_index, 1)[0];
if(window.quote_old)
window.quotes.push(window.quote_old);
@ -41,6 +41,6 @@ window.quote_new = function(){
if(quote_author = document.getElementById(
window.QUOTES_QUOTE_AUTHOR_ID))
quoteAuthorText.textContent = window.QUOTES_QUOTE_AUTHOR_PREFIX
quote_author.textContent = window.QUOTES_QUOTE_AUTHOR_PREFIX
+ window.quote[1];
};