Parse atom feeds, too
This commit is contained in:
parent
3d95d7c870
commit
85d039a640
14
js/main.js
14
js/main.js
|
@ -20,6 +20,20 @@ $(document).ready(function() {
|
|||
$('#news').append($('<li>').append(item));
|
||||
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++;
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue