From 85d039a6406aa00522a0f128057e199a58334333 Mon Sep 17 00:00:00 2001 From: kpcyrd Date: Fri, 12 Sep 2014 15:57:50 +0200 Subject: [PATCH] Parse atom feeds, too --- js/main.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/js/main.js b/js/main.js index 193147e..e3a766d 100644 --- a/js/main.js +++ b/js/main.js @@ -20,6 +20,20 @@ $(document).ready(function() { $('#news').append($('
  • ').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 = $('') + .attr('class', 'css-truncate') + .attr('href', link) + .attr('target', '_blank') + .text(title); + $('#news').append($('
  • ').append(item)); + i++; + }); }); }); });