1/* 2* FeedEk jQuery RSS/ATOM Feed Plugin v2.0 3* http://jquery-plugins.net/FeedEk/FeedEk.html https://github.com/enginkizil/FeedEk 4* Author : Engin KIZIL http://www.enginkizil.com 5*/ 6 7(function ($) { 8 $.fn.FeedEk = function (opt) { 9 var def = $.extend({ 10 FeedUrl: "http://rss.cnn.com/rss/edition.rss", 11 MaxCount: 5, 12 ShowDesc: true, 13 ShowPubDate: true, 14 CharacterLimit: 0, 15 TitleLinkTarget: "_blank", 16 DateFormat: "", 17 DateFormatLang:"en" 18 }, opt); 19 20 var id = $(this).attr("id"), i, s = "",dt; 21 $("#" + id).empty().append('<img src="/wordpress/wp-content/themes/bio-diversity-data-centre/assets/js/plugins/FeedEk/loader.gif" />'); 22 23 $.ajax({ 24 url: "http://www.biodiversityireland.ie/wordpress/wp-content/themes/bio-diversity-data-centre/boneill/rss_proxy.php", 25 dataType: "json", 26 success: function (data) { 27 $("#" + id).empty(); 28 $.each(data.feed.entries, function (e, item) { 29 s += '<li><div class="itemTitle"><a href="' + item.link + '" target="' + def.TitleLinkTarget + '" >' + item.title + "</a></div>"; 30 31 if (def.ShowPubDate){ 32 dt= new Date(item.pubDate); 33 if ($.trim(def.DateFormat).length > 0) { 34 try { 35 moment.lang(def.DateFormatLang); 36 s += '<div class="itemDate">' + moment(dt).format(def.DateFormat) + "</div>"; 37 } 38 catch (e){s += '<div class="itemDate">' + dt.toLocaleDateString() + "</div>";} 39 } 40 else { 41 s += '<div class="itemDate">' + dt.toLocaleDateString() + "</div>"; 42 } 43 } 44 if (def.ShowDesc) { 45 if (def.DescCharacterLimit > 0 && item.description.length > def.DescCharacterLimit) { 46 s += '<div class="itemContent">' + item.description.substr(0, def.DescCharacterLimit) + "...</div>"; 47 } 48 else { 49 s += '<div class="itemContent">' + item.description + "</div>"; 50 } 51 } 52 }); 53 $("#" + id).append('<ul class="feedEkList">' + s + "</ul>"); 54 } 55 }); 56 }; 57})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.