2023-12-23 09:55:13 +01:00
|
|
|
"use strict";
|
|
|
|
|
|
|
|
function removeAcastBranding(description,removeBR) { // Retire la mention "hébergé par Acast"
|
|
|
|
let desc = description.replace(/(<br><hr>\n<p>).+(<\/p>)/g,"");
|
|
|
|
if (removeBR) { desc = desc.replace(/<br>/g,"") }
|
|
|
|
return desc
|
|
|
|
}
|
|
|
|
|
|
|
|
async function fetchRSSfeed() {
|
2024-04-30 00:11:52 +02:00
|
|
|
const RSS_URL = "https://feeds.acast.com/public/shows/le-plus-beau-des-voyages";
|
|
|
|
const RSS_API = "https://api.rss2json.com/v1/api.json?rss_url="
|
|
|
|
const response = await fetch( RSS_API + RSS_URL);
|
2023-12-23 09:55:13 +01:00
|
|
|
return await response.json();
|
|
|
|
}
|
|
|
|
|
|
|
|
window.addEventListener("DOMContentLoaded", function () {
|
|
|
|
console.log(
|
2024-04-30 00:11:52 +02:00
|
|
|
"Hewo, c'est renarde 🦊, la créatrice de ce site.\nSi tu veux trouver le code source du site c'est par ici -> "
|
2023-12-23 18:18:19 +01:00
|
|
|
+ 'https://forgejo.la-taniere-solidaire.gay/Renarde/site-web-le-plus-beau-des-voyages'
|
2023-12-23 09:55:13 +01:00
|
|
|
);
|
|
|
|
|
2024-04-30 00:11:52 +02:00
|
|
|
// fetchRSSfeed().then( rssData => {
|
|
|
|
// document.getElementById("FeedDesc").innerHTML = removeAcastBranding(rssData.feed.description,false);
|
|
|
|
// for (const episode of rssData.items) {
|
|
|
|
// const formatedEp = formatEpisodeIntoHTML(episode)
|
|
|
|
// this.document.getElementById("Podcasts").append(formatedEp)
|
|
|
|
// }
|
|
|
|
// })
|
2023-12-23 09:55:13 +01:00
|
|
|
})
|