1$(document).ready(function(){ 2 $(document).on('click', '.landings-list__item--js-more', function(){ 3 if(!$(this).closest('.from_smartseo').length){ 4 return; 5 } 6 7 var $this = $(this), 8 block = $this.find('> span'), 9 dataOpened = $this.data('opened'), 10 thisText = block.text() 11 dataText = block.data('text'), 12 showCount = $this.data('visible') 13 item = $this.closest('.landings-list__info-wrapper').find('.landings-list__item.hidden').get(); 14 15 var items = item.filter(function(item1, index){ 16 return ++index <= showCount 17 }); 18 19 if(items){ 20 var lastVisibleIndex = 0; 21 22 items.forEach(function(item, index){ 23 $(item).removeClass('hidden'); 24 lastVisibleIndex = $(item).index(); 25 }); 26 27 if (lastVisibleIndex) { 28 // show group breaks 29 $this.closest('.landings-list__info-wrapper').find('.landings-list__break').each(function(){ 30 if ($(this).index() < lastVisibleIndex) { 31 $(this).removeClass('hidden'); 32 } 33 }); 34 } 35 } 36 37 if(!item.length){ 38 $this.closest('.landings-list__info-wrapper').find('.landings-list__item.js-hidden,.landings-list__break').addClass('hidden'); 39 block.data('text', thisText).text(dataText); 40 $this.removeClass('opened').data('opened', 'N'); 41 } 42 else if(item.length <= showCount){ 43 block.data('text', thisText).text(dataText); 44 $this.addClass('opened').data('opened', 'Y'); 45 } 46 }); 47 48 $(document).on('click', '.landings-list__clear-filter', function(){ 49 if(!$(this).closest('.from_smartseo').length){ 50 return; 51 } 52 53 $('.bx_filter_search_reset').trigger('click'); 54 }); 55 56 $(document).on('click', 'a.landings-list__name', function(e){ 57 if(!$(this).closest('.from_smartseo').length){ 58 return; 59 } 60 61 var _this = $(this); 62 63 if(_this.closest('.no_ajax.landings_list_wrapper').length){ 64 return true; 65 } 66 67 e.preventDefault(); 68 69 if(_this.attr('href')){ 70 71 $.ajax({ 72 url:_this.attr('href'), 73 type: "GET", 74 data: {'ajax_get':'Y', 'ajax_get_filter':'Y', 'from_smartseo':'Y'}, 75 success: function(html){ 76 // $('#right_block_ajax').html($(html).find('#right_block_ajax').html()); 77 // $('.top-content-block').html($(html).find('.top-content-block').html()); 78 79 var ajaxBreadCrumb = $('.ajax_breadcrumb .breadcrumbs', html); 80 if(ajaxBreadCrumb.length){ 81 $('#navigation').html(ajaxBreadCrumb); 82 } 83 84 $('.right_block.catalog_page .container').html(html); 85 $('.ajax_breadcrumb').remove(); 86 87 CheckTopMenuFullCatalogSubmenu(); 88 89 BX.onCustomEvent('onAjaxSuccessFilter'); 90 91 checkFilterLandgings() 92 93 var eventdata = {action:'jsLoadBlock'}; 94 BX.onCustomEvent('onCompleteAction', [eventdata, this]); 95 96 InitScrollBar(); 97 98 if(window.History.enabled || window.history.pushState != null){ 99 window.History.replaceState( null, document.title, decodeURIComponent(_this.attr('href')) ); 100 } 101 else{ 102 location.href = _this.attr('href'); 103 } 104 105 if(typeof Ya.share2 == 'function'){ 106 var myShare = document.querySelector('.ya-share2'); 107 Ya.share2(myShare, { 108 content: { 109 url: _this.attr('href') 110 } 111 }); 112 } 113 } 114 }); 115 116 } 117 }); 118});
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.