Parse atom feeds, too

This commit is contained in:
kpcyrd 2014-09-12 15:57:50 +02:00
parent 3d95d7c870
commit 85d039a640

View file

@ -20,6 +20,20 @@ $(document).ready(function() {
$('#news').append($('<li>').append(item)); $('#news').append($('<li>').append(item));
i++; i++;
}); });
$(data).find('entry').forEach(function(entry) {
if(i >= MAX_RSS) return;
var title = $(entry).find('title').text();
var link = $(entry).find('link').attr('href');
var item = $('<a>')
.attr('class', 'css-truncate')
.attr('href', link)
.attr('target', '_blank')
.text(title);
$('#news').append($('<li>').append(item));
i++;
});
}); });
}); });
}); });