/* FeedEk jQuery RSS/ATOM Feed Plugin v3.2.0 * https://jquery-plugins.net/FeedEk/FeedEk.html https://github.com/enginkizil/FeedEk * Author : Engin KIZIL */ !function (o) { o.fn.FeedEk = function (e) { var r = o.extend({ MaxCount: 5, ShowDesc: !0, ShowPubDate: !0, DescCharacterLimit: 0, TitleLinkTarget: "_blank", DateFormat: "", DateFormatLang: "en", Offset: 0, ShowAuthor: !1, AuthorLabel: "Author:", Success: function () { }, Error: function () { } }, e), t = this, a = function () { t.empty(), t.append(''), o.ajax({ url: "https://feed.jquery-plugins.net/load?url=" + r.FeedUrl + "&maxCount=" + r.MaxCount + "&dateCulture=" + r.DateFormatLang + "&dateFormat=" + r.DateFormat + "&offset=" + r.Offset, dataType: "json", success: function (e) { t.empty(), null != e.data && (t.append(n(e.data)), r.Success(e.data)) }, error: function (e) { r.Error(e) } }) }, n = function (e) { var a = ""; return o.each(e, function (e, t) { a += '
  • ' + t.title + "
    ", r.ShowPubDate && (a += '
    ', 0 < o.trim(r.DateFormat).length ? a += t.publishDateFormatted : a += new Date(t.publishDate).toLocaleDateString(), a += "
    "), r.ShowDesc && (a += '
    ' + i(t.description) + "
    "), r.ShowAuthor && (a += '
    ' + r.AuthorLabel + " " + t.author + "
    "), a += "
  • " }), '" }, i = function (e) { return 0 < r.DescCharacterLimit && e.length > r.DescCharacterLimit && (e = e.substring(0, r.DescCharacterLimit) + "..."), e }; null != r.FeedUrl && (o.isArray(r.FeedUrl) ? r.FeedUrl = r.FeedUrl.map(e => encodeURIComponent(e)).join(",,,") : r.FeedUrl = encodeURIComponent(r.FeedUrl), a()) } }(jQuery);