diff --git a/homepage/js/quotes.js b/homepage/js/quotes.js index 05b85f7..7fd8f13 100644 --- a/homepage/js/quotes.js +++ b/homepage/js/quotes.js @@ -8,6 +8,7 @@ /* firefox doesn't support import assertions yet (2022-02-20; fx 97.0) */ window.quotes = [ ["Couldn't get quotes array.", "quotes.js"] ]; +window.QUOTES_FILE_LOCATION = "/js/quotes.json"; window.QUOTES_L_QUOTE_MARK = '"'; window.QUOTES_R_QUOTE_MARK = '"'; window.QUOTES_QUOTE_AUTHOR_ID = "quote_author"; @@ -15,7 +16,7 @@ window.QUOTES_QUOTE_AUTHOR_PREFIX = "~ "; window.QUOTES_QUOTE_VALUE_ID = "quote_value"; window.quotes_initialize = function(){ - fetch("./quotes.json").then(response => {return response.json();}).then(data => console.log(data)); + fetch(window.QUOTES_FILE_LOCATION).then(response => {return response.json();}).then(data => window.quotes = data["quotes"]); }; /* Will not give you the same quote twice in a row! */