Blame static/assets/js/FeedEk.js
|
|
e8ec7a |
/*
|
|
|
e8ec7a |
* FeedEk jQuery RSS/ATOM Feed Plugin v1.1.2
|
|
|
e8ec7a |
* http://jquery-plugins.net/FeedEk/FeedEk.html
|
|
|
e8ec7a |
* Author : Engin KIZIL
|
|
|
e8ec7a |
* http://www.enginkizil.com
|
|
|
e8ec7a |
*/
|
|
|
e8ec7a |
(function (e) { e.fn.FeedEk = function (t) { var n = { FeedUrl: "http://rss.cnn.com/rss/edition.rss", MaxCount: 5, ShowDesc: true, ShowPubDate: true, CharacterLimit: 0, TitleLinkTarget: "_blank" }; if (t) { e.extend(n, t) } var r = e(this).attr("id"); var i; e("#" + r).empty().append(''); e.ajax({ url: document.location.protocol + "//ajax.googleapis.com/ajax/services/feed/load?v=1.0&num=" + n.MaxCount + "&output=json&q=" + encodeURIComponent(n.FeedUrl) + "&hl=en&callback=?", dataType: "json", success: function (t) { e("#" + r).empty(); var s = ""; e.each(t.responseData.feed.entries, function (e, t) { s += '"; if (n.ShowPubDate) { i = new Date(t.publishedDate); s += '' + i.toLocaleDateString() + " " } if (n.ShowDesc) { if (n.DescCharacterLimit > 0 && t.content.length > n.DescCharacterLimit) { s += '' + t.content.substr(0, n.DescCharacterLimit) + "... " } else { s += '' + t.content + " " } } }); e("#" + r).append('") } }) } })(jQuery)
|