1jQuery(document).ready(function($) { 2 3 $('#load-more-liveblog-posts').on('click', function() { 4 var button = $(this); 5 var data = { 6 'action': 'load_more_liveblog_posts', 7 'category': $('#liveblog-posts').data('category'), 8 'offset': $('#liveblog-posts').data('offset') 9 }; 10 11 $.post(liveblog_posts_ajax.ajax_url, data, function(response) { 12 if (response) { 13 var res = JSON.parse(response); 14 $('#liveblog-posts').append(res.posts); 15 $('#liveblog-posts').data('offset', $('#liveblog-posts').data('offset') + 10); 16 if (!res.more_posts) { 17 button.css("display", "none"); 18 } 19 } else { 20 button.text('No more posts').prop('disabled', true); 21 } 22 }).fail(function(xhr, status, error) { 23 console.log('AJAX error:', error); // Debugging 24 }); 25 }); 26 27 28 if (document.getElementById('liveblog-posts')) { 29 setTimeout(function () { 30 var category = $('#liveblog-posts').data('category') 31 $.ajax({ 32 url: liveblog_posts_ajax.ajax_url, 33 type: 'post', 34 data: { 35 action: 'refresh_liveblog_posts', 36 category: category 37 }, 38 success: function(response) { 39 $('#liveblog-posts').html(response); 40 $('#load-more-liveblog-posts').css("display", "inline-block") 41 } 42 }); 43 }, 600000); // 600,000 milliseconds = 10 minutes 44 } 45});
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.