29 lines
No EOL
1.2 KiB
JavaScript
29 lines
No EOL
1.2 KiB
JavaScript
"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() {
|
|
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);
|
|
return await response.json();
|
|
}
|
|
|
|
window.addEventListener("DOMContentLoaded", function () {
|
|
console.log(
|
|
"Hewo, c'est renarde 🦊, la créatrice de ce site.\nSi tu veux trouver le code source du site c'est par ici -> "
|
|
+ 'https://forgejo.la-taniere-solidaire.gay/Renarde/site-web-le-plus-beau-des-voyages'
|
|
);
|
|
|
|
// 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)
|
|
// }
|
|
// })
|
|
}) |