Commit f4ef3b51 by yPhil

Merge branch 'bugs'

parents ab6216b8 1fbd007e
Pipeline #45181 passed with stage
in 47 seconds
......@@ -278,51 +278,25 @@ PTL.feed = {
var $tempDom = $('<null>').append($description);
console.log('item: (%s)', JSON.stringify(item));
if (item.image && typeof item.image.url !== 'undefined') {
// console.log('#### item.image: (%s)', feedHost);
imageUrl = item.image.url;
}
if (!imageUrl && typeof $tempDom.find('span a').attr('href') !== 'undefined') {
if (PTL.util.isImage($tempDom.find('span a').attr('href'))) {
imageUrl = $tempDom.find('span a').attr('href');
// console.log('#### $tempDom A: (%s)', feedHost);
}
}
if (!imageUrl && typeof $tempDom.find('img').attr('src') !== 'undefined') {
imageUrl = $tempDom.find('img').attr('src');
// console.log('#### $tempDom IMG: (%s)', feedHost);
}
if (typeof item.enclosures[0] !== 'undefined' && item.enclosures[0].url) {
// console.log('item.enclosures[0].type: (%s)', item.enclosures[0].type);
if (!imageUrl && imgTypes.indexOf(item.enclosures[0].type) > -1) {
imageUrl = item.enclosures[0].url;
// console.log('#### YESS: (%s)', feedHost);
}
// console.log('enclosures: (%s)', item.enclosures[0].url.match(/\.(jpg|png|jpeg|gif)$/));
// if (item.enclosures.url.match(/\.(jpg|png|jpeg|gif)$/)) {
// imageUrl = item.enclosures.url;
// }
// console.log('item.enclosures: %s (%s): %s', JSON.stringify(item.enclosures[0].type), feedUrl, item.enclosures[0].url.match(/\.(jpg|png|jpeg|gif)$/));
// if (item.enclosures[0].url.match(/\.(jpg|png|jpeg|gif)$/)) {
// imageUrl = item.enclosures[0].url;
// }
if (item.enclosures[0].url.match(/\.(ogg|mp3)$/)) {
$soundLink
.attr('href', item.enclosures[0].url)
......@@ -370,6 +344,8 @@ PTL.feed = {
$itemDiv.appendTo($feedItem);
$feedItem.appendTo($feedBody);
$tempDom.empty();
});
}).always(function() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment