diff --git a/music/albums1998.html b/music/albums1998.html index 98c41baa3..27edddfe4 100644 --- a/music/albums1998.html +++ b/music/albums1998.html @@ -213,14 +213,18 @@ event.preventDefault(); const url = this.href; - // Check if the link is a YouTube link - if (url.includes('youtube')) { - // Embed YouTube video - const videoId = url.split('v=')[1]?.split('&')[0]; // Extract video ID - iframe.src = `https://www.youtube.com/embed/${videoId}`; - } else { - // Load Wikipedia page + if (url.includes('wikipedia')) { iframe.src = url; + } else if (url.includes('youtube.com')) { + if (url.includes('embed/videoseries')) { + iframe.src = url; // Playlist + } else { + const videoId = url.split('v=')[1]?.split('&')[0]; + iframe.src = `https://www.youtube.com/embed/${videoId}`; // Video + } + } else if (url.includes('spotify.com')) { + const spotifyUrl = url.replace('open.spotify.com', 'embed.spotify.com'); + iframe.src = spotifyUrl; } modal.style.display = 'flex'; // Show modal (flex layout for centering) diff --git a/music/albums2002.html b/music/albums2002.html index 1a0a7222c..fb5fb7efd 100644 --- a/music/albums2002.html +++ b/music/albums2002.html @@ -213,14 +213,18 @@ event.preventDefault(); const url = this.href; - // Check if the link is a YouTube link - if (url.includes('youtube')) { - // Embed YouTube video - const videoId = url.split('v=')[1]?.split('&')[0]; // Extract video ID - iframe.src = `https://www.youtube.com/embed/${videoId}`; - } else { - // Load Wikipedia page + if (url.includes('wikipedia')) { iframe.src = url; + } else if (url.includes('youtube.com')) { + if (url.includes('embed/videoseries')) { + iframe.src = url; // Playlist + } else { + const videoId = url.split('v=')[1]?.split('&')[0]; + iframe.src = `https://www.youtube.com/embed/${videoId}`; // Video + } + } else if (url.includes('spotify.com')) { + const spotifyUrl = url.replace('open.spotify.com', 'embed.spotify.com'); + iframe.src = spotifyUrl; } modal.style.display = 'flex'; // Show modal (flex layout for centering) diff --git a/music/albums2003.html b/music/albums2003.html index b1168f280..cff3ca86a 100644 --- a/music/albums2003.html +++ b/music/albums2003.html @@ -213,14 +213,18 @@ event.preventDefault(); const url = this.href; - // Check if the link is a YouTube link - if (url.includes('youtube')) { - // Embed YouTube video - const videoId = url.split('v=')[1]?.split('&')[0]; // Extract video ID - iframe.src = `https://www.youtube.com/embed/${videoId}`; - } else { - // Load Wikipedia page + if (url.includes('wikipedia')) { iframe.src = url; + } else if (url.includes('youtube.com')) { + if (url.includes('embed/videoseries')) { + iframe.src = url; // Playlist + } else { + const videoId = url.split('v=')[1]?.split('&')[0]; + iframe.src = `https://www.youtube.com/embed/${videoId}`; // Video + } + } else if (url.includes('spotify.com')) { + const spotifyUrl = url.replace('open.spotify.com', 'embed.spotify.com'); + iframe.src = spotifyUrl; } modal.style.display = 'flex'; // Show modal (flex layout for centering) diff --git a/music/albums2004.html b/music/albums2004.html index 6fd7b8535..bd7181d3f 100644 --- a/music/albums2004.html +++ b/music/albums2004.html @@ -213,14 +213,18 @@ event.preventDefault(); const url = this.href; - // Check if the link is a YouTube link - if (url.includes('youtube')) { - // Embed YouTube video - const videoId = url.split('v=')[1]?.split('&')[0]; // Extract video ID - iframe.src = `https://www.youtube.com/embed/${videoId}`; - } else { - // Load Wikipedia page + if (url.includes('wikipedia')) { iframe.src = url; + } else if (url.includes('youtube.com')) { + if (url.includes('embed/videoseries')) { + iframe.src = url; // Playlist + } else { + const videoId = url.split('v=')[1]?.split('&')[0]; + iframe.src = `https://www.youtube.com/embed/${videoId}`; // Video + } + } else if (url.includes('spotify.com')) { + const spotifyUrl = url.replace('open.spotify.com', 'embed.spotify.com'); + iframe.src = spotifyUrl; } modal.style.display = 'flex'; // Show modal (flex layout for centering) diff --git a/music/albums2010.html b/music/albums2010.html index 4b50ed560..f4a7a7e69 100644 --- a/music/albums2010.html +++ b/music/albums2010.html @@ -213,14 +213,18 @@ event.preventDefault(); const url = this.href; - // Check if the link is a YouTube link - if (url.includes('youtube')) { - // Embed YouTube video - const videoId = url.split('v=')[1]?.split('&')[0]; // Extract video ID - iframe.src = `https://www.youtube.com/embed/${videoId}`; - } else { - // Load Wikipedia page + if (url.includes('wikipedia')) { iframe.src = url; + } else if (url.includes('youtube.com')) { + if (url.includes('embed/videoseries')) { + iframe.src = url; // Playlist + } else { + const videoId = url.split('v=')[1]?.split('&')[0]; + iframe.src = `https://www.youtube.com/embed/${videoId}`; // Video + } + } else if (url.includes('spotify.com')) { + const spotifyUrl = url.replace('open.spotify.com', 'embed.spotify.com'); + iframe.src = spotifyUrl; } modal.style.display = 'flex'; // Show modal (flex layout for centering) diff --git a/music/albums2011.html b/music/albums2011.html index 75d81e569..41f4bb29c 100644 --- a/music/albums2011.html +++ b/music/albums2011.html @@ -213,14 +213,18 @@ event.preventDefault(); const url = this.href; - // Check if the link is a YouTube link - if (url.includes('youtube')) { - // Embed YouTube video - const videoId = url.split('v=')[1]?.split('&')[0]; // Extract video ID - iframe.src = `https://www.youtube.com/embed/${videoId}`; - } else { - // Load Wikipedia page + if (url.includes('wikipedia')) { iframe.src = url; + } else if (url.includes('youtube.com')) { + if (url.includes('embed/videoseries')) { + iframe.src = url; // Playlist + } else { + const videoId = url.split('v=')[1]?.split('&')[0]; + iframe.src = `https://www.youtube.com/embed/${videoId}`; // Video + } + } else if (url.includes('spotify.com')) { + const spotifyUrl = url.replace('open.spotify.com', 'embed.spotify.com'); + iframe.src = spotifyUrl; } modal.style.display = 'flex'; // Show modal (flex layout for centering) diff --git a/music/albums2013.html b/music/albums2013.html index 7887fb886..825ff1588 100644 --- a/music/albums2013.html +++ b/music/albums2013.html @@ -214,14 +214,18 @@ event.preventDefault(); const url = this.href; - // Check if the link is a YouTube link - if (url.includes('youtube')) { - // Embed YouTube video - const videoId = url.split('v=')[1]?.split('&')[0]; // Extract video ID - iframe.src = `https://www.youtube.com/embed/${videoId}`; - } else { - // Load Wikipedia page + if (url.includes('wikipedia')) { iframe.src = url; + } else if (url.includes('youtube.com')) { + if (url.includes('embed/videoseries')) { + iframe.src = url; // Playlist + } else { + const videoId = url.split('v=')[1]?.split('&')[0]; + iframe.src = `https://www.youtube.com/embed/${videoId}`; // Video + } + } else if (url.includes('spotify.com')) { + const spotifyUrl = url.replace('open.spotify.com', 'embed.spotify.com'); + iframe.src = spotifyUrl; } modal.style.display = 'flex'; // Show modal (flex layout for centering) diff --git a/music/albums2014.html b/music/albums2014.html index 97854904c..99a3a4181 100644 --- a/music/albums2014.html +++ b/music/albums2014.html @@ -213,14 +213,18 @@ event.preventDefault(); const url = this.href; - // Check if the link is a YouTube link - if (url.includes('youtube')) { - // Embed YouTube video - const videoId = url.split('v=')[1]?.split('&')[0]; // Extract video ID - iframe.src = `https://www.youtube.com/embed/${videoId}`; - } else { - // Load Wikipedia page + if (url.includes('wikipedia')) { iframe.src = url; + } else if (url.includes('youtube.com')) { + if (url.includes('embed/videoseries')) { + iframe.src = url; // Playlist + } else { + const videoId = url.split('v=')[1]?.split('&')[0]; + iframe.src = `https://www.youtube.com/embed/${videoId}`; // Video + } + } else if (url.includes('spotify.com')) { + const spotifyUrl = url.replace('open.spotify.com', 'embed.spotify.com'); + iframe.src = spotifyUrl; } modal.style.display = 'flex'; // Show modal (flex layout for centering) diff --git a/music/albums2017.html b/music/albums2017.html index e125ee221..ed75e85af 100644 --- a/music/albums2017.html +++ b/music/albums2017.html @@ -213,14 +213,18 @@ event.preventDefault(); const url = this.href; - // Check if the link is a YouTube link - if (url.includes('youtube')) { - // Embed YouTube video - const videoId = url.split('v=')[1]?.split('&')[0]; // Extract video ID - iframe.src = `https://www.youtube.com/embed/${videoId}`; - } else { - // Load Wikipedia page + if (url.includes('wikipedia')) { iframe.src = url; + } else if (url.includes('youtube.com')) { + if (url.includes('embed/videoseries')) { + iframe.src = url; // Playlist + } else { + const videoId = url.split('v=')[1]?.split('&')[0]; + iframe.src = `https://www.youtube.com/embed/${videoId}`; // Video + } + } else if (url.includes('spotify.com')) { + const spotifyUrl = url.replace('open.spotify.com', 'embed.spotify.com'); + iframe.src = spotifyUrl; } modal.style.display = 'flex'; // Show modal (flex layout for centering) diff --git a/music/albums2018.html b/music/albums2018.html index 86fb1a223..c569e5c80 100644 --- a/music/albums2018.html +++ b/music/albums2018.html @@ -213,14 +213,18 @@ event.preventDefault(); const url = this.href; - // Check if the link is a YouTube link - if (url.includes('youtube')) { - // Embed YouTube video - const videoId = url.split('v=')[1]?.split('&')[0]; // Extract video ID - iframe.src = `https://www.youtube.com/embed/${videoId}`; - } else { - // Load Wikipedia page + if (url.includes('wikipedia')) { iframe.src = url; + } else if (url.includes('youtube.com')) { + if (url.includes('embed/videoseries')) { + iframe.src = url; // Playlist + } else { + const videoId = url.split('v=')[1]?.split('&')[0]; + iframe.src = `https://www.youtube.com/embed/${videoId}`; // Video + } + } else if (url.includes('spotify.com')) { + const spotifyUrl = url.replace('open.spotify.com', 'embed.spotify.com'); + iframe.src = spotifyUrl; } modal.style.display = 'flex'; // Show modal (flex layout for centering) diff --git a/music/albums2019.html b/music/albums2019.html index 328680eab..0a976f645 100644 --- a/music/albums2019.html +++ b/music/albums2019.html @@ -213,14 +213,18 @@ event.preventDefault(); const url = this.href; - // Check if the link is a YouTube link - if (url.includes('youtube')) { - // Embed YouTube video - const videoId = url.split('v=')[1]?.split('&')[0]; // Extract video ID - iframe.src = `https://www.youtube.com/embed/${videoId}`; - } else { - // Load Wikipedia page + if (url.includes('wikipedia')) { iframe.src = url; + } else if (url.includes('youtube.com')) { + if (url.includes('embed/videoseries')) { + iframe.src = url; // Playlist + } else { + const videoId = url.split('v=')[1]?.split('&')[0]; + iframe.src = `https://www.youtube.com/embed/${videoId}`; // Video + } + } else if (url.includes('spotify.com')) { + const spotifyUrl = url.replace('open.spotify.com', 'embed.spotify.com'); + iframe.src = spotifyUrl; } modal.style.display = 'flex'; // Show modal (flex layout for centering) diff --git a/music/albums2020.html b/music/albums2020.html index 921b0dfc5..d24399e24 100644 --- a/music/albums2020.html +++ b/music/albums2020.html @@ -213,14 +213,18 @@ event.preventDefault(); const url = this.href; - // Check if the link is a YouTube link - if (url.includes('youtube')) { - // Embed YouTube video - const videoId = url.split('v=')[1]?.split('&')[0]; // Extract video ID - iframe.src = `https://www.youtube.com/embed/${videoId}`; - } else { - // Load Wikipedia page + if (url.includes('wikipedia')) { iframe.src = url; + } else if (url.includes('youtube.com')) { + if (url.includes('embed/videoseries')) { + iframe.src = url; // Playlist + } else { + const videoId = url.split('v=')[1]?.split('&')[0]; + iframe.src = `https://www.youtube.com/embed/${videoId}`; // Video + } + } else if (url.includes('spotify.com')) { + const spotifyUrl = url.replace('open.spotify.com', 'embed.spotify.com'); + iframe.src = spotifyUrl; } modal.style.display = 'flex'; // Show modal (flex layout for centering) diff --git a/music/albums2021.html b/music/albums2021.html index 9f5e02f80..af5b3b09f 100644 --- a/music/albums2021.html +++ b/music/albums2021.html @@ -213,14 +213,18 @@ event.preventDefault(); const url = this.href; - // Check if the link is a YouTube link - if (url.includes('youtube')) { - // Embed YouTube video - const videoId = url.split('v=')[1]?.split('&')[0]; // Extract video ID - iframe.src = `https://www.youtube.com/embed/${videoId}`; - } else { - // Load Wikipedia page + if (url.includes('wikipedia')) { iframe.src = url; + } else if (url.includes('youtube.com')) { + if (url.includes('embed/videoseries')) { + iframe.src = url; // Playlist + } else { + const videoId = url.split('v=')[1]?.split('&')[0]; + iframe.src = `https://www.youtube.com/embed/${videoId}`; // Video + } + } else if (url.includes('spotify.com')) { + const spotifyUrl = url.replace('open.spotify.com', 'embed.spotify.com'); + iframe.src = spotifyUrl; } modal.style.display = 'flex'; // Show modal (flex layout for centering) diff --git a/music/albums2022.html b/music/albums2022.html index 87f87b39d..6573e8817 100644 --- a/music/albums2022.html +++ b/music/albums2022.html @@ -214,14 +214,18 @@ event.preventDefault(); const url = this.href; - // Check if the link is a YouTube link - if (url.includes('youtube')) { - // Embed YouTube video - const videoId = url.split('v=')[1]?.split('&')[0]; // Extract video ID - iframe.src = `https://www.youtube.com/embed/${videoId}`; - } else { - // Load Wikipedia page + if (url.includes('wikipedia')) { iframe.src = url; + } else if (url.includes('youtube.com')) { + if (url.includes('embed/videoseries')) { + iframe.src = url; // Playlist + } else { + const videoId = url.split('v=')[1]?.split('&')[0]; + iframe.src = `https://www.youtube.com/embed/${videoId}`; // Video + } + } else if (url.includes('spotify.com')) { + const spotifyUrl = url.replace('open.spotify.com', 'embed.spotify.com'); + iframe.src = spotifyUrl; } modal.style.display = 'flex'; // Show modal (flex layout for centering) diff --git a/music/albums2023.html b/music/albums2023.html index 2d388cf56..808f4dc51 100644 --- a/music/albums2023.html +++ b/music/albums2023.html @@ -219,14 +219,18 @@ event.preventDefault(); const url = this.href; - // Check if the link is a YouTube link - if (url.includes('youtube')) { - // Embed YouTube video - const videoId = url.split('v=')[1]?.split('&')[0]; // Extract video ID - iframe.src = `https://www.youtube.com/embed/${videoId}`; - } else { - // Load Wikipedia page + if (url.includes('wikipedia')) { iframe.src = url; + } else if (url.includes('youtube.com')) { + if (url.includes('embed/videoseries')) { + iframe.src = url; // Playlist + } else { + const videoId = url.split('v=')[1]?.split('&')[0]; + iframe.src = `https://www.youtube.com/embed/${videoId}`; // Video + } + } else if (url.includes('spotify.com')) { + const spotifyUrl = url.replace('open.spotify.com', 'embed.spotify.com'); + iframe.src = spotifyUrl; } modal.style.display = 'flex'; // Show modal (flex layout for centering) diff --git a/music/albums2024.html b/music/albums2024.html index 8358bd472..cdca26672 100644 --- a/music/albums2024.html +++ b/music/albums2024.html @@ -360,14 +360,18 @@ event.preventDefault(); const url = this.href; - // Check if the link is a YouTube link - if (url.includes('youtube')) { - // Embed YouTube video - const videoId = url.split('v=')[1]?.split('&')[0]; // Extract video ID - iframe.src = `https://www.youtube.com/embed/${videoId}`; - } else { - // Load Wikipedia page + if (url.includes('wikipedia')) { iframe.src = url; + } else if (url.includes('youtube.com')) { + if (url.includes('embed/videoseries')) { + iframe.src = url; // Playlist + } else { + const videoId = url.split('v=')[1]?.split('&')[0]; + iframe.src = `https://www.youtube.com/embed/${videoId}`; // Video + } + } else if (url.includes('spotify.com')) { + const spotifyUrl = url.replace('open.spotify.com', 'embed.spotify.com'); + iframe.src = spotifyUrl; } modal.style.display = 'flex'; // Show modal (flex layout for centering) diff --git a/music/albums2025.html b/music/albums2025.html index 11e25a4f7..07e437ec5 100644 --- a/music/albums2025.html +++ b/music/albums2025.html @@ -212,14 +212,18 @@ event.preventDefault(); const url = this.href; - // Check if the link is a YouTube link - if (url.includes('youtube')) { - // Embed YouTube video - const videoId = url.split('v=')[1]?.split('&')[0]; // Extract video ID - iframe.src = `https://www.youtube.com/embed/${videoId}`; - } else { - // Load Wikipedia page + if (url.includes('wikipedia')) { iframe.src = url; + } else if (url.includes('youtube.com')) { + if (url.includes('embed/videoseries')) { + iframe.src = url; // Playlist + } else { + const videoId = url.split('v=')[1]?.split('&')[0]; + iframe.src = `https://www.youtube.com/embed/${videoId}`; // Video + } + } else if (url.includes('spotify.com')) { + const spotifyUrl = url.replace('open.spotify.com', 'embed.spotify.com'); + iframe.src = spotifyUrl; } modal.style.display = 'flex'; // Show modal (flex layout for centering)