site-web-le-plus-beau-des-v.../tools/script.js

40 lines
1.2 KiB
JavaScript
Raw Permalink Normal View History

2024-05-06 12:57:03 +02:00
"use strict";
2024-05-08 00:47:53 +02:00
function getPubDate(epNum) {
const epData = document.getElementsByClassName("ep"+epNum+"-pubDate")
return epData[0].innerHTML;
}
function getDesc(epNum) {
const epData = document.getElementsByClassName("ep"+epNum+"-desc")
return epData[0].innerHTML;
}
function getAudioSource(epNum) {
const epData = document.getElementsByClassName("ep"+epNum+"-audio")
return epData[0].innerHTML;
}
2024-05-06 12:57:03 +02:00
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'
);
2024-05-08 00:47:53 +02:00
const epSelect = document.getElementById("episode-selection");
const dPubDate = document.getElementsByClassName("dPubDate");
const dDesc = document.getElementsByClassName("dDesc");
const dAudio = document.getElementsByClassName("dAudio");
epSelect.addEventListener('change',function() {
dPubDate[0].innerHTML = getPubDate(epSelect.value);
dDesc[0].innerHTML = getDesc(epSelect.value);
dAudio[0].innerHTML = getAudioSource(epSelect.value);
dAudio[0].load()
})
2024-05-06 12:57:03 +02:00
})