').html('If you are using an iPad, you may install the app below:')); } $('#download_app_div').append(plistAnchor); } else { $('#download_app_div').empty().html('An error has occurred:' + json.message); } } else { $('#download_app_div').empty().html('An error has occurred'); } }, error:function(xhr, textStatus, errorThrown){ $('#download_app_div').empty().html('An error has occurred: ' + textStatus); } }); } else { $('#download_app_div').empty().html('Sorry, app download is only available for iOS devices.'); } } var page_filter = 1; var category_filter = "%27"; var text_filter = ""; var size_filter = "5"; var year_filter = "0"; var month_filter = "0"; var text_posts_only = false; var premium_filter = false; var player_position = "above"; //lets create widget bar var colWidth = 6; function escapeHtml(text) { return text .replace(/&/g, "&") .replace(//g, ">") .replace(/"/g, """) .replace(/'/g, "'"); } //load more on bottom of page $(window).scroll(function () { if(!lockScroll){ if ($(window).scrollTop() >= $(document).height() - $(window).height() - 60) { lockScroll = true; var requestUrl = "https://thecsspodcast.libsyn.com/website"; requestUrl += "/page/"+ (page_filter + 1); if(text_posts_only){ requestUrl += "/podcast/blog"; } else if(premium_filter){ requestUrl += "/search/is_premium"; } else if(text_filter != ""){ requestUrl += "/search/"+ text_filter; } else if(month_filter != 0) { requestUrl += "/"+ year_filter +"/"+ month_filter; } else if(year_filter != 0) { requestUrl += "/" + year_filter; } else { requestUrl += (category_filter != "" ? "/category/"+category_filter : ""); } requestUrl += "/render-type/json"; $.ajax({ type: 'GET', url: requestUrl, async: false, success:function(json){ var items = JSON.parse(json); if(items.length > 0){ for(var i = 0; i < items.length; i++){ var item = new Array(); item = items[i]; var isTextOnly = typeof item.primary_content == 'undefined'; var isVideo; if(isTextOnly){ isVideo = false; } else { isVideo = item.primary_content.file_class == "video"; } //create action buttons var actionButtonsRow = '