diff --git a/javascript/nav-music.js b/javascript/nav-music.js index df8f9cf..9abb837 100644 --- a/javascript/nav-music.js +++ b/javascript/nav-music.js @@ -12,11 +12,17 @@ function fisherYatesShuffle(songs) { return songs; } -// Load the JSON file containing music data (using CORS proxy) +// Load the JSON file containing music data directly from chat.veltron.net async function loadMusicData() { - const corsProxyUrl = 'https://corsproxy.io/?url='; - const targetUrl = 'https://chat.veltron.net'; - const response = await fetch(corsProxyUrl + encodeURIComponent(targetUrl)); + const targetUrl = 'https://chat.veltron.net'; // Directly use the target URL + const response = await fetch(targetUrl); + + // Check if the request was successful + if (!response.ok) { + console.error("Failed to fetch music data:", response.statusText); + return []; + } + const data = await response.json(); // Get the "frutigerAeroBliss" section from the JSON