From 4b040fa5fa56c1d5c0ad34494fbdb6d72070c6d7 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sun, 20 Feb 2022 13:29:02 -0500 Subject: [PATCH] maybe working --- homepage/js/quotes.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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! */