78 lines
3.4 KiB
JavaScript
78 lines
3.4 KiB
JavaScript
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}', `{shortBodyPlain}`); 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}', `{shortBodyPlain}`); 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, body) {
|
|
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("sbody").innerHTML= body + "....";
|
|
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');
|
|
}
|
|
|
|
function topFunction() {
|
|
document.body.scrollTop = 0; // safari
|
|
document.documentElement.scrollTop = 0; // webkit
|
|
}
|
|
|
|
$( function() {
|
|
$( "#draggable" ).draggable();
|
|
$("#draggable").data({
|
|
'originalLeft': $("#draggable").css('left'),
|
|
'origionalTop': $("#draggable").css('top')
|
|
});
|
|
$(".reset").click(function() {
|
|
$("#draggable").css({
|
|
'left': $("#draggable").data('originalLeft'),
|
|
'top': $("#draggable").data('origionalTop')
|
|
});
|
|
topFunction();
|
|
document.getElementById("player").pause();
|
|
});
|
|
} );
|
|
|
|
|
|
|
|
|