first commit hihi

This commit is contained in:
Mathieu Moran
2021-06-17 05:28:44 -04:00
commit 79e4dc0558
18 changed files with 302 additions and 0 deletions
+50
View File
@@ -0,0 +1,50 @@
jQuery(function($) {
$("#rss-feeds").rss("https://anchor.fm/s/af11b98/podcast/rss", {
limit: 1000,
tokens: {
enclosure: function (entry, tokens) {
if (entry.enclosure) {
return `${entry.enclosure.url}`;
}
return "";
},
},
layoutTemplate: "{entries}",
entryTemplate:"<table class=\"entry\" style=\"overflow:hidden;word-wrap:break-word;border-width:2; border-style:solid; max-width: 100%; width: 100%; border-color: transparent;\"cellpadding=\"3\"><tr><td class=\"entry\"style=\"background-color: #0FF404; color: #0FF00; \"><b><a href=\"{enclosure}\" onclick=\"play('{enclosure}',`{title}`,'{date}'); return false;\" style=\"color: #0FF00;\" target=\"_blank\">{title}</a></b></td></tr>\n<tr><td class=\"entry\"style=\"width:100%; overflow: hidden; word-wrap: break-word;background-color: transparent; color: #ffffff; padding-top: 10px;\"><i><b>{date}</b></i><br><p>{bodyPlain}</p></td></tr><tr>",
dateFormat: 'DD/MM/YYYY',
dateLocale: 'fr-ca',
});
$("#lastephome").rss("https://anchor.fm/s/af11b98/podcast/rss", {
limit: 1,
tokens: {
enclosure: function (entry, tokens) {
if (entry.enclosure) {
return `${entry.enclosure.url}`;
}
return "";
},
},
layoutTemplate: "{entries}",
entryTemplate:"<table class=\"entry\" style=\"overflow:hidden;word-wrap:break-word;border-width:2; border-style:solid; max-width: 100%; width: 100%; border-color: transparent;\"cellpadding=\"3\"><tr><td class=\"entry\"style=\"background-color: #0FF404; color: #0FF00; \"><b><a href=\"{enclosure}\" onclick=\"play('{enclosure}',`{title}`,'{date}'); switchTab(); return false;\" style=\"color: #0FF00;\" target=\"_blank\">{title}</a></b></td></tr>\n<tr><td class=\"entry\"style=\"width:100%; overflow: hidden; word-wrap: break-word;background-color: transparent; color: #ffffff; padding-top: 10px;\"><i><b>{date}</b></i><br><p>{bodyPlain}</p></td></tr><tr>",
dateFormat: 'DD/MM/YYYY',
dateLocale: 'fr-ca',
});
});
function play(src, title, date) {
console.log(src);
console.log(title);
console.log(linkdec)
var linkenc = src.substring(src.lastIndexOf('/')+1);
var linkdec = decodeURIComponent(linkenc);
document.getElementById("lienep").innerHTML= title;
document.getElementById("lienep").href= linkdec;
document.getElementById("player").pause();
document.getElementById("player").setAttribute('src', linkdec);
document.getElementById("player").load();
document.getElementById("player").play();
}
function switchTab() {
$('[href="#ep"]').tab('show');
}