1"use strict"; 2 3function GetBaseServiceUrl() { 4 return "/api/searchresults/"; 5} 6 7var resultItem = function resultItem(_ref) { 8 var url = _ref.url, 9 title = _ref.title, 10 type = _ref.type, 11 subtitle = _ref.subtitle, 12 image_url = _ref.image_url; 13 return "\n <div class=\"api-result\" >\n <a href=\"".concat(url, "\">").concat(title, "'s page</a>\n <div class=\"img\" style=\"background-image: url(''), url(").concat(image_url, ");\"></div>\n <div>\n <p class=\"tag\">").concat(type, "</p>\n <h3 class=\"result-title\">").concat(title, "</h3>\n <p class=\"subtitle\">").concat(subtitle, "</p>\n </div>\n </div>\n"); 14}; 15 16jQuery( document ).ready( function() { 17 jQuery( '.load-more-results' ).not('.loading').on( 'click', function( e ) { 18 e.preventDefault(); 19 var keyword = jQuery(this).attr('data-keyword'); 20 var type = jQuery(this).attr('data-type'); 21 var limit = 8; 22 var offset = parseInt(jQuery(this).attr('data-offset')) + limit; 23 jQuery( this ).addClass('loading'); 24 jQuery( this ).text('Loading...'); 25 jQuery.ajax({ 26 dataType: 'json', 27 url: GetBaseServiceUrl() + '?keyword=' + keyword + '&type=' + type + '&offset=' + offset, 28 method: 'GET', 29 type: 'GET' 30 } ).done( function( response ) { 31 if( response.data.length ) { 32 jQuery( '.load-more-results' ).attr('data-offset', offset); 33 jQuery('.block--apisearcresults .searchresults').append(response.data.map(resultItem).reverse().join('')); 34 jQuery( '.load-more-results' ).removeClass('loading'); 35 jQuery( '.load-more-results' ).text('Load more'); 36 }else { 37 jQuery( '.load-more-results' ).text('Load more'); 38 jQuery( '.load-more-results' ).remove(); 39 } 40 } ); 41 } ); 42} );
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.