1jQuery(function () { 2 var articleManager = { 3 getParent: function () { 4 return jQuery(".related-data").attr("data-parent") 5 }, 6 getNumberOfItems: function () { 7 return jQuery(".related-articles__container").length - 1; 8 }, 9 getTemplate: function (article) { 10 var articleHtml = jQuery(".article-temp").html(); 11 articleHtml = articleHtml.replace("{{url}}", article.Url); 12 articleHtml = articleHtml.replace("{{thumb}}", article.Thumb); 13 articleHtml = articleHtml.replace("{{thumbAlt}}", article.ThumbAlt); 14 articleHtml = articleHtml.split("{{category}}").join(article.Category); 15 articleHtml = articleHtml.split("{{title}}").join(article.Title); 16 articleHtml = articleHtml.replace("{{summary}}", article.Summary); 17 return articleHtml; 18 19 }, 20 appendArticles: function () { 21 jQuery.get("/blog/showmoretrending", { parentId: articleManager.getParent(), skip: articleManager.getNumberOfItems() }, function (result) { 22 if (result) { 23 result.Articles.forEach(function (item) { 24 jQuery(".trending-list").append(articleManager.getTemplate(item)); 25 }); 26 if (!result.ShowMore) { 27 jQuery(".article-show-more").hide(); 28 } 29 console.log(); 30 } 31 }) 32 }, 33 isShowMoreVisible: function () { 34 if (jQuery(".related-data").length == 0 || +jQuery(".related-data").attr("data-total") < 10) { 35 jQuery(".article-show-more").hide(); 36 } 37 } 38 } 39 jQuery(".article-show-more").on("click", function () { 40 articleManager.appendArticles(); 41 return false; 42 }); 43 articleManager.isShowMoreVisible(); 44})
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.